Skip to content
NebulaCtrldocs
HTTP APIEndpoints

Previews

Pull request preview environments of a project. Each operation lists its method and path, parameters, request body, responses and an example call.

GET/api/v1/environments/{id}/preview/services

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/preview/services"
{  "$schema": "https://example.com/PreviewServicesOutputBody.json",  "services": [    {      "commitSha": "string",      "forced": true,      "name": "string",      "reason": "string",      "serviceId": "string",      "slug": "string",      "state": "deployed"    }  ]}
POST/api/v1/environments/{id}/preview/services/{serviceId}/deploy

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

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/environments/string/preview/services/string/deploy"
{  "$schema": "https://example.com/DeployAnywayOutputBody.json",  "started": [    "string"  ]}
GET/api/v1/projects/{id}/previews

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/projects/string/previews"
{  "$schema": "https://example.com/PreviewSettingsBody.json",  "baseEnvironmentId": "string",  "enabled": true,  "focused": true,  "idleTtlSeconds": 86400}
PUT/api/v1/projects/{id}/previews

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/projects/string/previews" \  -H "Content-Type: application/json" \  -d '{    "enabled": true,    "idleTtlSeconds": 86400  }'
{  "$schema": "https://example.com/PreviewSettingsBody.json",  "baseEnvironmentId": "string",  "enabled": true,  "focused": true,  "idleTtlSeconds": 86400}
GET/api/v1/services/{id}/watch-paths

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/services/string/watch-paths"
{  "$schema": "https://example.com/WatchPathsBody.json",  "watchPaths": [    "string"  ]}
PUT/api/v1/services/{id}/watch-paths

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/services/string/watch-paths" \  -H "Content-Type: application/json" \  -d '{    "watchPaths": [      "string"    ]  }'
{  "$schema": "https://example.com/WatchPathsBody.json",  "watchPaths": [    "string"  ]}