createEnvironment
Generate a new environment by specifying name, description, color, and associated notifications. Handles responses for success, unauthorized access, or invalid requests.
Instructions
Creates a new environment from provided data
Responses:
201 (Success): environment created
Content-Type:
application/vnd.api+json
Example:
{
"key": "value"
}
401: responds with unauthorized for invalid token
Content-Type:
application/vnd.api+json
Example:
{
"key": "value"
}
422: invalid request
Content-Type:
application/vnd.api+json
Example:
{
"key": "value"
}
Input Schema
Name | Required | Description | Default |
---|---|---|---|
data | Yes |
Input Schema (JSON Schema)
{
"properties": {
"data": {
"properties": {
"attributes": {
"additionalProperties": false,
"properties": {
"color": {
"description": "The hex color of the environment",
"nullable": true,
"type": "string"
},
"description": {
"description": "The description of the environment",
"nullable": true,
"type": "string"
},
"name": {
"description": "The name of the environment",
"type": "string"
},
"notify_emails": {
"description": "Emails to attach to the environment",
"items": {
"type": "string"
},
"nullable": true,
"type": "array"
},
"position": {
"description": "Position of the environment",
"nullable": true,
"type": "integer"
},
"slack_aliases": {
"description": "Slack Aliases associated with this environment",
"items": {
"properties": {
"id": {
"description": "Slack alias ID",
"type": "string"
},
"name": {
"description": "Slack alias name",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"nullable": true,
"type": "array"
},
"slack_channels": {
"description": "Slack Channels associated with this environment",
"items": {
"properties": {
"id": {
"description": "Slack channel ID",
"type": "string"
},
"name": {
"description": "Slack channel name",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"nullable": true,
"type": "array"
}
},
"required": [
"name"
],
"type": "object"
},
"type": {
"enum": [
"environments"
],
"type": "string"
}
},
"required": [
"type",
"attributes"
],
"type": "object"
}
},
"required": [
"data"
],
"type": "object"
}