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/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,  "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,  "idleTtlSeconds": 86400}