Skip to main content
POST
/
v1
/
environments
Create an environment
curl --request POST \
  --url https://api.app.chainloop.dev/v1/environments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "ENVIRONMENT_TYPE_UNSPECIFIED",
  "description": "<string>",
  "logical_environment_id": "<string>"
}
'
{
  "environment": {
    "updated_at": "2000-01-23T04:56:07.000Z",
    "organization_id": "organization_id",
    "name": "name",
    "description": "description",
    "created_at": "2000-01-23T04:56:07.000Z",
    "id": "id",
    "logical_environment": {
      "updated_at": "2000-01-23T04:56:07.000Z",
      "organization_id": "organization_id",
      "name": "name",
      "description": "description",
      "created_at": "2000-01-23T04:56:07.000Z",
      "id": "id"
    },
    "type": "ENVIRONMENT_TYPE_UNSPECIFIED"
  }
}

Authorizations

Authorization
string
header
required

Bearer token for authentication

Body

application/json
name
string
type
enum<string>
default:ENVIRONMENT_TYPE_UNSPECIFIED
Available options:
ENVIRONMENT_TYPE_UNSPECIFIED,
ENVIRONMENT_TYPE_KUBERNETES,
ENVIRONMENT_TYPE_ECS,
ENVIRONMENT_TYPE_SERVER,
ENVIRONMENT_TYPE_LAMBDA,
ENVIRONMENT_TYPE_CUSTOM
description
string
logical_environment_id
string

Response

A successful response.

environment
Environment represents an environment entity · object
Example:
{
"updated_at": "2000-01-23T04:56:07.000Z",
"organization_id": "organization_id",
"name": "name",
"description": "description",
"created_at": "2000-01-23T04:56:07.000Z",
"id": "id",
"logical_environment": {
"updated_at": "2000-01-23T04:56:07.000Z",
"organization_id": "organization_id",
"name": "name",
"description": "description",
"created_at": "2000-01-23T04:56:07.000Z",
"id": "id"
},
"type": "ENVIRONMENT_TYPE_UNSPECIFIED"
}