getScanTasksList
This method returns the list of scan tasks.
Parameters
Parameter | Type | Optional | Description |
---|---|---|---|
| String | Yes | The name of the task. Filter the list of tasks by task name. Use the asterisk symbol (*) in front of the keyword to search its appearance anywhere in the name. If omitted, only results where the name starts with the keyword will be returned. |
| Number | Yes | The status of the task. Available options are: 1 - Pending; 2 - In progress; 3 - Finished. |
| Number | Yes | The results page number. Default page number is 1. |
| Number | Yes | The number of items displayed in a page. The upper limit is 100 items per page. Default value: 30 items per page. |
Return value
This method returns an Object containing information about the tasks. The returned object contains:
page
- the current page displayedpagesCount
- the total number of available pagesperPage
- the total number of returned items per pagetotal
- the total number of itemsitems
- the list of tasks. Each entry in the list has the following fields:id
, the ID of the task,name
, the name of the task,status
, the status of the task (as defined above),startDate
, the start date of the task
Example
Request:
{ "params": { "status": 1, "page": 2, "perPage": 5 }, "jsonrpc": "2.0", "method": "getScanTasksList", "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f" }
Response:
{ "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f", "jsonrpc": "2.0", "result": { "page": 2, "pagesCount": 11, "perPage": 5, "total": 54, "items": [ { "id": "21a295eeb1a43d8b497b23b7", "name": "task 1", "status": 1, "startDate": "2015-08-21T23:48:16" }, { "id": "21a295eeb1a43d8b497b23b8", "name": "task 2", "status": 1, "startDate": "2015-08-21T10:21:15" }, ] } }