approvals

Approval service handles the approval API to approve or reject pipeline executions

List approvals

List all the approvals

Securityx-api-key
Request
path Parameters
org
required
string [ 1 .. 128 ] characters

Org is the organisation identifier.

Example: 3
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: 00e
query Parameters
limit
integer <int64> [ 1 .. 1000 ]
Default: 30

Limit is the number of records to return for a page.

Example: limit=30
page
integer <int64> >= 1
Default: 1

Page is the page number to return relative to the page 'limit'.

Example: page=1
workspace
string

Workspace identifier

Example: workspace=Sint accusamus qui accusantium autem facere iste.
pipeline_execution_id
string

Pipeline identifier

Example: pipeline_execution_id=Quia laudantium.
pipeline_stage_id
string

Pipeline stage identifier

Example: pipeline_stage_id=Et qui maxime quia.
status_type
string

Status of the approval step

Enum: "approved" "rejected" "pending"
Example: status_type=pending
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: ab
Responses
200

OK response.

400

BadRequestError: Bad Request response.

401

UnauthorizedError: Unauthorized response.

403

ForbiddenError: Forbidden response.

404

NotFoundError: Not Found response.

408

TimeoutError: Request Timeout response.

409

ConflictError: Conflict response.

423

LockedError: Locked response.

499

ContextCancelledError: response.

500

InternalServerError: Internal Server Error response.

502

BadGatewayError: Bad Gateway response.

get/iacm/api/orgs/{org}/projects/{project}/approvals
Request samples
Response samples
application/json
[
  • {
    },
  • {
    }
]

Create approval

Create an approval resource

Securityx-api-key
Request
path Parameters
org
required
string [ 1 .. 128 ] characters

Org is the organisation identifier.

Example: gy
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: iq
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: 5r6
Request Body schema: application/json
required
pipeline_execution_id
required
string

The unique identifier for the associated pipeline execution

pipeline_stage_id
required
string

The unique identifier for the associated pipeline execution stage

status
string
Default: "pending"

Status of the approval resource

Enum: "pending" "approved" "rejected"
workspace_id
required
string

The unique identifier for the workspace_id

Responses
200

OK response.

400

BadRequestError: Bad Request response.

401

UnauthorizedError: Unauthorized response.

403

ForbiddenError: Forbidden response.

404

NotFoundError: Not Found response.

408

TimeoutError: Request Timeout response.

409

ConflictError: Conflict response.

423

LockedError: Locked response.

499

ContextCancelledError: response.

500

InternalServerError: Internal Server Error response.

502

BadGatewayError: Bad Gateway response.

post/iacm/api/orgs/{org}/projects/{project}/approvals
Request samples
application/json
{
  • "pipeline_execution_id": "Voluptatem mollitia.",
  • "pipeline_stage_id": "Minus assumenda alias quod molestiae.",
  • "status": "rejected",
  • "workspace_id": "Adipisci est eum est ipsa dolor laborum."
}
Response samples
application/json
{
  • "id": "Incidunt ipsam ut."
}

Show approval

Retrieve a single approval

Securityx-api-key
Request
path Parameters
org
required
string [ 1 .. 128 ] characters

Org is the organisation identifier.

Example: 3
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: bmq
id
required
string <uuid>
Example: 6f66d9a7-9f45-40f2-8af5-6516000d8b98
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: z3c
Responses
200

OK response.

400

BadRequestError: Bad Request response.

401

UnauthorizedError: Unauthorized response.

403

ForbiddenError: Forbidden response.

404

NotFoundError: Not Found response.

408

TimeoutError: Request Timeout response.

409

ConflictError: Conflict response.

423

LockedError: Locked response.

499

ContextCancelledError: response.

500

InternalServerError: Internal Server Error response.

502

BadGatewayError: Bad Gateway response.

get/iacm/api/orgs/{org}/projects/{project}/approvals/{id}
Request samples
Response samples
application/json
{
  • "actioned_by": "John Doe",
  • "created": 4627659587543559000,
  • "status": "Eum alias ex molestiae adipisci odio ut.",
  • "updated": 4426769579491609000
}

Update approval

Update a single approval

Securityx-api-key
Request
path Parameters
org
required
string [ 1 .. 128 ] characters

Org is the organisation identifier.

Example: ddz
project
required
string [ 1 .. 128 ] characters

Project is the project identifier.

Example: ek
id
required
string <uuid>
Example: 337f16ff-cec4-45f5-92fc-4710f4b942c0
header Parameters
Harness-Account
required
string [ 1 .. 128 ] characters

Account is the internal customer account ID.

Example: ll
Request Body schema: application/json
required
actioned_by
string

User that approved/rejected the step

status
required
string
Default: "pending"

Status update to be performed upon the Approval step

Enum: "approved" "rejected" "pending"
Responses
200

OK response.

400

BadRequestError: Bad Request response.

401

UnauthorizedError: Unauthorized response.

403

ForbiddenError: Forbidden response.

404

NotFoundError: Not Found response.

408

TimeoutError: Request Timeout response.

409

ConflictError: Conflict response.

423

LockedError: Locked response.

499

ContextCancelledError: response.

500

InternalServerError: Internal Server Error response.

502

BadGatewayError: Bad Gateway response.

put/iacm/api/orgs/{org}/projects/{project}/approvals/{id}
Request samples
application/json
{
  • "actioned_by": "John Doe",
  • "status": "rejected"
}