Admiral
Environments

Create an environment

POST
/v1/environments

Scope: env:write

Authorization

bearerAuth
AuthorizationBearer <token>

Personal Access Token (PAT) or Service Access Token (SAT). Pass the token in the Authorization header: Bearer admp_...

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

CreateEnvironmentRequest contains the parameters for creating a new environment.

Response Body

application/json

curl -X POST "https://example.com/v1/environments" \  -H "Content-Type: application/json" \  -d '{    "application_id": "48ac72d0-a829-4896-a067-dcb1c2b0f30c",    "name": "string"  }'
{  "environment": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "application_id": "48ac72d0-a829-4896-a067-dcb1c2b0f30c",    "name": "string",    "description": "string",    "labels": {      "property1": "string",      "property2": "string"    },    "has_pending_changes": true,    "last_deployed_at": "2023-01-15T01:30:15.01Z",    "created_by": {      "id": "string",      "display_name": "string",      "email": "string"    },    "created_at": "2023-01-15T01:30:15.01Z",    "updated_at": "2023-01-15T01:30:15.01Z"  }}