Change Mitigation Job Status

Use this API to change the status of Mitigation Jobs (Pass mitigation job Ids)

POST/mtg/v1/deploymentjobs/update/status/${action}

Input ParametersInput Parameters

Parameter

Mandatory/
Optional

Data Type

Description

 action Mandatory string Specify the value as Enabled or Disabled.
This parameter is used to enable on-demand and run once mitigation job from disabled to enabled state.

Sample - Change mitigation job statusSample - Change mitigation job status

API Request

curl -X 'POST' '<qualys_base_url>/mtg/v1/deploymentjobs/update/status/Enabled'
-H 'accept: application/json' 
-H 'Authorization: Bearer <JWT_Token>
-d

API Body

{
    "ids": [
        "6c8d9f5a-51c3-46eb-a85c-b2ad3539c854",
        "5e90a160-6262-4f2e-9cd5-bd83ef5a35be"
    ]
}

API Response

[
  {
    "id": "6c8d9f5a-51c3-46eb-a85c-b2ad3539c854",
    "name": "MTG_JOB1",
    "status": "success"
  },
{
    "id": "5e90a160-6262-4f2e-9cd5-bd83ef5a35be ",
    "name": " MTG_JOB2",
    "status": "success"
  }
]

Sample - Change mitigation job status for enabled jobsSample - Change mitigation job status for enabled jobs

For a mitigation job that is already in the Enabled state, if you try to change the status to Disabled, the API response displays the status as failure as shown in the following sample.

API Request

curl -X 'POST' '<qualys_base_url>/mtg/v1/deploymentjobs/update/status/Disabled'
-H 'accept: application/json'
-H 'Authorization: Bearer <JWT_Token>
-d

API Body

{  
  "ids": [
    "390f9223-d173-455d-b6b9-47c82b122d73"
  ]
}

API Response

[
  {
    "id": "390f9223-d173-455d-b6b9-47c82b122d73",
    "name": "RISKELIMINATIONMITIGATENOW_1759139816574",
    "status": "failure",
    "error": "Non-recurring jobs cannot be disabled once enabled by user"
  }
]