Perform an Approval Action on a Job

With this API, the job approver can approve or reject a pending job. The job owner can send a job for approval or revoke a pending approval request. APPROVED and REJECTED actions are performed by the job approver; PENDING_APPROVAL and REVOKED are performed by the job owner.

GET/pm/v1/deploymentjobs/<job-id>/approval

Input ParametersInput Parameters

Parameter Mandatory/
Optional
Data Type Description
action Mandatory String These are the approval actions on the Job approver’s end and also statuses on the job owner's end. 
The supported values are APPROVED and REJECTED for the job approver and pending_APPPROVAL and REVOKED for the job owner.
comment Optional String Specify a comment for the job owner to mention any specific comment of the reason why the job was rejected.

Sample - Approve a Deployment JobSample - Approve a Deployment Job

API Request

curl -X 'POST' \
  '<qualys_base_url>/pm/v1/deploymentjobs/<Job-id>/approval' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <JWT_Token>
  -H 'Content-Type: application/json' \

API Body

{
  "action": "APPROVED",
  "comment": "The job is approved."
}

API Response

{
  "approvalStatus": "APPROVED",
  "id": "4e392bd0-7f4a-444d-af2d-8bf987817308"
}