Approvals

This contains a list of APIs specific to the Approval steps

Add a new Harness Approval activity

Request
Security:
ApiKey (readwrite)
path Parameters
approvalInstanceId
required
string

Approval Identifier for the entity

Request Body schema:

This contains the details of Harness Approval Activity requested

action
required
string
Enum: "APPROVE" "REJECT"
Array of objects (ApproverInput)
comments
string
Responses
400

Bad Request

500

Internal Server Error

default

Returns a newly added Harness Approval activity

post/pipeline/api/approvals/{approvalInstanceId}/harness/activity
Request samples
{
  • "action": "APPROVE",
  • "approverInputs": [
    ],
  • "comments": "string"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Gets an Approval Instance by identifier

Request
Security:
ApiKey (readwrite)
path Parameters
approvalInstanceId
required
string

Approval Identifier for the entity

Responses
400

Bad Request

500

Internal Server Error

default

Returns the saved Approval Instance

get/pipeline/api/approvals/{approvalInstanceId}
Request samples
curl -i -X GET \
  https://app.harness.io/gateway/pipeline/api/approvals/:approvalInstanceId \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}