List Script Jobs API
Search for the parent jobs that are created when you execute scripts.
Input ParametersInput Parameters
|
Parameter |
Mandatory/Optional |
Data Type |
Description |
|---|---|---|---|
|
Filter |
Optional |
string |
Filter the jobs by providing a query using Qualys syntax. Refer to the “How to Search” topic in the online help for assistance with creating your query. For example – “scriptId: <SCRIPT_ID>” |
|
startAt/endAt |
Optional |
string |
Filter jobs based on the time when the jobs are generated (dateTime) or the time when the jobs are processed at Qualys (processedTime). |
|
pageNumber |
Optional |
string |
The page to be returned. Starts from zero. |
|
pageSize |
Optional |
string |
The number of records per page to be included in the response. Default is 10. |
|
Authorization |
Mandatory |
string |
Authorization token to authenticate to the Qualys Enterprise TruRisk™ Platform. Prepend the token with 'Bearer', followed by a space. For example: Bearer <authToken> |
|
sort |
Optional |
string |
Sort the results using a Qualys token. For example, ID or Category: [{\"Created.dateTime\":\"asc\"}] |
API Request
"curl --location --request POST""https://<qualys_base_url>/sm/v1/jobs/search""\\
--header""Content-Type: application/json""\\
--header""Authorization: Bearer <authToken>""\\
--data-raw""'{
\"filter\":\"script.name:Script test for subscribed modules\"
}"
Request Body
i) Filter jobs using script name
{
"filter":"script.name:Script test for subscribed modules"
}
Response
{
"errorCode": null,
"message": null,
"body": {
"totalCount": 13,
"list": [
{
"severity": 2,
"test": true,
"created": {
"dateTime": 1651847969380
},
"executionType": "Manual",
"correlationUuid": "9bde85fb-010e-45fe-8bc0-4b55cc6c3a2a",
"threshold": 12,
"title": "Script test for subscribed modules-1651847969",
"platform": "WINDOWS",
"updatedDateTime": 1651847969380,
"scriptId": 72653,
"customerUuid": "317df02c-4ad1-55e2-83a3-5646a34fceec",
"isTest": true,
"scriptType": "Python",
"id": "79097",
"category": {
"name": "General Automation",
"id": 6
}
}
}
]
}
}
To know the details of the response codes, refer to Appendix.