Skip to content
NebulaCtrldocs
HTTP APIEndpoints

Variables

Variables at every tier, external resources and the references between them. Each operation lists its method and path, parameters, request body, responses and an example call.

GET/api/v1/environments/{id}/dependencies

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/environments/string/dependencies"
{  "$schema": "https://example.com/DependenciesBody.json",  "edges": [    {      "fromServiceId": "string",      "keys": [        "string"      ],      "toExternalResourceId": "string",      "toServiceId": "string"    }  ],  "sharedUsage": [    {      "key": "string",      "serviceIds": [        "string"      ]    }  ]}
GET/api/v1/environments/{id}/external-resources

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

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

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/environments/string/external-resources"
{  "$schema": "https://example.com/PageExternalResourceBody.json",  "items": [    {      "$schema": "https://example.com/ExternalResourceBody.json",      "createdAt": "2019-08-24T14:15:22Z",      "environmentId": "string",      "id": "string",      "kind": "string",      "name": "string",      "serviceIds": [        "string"      ],      "variables": {        "property1": "string",        "property2": "string"      }    }  ],  "nextCursor": "string"}
POST/api/v1/environments/{id}/external-resources

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/environments/string/external-resources" \  -H "Content-Type: application/json" \  -d '{    "kind": "postgres",    "name": "string",    "variables": {      "property1": "string",      "property2": "string"    }  }'
{  "$schema": "https://example.com/ExternalResourceBody.json",  "createdAt": "2019-08-24T14:15:22Z",  "environmentId": "string",  "id": "string",  "kind": "string",  "name": "string",  "serviceIds": [    "string"  ],  "variables": {    "property1": "string",    "property2": "string"  }}
GET/api/v1/environments/{id}/reference-targets

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

Environment id.

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/environments/string/reference-targets"
{  "$schema": "https://example.com/ReferenceTargetsBody.json",  "functions": [    {      "arg": {        "default": 0,        "max": 0,        "min": 0,        "name": "string"      },      "description": "string",      "name": "string",      "signature": "string"    }  ],  "targets": [    {      "keys": [        {          "key": "string",          "secret": true,          "tier": "service"        }      ],      "kind": "postgres",      "name": "string",      "serviceId": "string",      "slug": "string",      "staged": true    }  ]}
GET/api/v1/environments/{id}/variables

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

Query Parameters

serviceId?string
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

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/environments/string/variables"
{  "$schema": "https://example.com/PageVariableBody.json",  "items": [    {      "empty": true,      "environmentId": "string",      "id": "string",      "key": "string",      "managedBy": "repo-config",      "managedCommit": "string",      "managedPath": "string",      "scope": "project",      "secret": true,      "serviceId": "string",      "updatedAt": "2019-08-24T14:15:22Z",      "value": "string"    }  ],  "nextCursor": "string"}
PUT/api/v1/environments/{id}/variables

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.

[index: integer]?

Response Body

application/json

application/problem+json

curl -X PUT "https://example.com/api/v1/environments/string/variables" \  -H "Content-Type: application/json" \  -d '[    {      "key": "string",      "secret": true,      "value": "string"    }  ]'
{  "$schema": "https://example.com/SetVariablesOutputBody.json",  "items": [    {      "empty": true,      "environmentId": "string",      "id": "string",      "key": "string",      "managedBy": "repo-config",      "managedCommit": "string",      "managedPath": "string",      "scope": "project",      "secret": true,      "serviceId": "string",      "updatedAt": "2019-08-24T14:15:22Z",      "value": "string"    }  ]}
PATCH/api/v1/external-resources/{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

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PATCH "https://example.com/api/v1/external-resources/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "$schema": "https://example.com/ExternalResourceBody.json",  "createdAt": "2019-08-24T14:15:22Z",  "environmentId": "string",  "id": "string",  "kind": "string",  "name": "string",  "serviceIds": [    "string"  ],  "variables": {    "property1": "string",    "property2": "string"  }}
DELETE/api/v1/external-resources/{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/problem+json

curl -X DELETE "https://example.com/api/v1/external-resources/string"
Empty
PUT/api/v1/external-resources/{id}/links

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 PUT "https://example.com/api/v1/external-resources/string/links" \  -H "Content-Type: application/json" \  -d '{    "serviceIds": [      "string"    ]  }'
{  "$schema": "https://example.com/LinksOutputBody.json",  "serviceIds": [    "string"  ]}
GET/api/v1/projects/{id}/variables

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

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

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/projects/string/variables"
{  "$schema": "https://example.com/PageVariableBody.json",  "items": [    {      "empty": true,      "environmentId": "string",      "id": "string",      "key": "string",      "managedBy": "repo-config",      "managedCommit": "string",      "managedPath": "string",      "scope": "project",      "secret": true,      "serviceId": "string",      "updatedAt": "2019-08-24T14:15:22Z",      "value": "string"    }  ],  "nextCursor": "string"}
PUT/api/v1/projects/{id}/variables

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.

[index: integer]?

Response Body

application/json

application/problem+json

curl -X PUT "https://example.com/api/v1/projects/string/variables" \  -H "Content-Type: application/json" \  -d '[    {      "key": "string",      "secret": true,      "value": "string"    }  ]'
{  "$schema": "https://example.com/SetVariablesOutputBody.json",  "items": [    {      "empty": true,      "environmentId": "string",      "id": "string",      "key": "string",      "managedBy": "repo-config",      "managedCommit": "string",      "managedPath": "string",      "scope": "project",      "secret": true,      "serviceId": "string",      "updatedAt": "2019-08-24T14:15:22Z",      "value": "string"    }  ]}

Delete one variable.

DELETE/api/v1/variables/{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/problem+json

curl -X DELETE "https://example.com/api/v1/variables/string"
Empty
POST/api/v1/variables/{id}/reveal

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 POST "https://example.com/api/v1/variables/string/reveal"
{  "$schema": "https://example.com/RevealOutputBody.json",  "value": "string"}