approvals

Add a new Harness approval activity

Request
Security:
ApiKey (readwrite)
path Parameters
approvalInstanceId
required
string
Request Body schema:
action
required
string
Enum: "APPROVE" "REJECT"
Array of objects (ApproverInput)
comments
string
Responses
200

successful operation

400

Bad Request

500

Internal server error

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

Gets a Harness approval instance authorization for the current user

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

successful operation

400

Bad Request

500

Internal server error

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

Gets an approval instance by id

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

successful operation

400

Bad Request

500

Internal server error

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",
  • "data": {
    },
  • "metaData": { },
  • "correlationId": "string"
}

Gets the initial yaml snippet for approval stage

Request
Security:
ApiKey (readwrite)
query Parameters
approvalType
required
string
Enum: "HarnessApproval" "JiraApproval"
Responses
200

successful operation

400

Bad Request

500

Internal server error

get/pipeline/api/approvals/stage-yaml-snippet
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/pipeline/api/approvals/stage-yaml-snippet?approvalType=HarnessApproval' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "data": "string",
  • "metaData": { },
  • "correlationId": "string"
}