ApiManagementV1WorkspacesWorkspaceidEnvironments
Create a new environment
AuthorizationBearer <token>
Management token (nhm_...)
In: header
Path Parameters
workspaceIdstring
namestring
Length
1 <= length <= 50slugstring
Length
2 <= length <= 50Response Body
curl -X POST "https://loading/management/v1/workspaces/string/environments" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "slug": "string" }'{
"id": "string",
"name": "string",
"slug": "string",
"isDefault": true,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "validation_error",
"message": "Slug must be 2-50 characters, lowercase alphanumeric and hyphens only"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid authorization header"
}
}{
"error": {
"code": "token_disabled",
"message": "Management token is disabled"
}
}{
"error": {
"code": "conflict",
"message": "An environment with this slug already exists"
}
}