Approvals
Approval service handles the approval API to approve or reject pipeline executions
List all the approvals
Org is the organisation identifier.
oyProject is the project identifier.
ieLimit is the number of records to return for a page.
30Example: 30Page is the page number to return relative to the page 'limit'.
1Example: 1Workspace identifier
Reiciendis asperiores eveniet earum deserunt perspiciatis.Pipeline identifier
Inventore quaerat laudantium et repudiandae occaecati.Pipeline stage identifier
Itaque perspiciatis eum enim dolores quia voluptatum.Status of the approval step
rejectedPossible values: Account is the internal customer account ID.
cOK response.
BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
GET /api/orgs/{org}/projects/{project}/approvals HTTP/1.1
Host: localhost:80
Harness-Account: c
Accept: */*
[
{
"account": "kn8",
"actioned_by": "John Doe",
"actioned_by_email": "john.doe@example.com",
"created": 8923043851235030000,
"id": "Aliquid quia dignissimos aut accusamus voluptates rerum.",
"org": "1",
"pipeline_execution_id": "A tempora asperiores consectetur.",
"pipeline_stage_id": "Id consequatur atque.",
"project": "bcz",
"status": "Quam saepe sit magnam tenetur.",
"updated": 4501857522395362000,
"workspace_id": "Itaque sed eum."
},
{
"account": "kn8",
"actioned_by": "John Doe",
"actioned_by_email": "john.doe@example.com",
"created": 8923043851235030000,
"id": "Aliquid quia dignissimos aut accusamus voluptates rerum.",
"org": "1",
"pipeline_execution_id": "A tempora asperiores consectetur.",
"pipeline_stage_id": "Id consequatur atque.",
"project": "bcz",
"status": "Quam saepe sit magnam tenetur.",
"updated": 4501857522395362000,
"workspace_id": "Itaque sed eum."
},
{
"account": "kn8",
"actioned_by": "John Doe",
"actioned_by_email": "john.doe@example.com",
"created": 8923043851235030000,
"id": "Aliquid quia dignissimos aut accusamus voluptates rerum.",
"org": "1",
"pipeline_execution_id": "A tempora asperiores consectetur.",
"pipeline_stage_id": "Id consequatur atque.",
"project": "bcz",
"status": "Quam saepe sit magnam tenetur.",
"updated": 4501857522395362000,
"workspace_id": "Itaque sed eum."
}
]Create an approval resource
Org is the organisation identifier.
jProject is the project identifier.
knaAccount is the internal customer account ID.
vThe unique identifier for the associated pipeline execution
Molestiae consequatur ipsam fuga.The unique identifier for the associated pipeline execution stage
Mollitia dolor.Status of the approval resource
pendingExample: pendingPossible values: The unique identifier for the workspace_id
Aperiam consectetur et ut aperiam.OK response.
Create-ApprovalResponseBody result type (creation view)
Corporis ea eum est ullam in.BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
POST /api/orgs/{org}/projects/{project}/approvals HTTP/1.1
Host: localhost:80
Harness-Account: v
Content-Type: application/json
Accept: */*
Content-Length: 177
{
"pipeline_execution_id": "Ipsum quasi earum est nesciunt.",
"pipeline_stage_id": "Aliquam aut in ut nihil reiciendis.",
"status": "rejected",
"workspace_id": "Sed vel aperiam minus."
}{
"id": "Libero dolor voluptatibus ipsa ipsam."
}Retrieve a single approval
Org is the organisation identifier.
n2Project is the project identifier.
zbb091d10-0e9f-4333-91af-97e52e9e4889Account is the internal customer account ID.
i5sOK response.
Show-ApprovalResponseBody result type (statusInfo view)
User that approved/rejected the step
John DoeEmail of the user that approved/rejected the step
john.doe@example.comCreated is the unix timestamp at which the resource was originally created in milliseconds.
3754574567575199000Status of the approval resource
pendingExample: Fugiat facere aut corrupti voluptas animi quia.Modified is the unix timestamp at which the resource was last modified in milliseconds.
1306990353884779000BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
GET /api/orgs/{org}/projects/{project}/approvals/{id} HTTP/1.1
Host: localhost:80
Harness-Account: i5s
Accept: */*
{
"actioned_by": "John Doe",
"actioned_by_email": "john.doe@example.com",
"created": 4544608182846329000,
"status": "Corrupti et nihil voluptates cupiditate.",
"updated": 9114982333013444000
}Update a single approval
Org is the organisation identifier.
c9Project is the project identifier.
k9i3197ae50-2348-4357-ba8f-94e5c7115d09Account is the internal customer account ID.
25zUser that approved/rejected the step
John DoeEmail of the user that approved/rejected the step
john.doe@example.comStatus update to be performed upon the Approval step
pendingExample: rejectedPossible values: OK response.
No content
BadRequestError: Bad Request response.
UnauthorizedError: Unauthorized response.
ForbiddenError: Forbidden response.
NotFoundError: Not Found response.
TimeoutError: Request Timeout response.
ConflictError: Conflict response.
LockedError: Locked response.
ContextCancelledError: response.
InternalServerError: Internal Server Error response.
BadGatewayError: Bad Gateway response.
PUT /api/orgs/{org}/projects/{project}/approvals/{id} HTTP/1.1
Host: localhost:80
Harness-Account: 25z
Content-Type: application/json
Accept: */*
Content-Length: 89
{
"actioned_by": "John Doe",
"actioned_by_email": "john.doe@example.com",
"status": "rejected"
}No content
Last updated
Was this helpful?