Skip to main content
GET
List environments

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

resourceType
enum<string>
required

Type of resource the environment belongs to. Only prompt (a canvas) is supported. Resource type an environment is attached to. Only canvases (prompt) are supported today.

Available options:
prompt
resourceId
string<uuid>
required

Canvas (prompt) ID.

Response

Environments of the canvas

id
string<uuid>
required
resourceType
enum<string>
required

Resource type an environment is attached to. Only canvases (prompt) are supported today.

Available options:
prompt
resourceId
string<uuid>
required

Canvas (prompt) ID

name
string
required

Environment name. Lowercase letters, digits and single hyphens between segments (no leading, trailing or consecutive hyphens), at most 64 characters. Leading/trailing whitespace is trimmed before validation.

production is the system environment every canvas has; it is the only reserved name you can publish to. The names production, promoted, latest and draft are reserved and cannot be used for custom environments, and a custom name cannot be a UUID.

The same rules apply to the environment_name field of POST /v2/chat/completions, which runs the version currently published to that environment of the given canvas_id (environment_name cannot be combined with version_id or application_id, and returns 404 when the environment does not exist or has no published version).

Maximum string length: 64
Pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
Example:

"staging"

isSystem
boolean
required

true for the built-in production environment, which cannot be deleted.

currentVersionId
string<uuid> | null
required

Version currently published to the environment, or null when nothing was published.

workspaceId
string<uuid>
required
createdBy
string
required

Email of the user or key that created the environment.

deletedBy
string | null
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
deletedAt
string<date-time> | null
required
currentVersion
object | null
required

Summary of the version currently published to an environment.

activePublication
object | null
required

The publication record that is currently active for the environment.