Skip to content

Create an environment

POST
/repositories/{workspace}/{repo_slug}/environments

Create an environment.

workspace
required
string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

repo_slug
required
string

The repository.

The environment to create.

Media type application/json
object
type
required
string
uuid

The UUID identifying the environment.

string
name

The name of the environment.

string
Example generated
{
"type": "example",
"uuid": "example",
"name": "example"
}

The environment was created.

Media type application/json
object
type
required
string
uuid

The UUID identifying the environment.

string
name

The name of the environment.

string
Example generated
{
"type": "example",
"uuid": "example",
"name": "example"
}
Location
string

The URL of the newly created environment.

The account or repository does not exist.

Media type application/json
Error

Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.

object
type
required
string
error
object
message
required
string
detail
string
data

Optional structured data that is endpoint-specific.

object
key
additional properties
any
key
additional properties
any
Example generated
{
"type": "example",
"error": {
"message": "example",
"detail": "example",
"data": {}
}
}

An environment host with the provided name already exists.

Media type application/json
Error

Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.

object
type
required
string
error
object
message
required
string
detail
string
data

Optional structured data that is endpoint-specific.

object
key
additional properties
any
key
additional properties
any
Example generated
{
"type": "example",
"error": {
"message": "example",
"detail": "example",
"data": {}
}
}