Environments

This API allows you to list, create, and update, and delete Environments.

List all Environments

SecuritybearerAuth
Request
path Parameters
teamSlug
required
string

The slug of the Team

query Parameters
page[next]
string

The string value of the next attribute from a previous result page. The cursor value must be empty or omitted for the first request of a cursor-paginated query.

Example: page[next]=eyxJjcmAVhdGVkX
page[size]
number [ 1 .. 100 ]
Default: 20

The number of entries to include per response. Maximum

Example: page[size]=10
Responses
200

Success

401

Unauthorized

403

Forbidden

404

Not Found

422

Validation Failed

429

RateLimited

500

InternalError

get/2/teams/{teamSlug}/environments
Request samples
Response samples
application/vnd.api+json
{
  • "data": [
    ],
  • "links": {
    }
}

Create an Environment

SecuritybearerAuth
Request
path Parameters
teamSlug
required
string

The slug of the Team

Request Body schema: application/vnd.api+json
required
required
object
Responses
201

Created

400

The provided request body was invalid. Most APIs will return a DetailedError for this condition, explaining what went wrong, but some older APIs only return a GenericError.

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict

413

The provided request body was over the maximum allowed size.

415

The provided request body had an invalid Content-Type.

422

Validation Failed

429

RateLimited

500

InternalError

post/2/teams/{teamSlug}/environments
Request samples
application/vnd.api+json
{
  • "data": {
    }
}
Response samples
application/vnd.api+json
{
  • "data": {
    }
}

Get an Environment

SecuritybearerAuth
Request
path Parameters
teamSlug
required
string

The slug of the Team

ID
required
string

A unique identifier

Responses
200

Success

400

The provided request body was invalid. Most APIs will return a DetailedError for this condition, explaining what went wrong, but some older APIs only return a GenericError.

401

Unauthorized

404

Not Found

429

RateLimited

500

InternalError

get/2/teams/{teamSlug}/environments/{ID}
Request samples
Response samples
application/vnd.api+json
{
  • "data": {
    }
}

Update an Environment

SecuritybearerAuth
Request
path Parameters
teamSlug
required
string

The slug of the Team

ID
required
string

A unique identifier

Request Body schema: application/vnd.api+json
required
required
object
Responses
200

Success

400

The provided request body was invalid. Most APIs will return a DetailedError for this condition, explaining what went wrong, but some older APIs only return a GenericError.

401

Unauthorized

403

Forbidden

404

Not Found

413

The provided request body was over the maximum allowed size.

415

The provided request body had an invalid Content-Type.

422

Validation Failed

429

RateLimited

500

InternalError

patch/2/teams/{teamSlug}/environments/{ID}
Request samples
application/vnd.api+json
{
  • "data": {
    }
}
Response samples
application/vnd.api+json
{
  • "data": {
    }
}

Delete an Environment

This deletes and immediately deactivates the Environment. This is an irreversible operation.

Environments with Deletion Protection enabled cannot be deleted. To delete an Environment with Deletion Protection enabled, first disable Deletion Protection by updating the Environment with settings.delete_protected = false.

SecuritybearerAuth
Request
path Parameters
teamSlug
required
string

The slug of the Team

ID
required
string

A unique identifier

Responses
204

No Content

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict

429

RateLimited

500

InternalError

delete/2/teams/{teamSlug}/environments/{ID}
Request samples
Response samples
{
  • "error": "unknown API key - check your credentials"
}