For the complete documentation index, see llms.txt. This page is also available as Markdown.

GraphQL API

The GraphQL API provides mutations for environment lifecycle management and AI configuration, plus queries for listing accounts, apps, environments, and repositories. Use GraphQL when you need to pause, resume, or delete environments, or when you need complex queries with nested data.

When to use GraphQL vs REST: Use the GraphQL API for environment lifecycle mutations (pause, resume, delete, deploy) and for queries that benefit from selecting specific fields. Use the REST Platform API for resource CRUD operations and the AI Sandbox API for sandbox session management.

Endpoint

POST https://api.release.com/graphql

Authentication

Authenticate using headers from your ~/.release.yaml file. To set this up, install the Release CLI and run release auth login.

Header
Description

X-User-Email

User email from ~/.release.yaml (login field)

X-User-Token

User token from ~/.release.yaml (token field)

Headers

Header
Value

Content-Type

application/json

X-User-Email

Your user email

X-User-Token

Your user token

Mutations

environmentsPause

Pause an environment.

Input:

Field
Type
Required
Description

id

ID!

Yes

The ID of the environment to pause

Response:

Field
Type
Description

environment.id

ID

The environment ID

environment.state

String

The current state of the environment

Example:


environmentsResume

Resume a paused environment.

Input:

Field
Type
Required
Description

id

ID!

Yes

The ID of the environment to resume

Response:

Field
Type
Description

environment.id

ID

The environment ID

environment.state

String

The current state of the environment

Example:


environmentsDelete

Delete an environment.

Input:

Field
Type
Required
Description

id

ID!

Yes

The ID of the environment to delete

Response:

Field
Type
Description

environment.id

ID

The environment ID

environment.state

String

The current state of the environment

Example:


environmentsSetup

Deploy or setup an environment.

Input:

Field
Type
Required
Description

id

ID!

Yes

The ID of the environment to deploy

initiationType

String

No

The initiation type (e.g., "manual")

Response:

Field
Type
Description

environment.id

ID

The environment ID

environment.state

String

The current state of the environment

Example:


aiConfigurationsCreate

Create an AI configuration.

Input:

Field
Type
Required
Description

input

AiConfigurationsCreateInput!

Yes

The AI configuration parameters

Response:

Field
Type
Description

configuration

Object

The created AI configuration object

Example:


aiConfigurationsDelete

Delete an AI configuration.

Input:

Field
Type
Required
Description

id

ID!

Yes

The ID of the AI configuration to delete

Response:

Field
Type
Description

confirmation

Object

Confirmation of deletion

Example:


aiSandboxesCreateSession

Create an AI sandbox session via GraphQL.

Input:

Field
Type
Required
Description

input

AiSandboxesCreateSessionInput!

Yes

The sandbox session parameters

The AiSandboxesCreateSessionInput accepts resources using the AiSandboxResourceInput type:

Response:

Field
Type
Description

session.id

ID

The session ID

session.title

String

The session title

session.state

String

The current state of the session

session.sandboxClaimName

String

The sandbox claim name

session.startedAt

String

Timestamp when the session started

session.environment.id

ID

The associated environment ID

session.environment.handle

String

The environment handle

session.environment.name

String

The environment name

session.resources

[Object]

List of session resources

session.resources[].id

ID

The resource ID

session.resources[].resourceType

String

The type of resource

session.resources[].state

String

The resource state

session.resources[].mountPath

String

The mount path for the resource

session.resources[].config

Object

Resource configuration

session.resources[].status

Object

Resource status

userErrors

[Object]

List of validation errors

userErrors[].field

String

The field that caused the error

userErrors[].message

String

The error message

Example:

Queries

workspaces

List accounts and workspaces.

Arguments:

No required arguments.

Response:

Field
Type
Description

workspaces

[Object]

Array of workspace objects

Example:


apps

List applications.

Arguments:

Field
Type
Required
Description

accountId

ID!

Yes

The account ID to list apps for

filters

Object

No

Optional filters to narrow results

Response:

Field
Type
Description

apps

[Object]

Array of application objects

Example:


environments

List environments with details.

Arguments:

Field
Type
Required
Description

appId

ID!

Yes

The application ID to list environments for

filters

Object

No

Optional filters to narrow results

Response:

Field
Type
Description

environments

[Object]

Array of environment objects with full details

Example:


repositories

List available repositories.

Arguments:

Field
Type
Required
Description

accountId

ID!

Yes

The account ID to list repositories for

Response:

Field
Type
Description

repositories

[Object]

Array of repository objects

Example:


repository

Get repository details with branches.

Arguments:

Field
Type
Required
Description

id

ID!

Yes

The repository ID

Response:

Field
Type
Description

repository

Object

Repository object with branches and paths

Example:

Last updated

Was this helpful?