Change the Status of Deployment Jobs
Use this API to change the status of deployment jobs. This API also honors the job approval workflow. A job whose approval flow is turned on cannot be bulk-enabled until it has been approved; the response provides a per-job failure reason for any job that is still pending, rejected, or revoked.
Input ParametersInput Parameters
|
Parameter |
Mandatory/Optional |
Data Type |
Description |
|---|---|---|---|
|
action |
Mandatory |
string |
Specify whether you want to enable or disable the deployment jobs. Available values: Enabled, Disabled |
|
Request body |
Mandatory |
- |
ids (string): Specify the job IDs for which you want to update the status. |
Sample - Change the status of deployment jobs Sample - Change the status of deployment jobs
API request
curl -X POST
"https://<QualysBaseURL>/pm/v1/deploymentjobs/update/status/Enabled" -H "accept: application/json" -H "Authorization: Bearer <<Jwt Token>>" -H "Content-Type: application/json"
Request Body - Specify the job IDs to change the status of the deployment jobs
{
"ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}
Response
[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "PATCH API NOTIFICATION",
"status": "success"
}
]
Sample - Bulk-Enable Deployment JobsSample - Bulk-Enable Deployment Jobs
API Request
curl -X 'POST' \
'<qualys_base_url>/pm/v1/deploymentjobs/update/status/Enabled' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <JWT_Token>
-H 'Content-Type: application/json' \
API Body
{
"ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
"4rfcef64-2617-4562-eg3c-6h863f66afw3"
]
}
API Response
[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "patch-job-1",
"status": "failure",
"error": "approval flow in enabled can not enable in bulk."
}
{
"id": "4rfcef64-2617-4562-eg3c-6h863f66afw3",
"name": "patch-job-2",
"status": "failure",
"error": "approval flow in enabled can not enable in bulk."
}
]