Skip to content
NebulaCtrldocs
HTTP APIEndpoints

Approvals

Approvals that hold a change to a protected environment until a person decides. Each operation lists its method and path, parameters, request body, responses and an example call.

GET/api/v1/approvals

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Query Parameters

cursor?string

Opaque cursor from a previous response's nextCursor. Omit for the first page.

limit?integer

How many items to return.

Formatint64
Range1 <= value <= 200
Default50
state?string
Default"pending"

Value in

  • "pending"
  • "decided"

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/approvals"
{  "$schema": "https://example.com/PageApprovalDTO.json",  "items": [    {      "$schema": "https://example.com/ApprovalDTO.json",      "changeSetId": "string",      "createdAt": "2019-08-24T14:15:22Z",      "decidedAt": "2019-08-24T14:15:22Z",      "decidedBy": "string",      "decision": "string",      "diff": null,      "environmentId": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "id": "string",      "impact": null,      "kind": "deploy",      "reason": "string",      "requestedBy": "string",      "target": null    }  ],  "nextCursor": "string"}
GET/api/v1/approvals/{id}

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/approvals/string"
{  "$schema": "https://example.com/ApprovalDetailDTO.json",  "blastRadius": [    {      "id": "string",      "name": "string",      "slug": "string"    }  ],  "changeSetId": "string",  "checks": [    {      "detail": "string",      "durationSeconds": 0,      "id": "build",      "status": "passed"    }  ],  "commits": [    {      "at": "2019-08-24T14:15:22Z",      "author": "string",      "message": "string",      "sha": "string",      "url": "string"    }  ],  "createdAt": "2019-08-24T14:15:22Z",  "decidedAt": "2019-08-24T14:15:22Z",  "decidedBy": "string",  "decision": "string",  "diff": null,  "environmentId": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "id": "string",  "impact": null,  "kind": "deploy",  "reason": "string",  "requestedBy": "string",  "target": null}
POST/api/v1/approvals/{id}/decide

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/approvals/string/decide" \  -H "Content-Type: application/json" \  -d '{    "decision": "approved"  }'
{  "$schema": "https://example.com/ApprovalDTO.json",  "changeSetId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "decidedAt": "2019-08-24T14:15:22Z",  "decidedBy": "string",  "decision": "string",  "diff": null,  "environmentId": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "id": "string",  "impact": null,  "kind": "deploy",  "reason": "string",  "requestedBy": "string",  "target": null}