Approve or reject a request - lithnet/resourcemanagement-webservice GitHub Wiki

Approve or reject a request.

Request

Method URL
POST /{version}/approvals/{id}/{decision}

URL Parameters

Parameter name Description
{id} The ID of the approval request. Use the Get approval requests method to get the approval IDs
{decision} The approval decision. Valid values are approve or reject
{version} The version of the API call to use. Supported values are v1 and v2

Request Body

Optionally, a JSON formatted string can be provided in the request body with an approval or rejection reason

Response

Response Codes

See the topic on error handling for the response codes that this API call can return.

Response Body

This method does not return a response body for a successful operation. See the topic on error handling for details on the response body returned for some exception types

Examples

Approve a request with a reason

Request

POST /v2/approvals/f03f50c0-f40a-4370-8531-e5d025d22cb2/approve

Request body

{
  "Reason":"Approved by RN!"
}

Response

HTTP/1.1 200 OK

Approve a request without a reason

Request

POST /v2/approvals/f03f50c0-f40a-4370-8531-e5d025d22cb2/approve

Response

HTTP/1.1 200 OK

Reject a request with a reason

Request

POST /v2/approvals/f03f50c0-f40a-4370-8531-e5d025d22cb2/reject

Request body

{
  "Reason":"Cannot approve at this time"
}

Response

HTTP/1.1 200 OK