Catalog
create_environment
Write grant
Create an environment: a place products run, such as staging or production. Its class says whether it holds real customer data and never changes. No other environment, archived ones included, may use the slug or name. Returns the new environment. Needs write access.
Inputs
slugstringRequiredThe environment's slug: 2 to 48 lowercase letters, numbers or hyphens, such as staging.
namestringRequiredThe environment's display name, up to 80 characters, such as Staging.
classstringRequiredproduction for real customer data or the live system customers use; non-production for fake or disposable data, such as staging. It cannot change later.
One of
productionnon-productiondescriptionstringWhat the environment is for, up to 200 characters.
emojistringAn emoji shown with the name, up to 8 characters, such as 🧪.
tools/callJSON-RPC
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "create_environment", "arguments": { "slug": "staging", "name": "Staging", "class": "non-production", "description": "Pre-release builds with test data.", "emoji": "🧪" } }}POST/agent/v1/environments:create
curl -X POST https://api.qa.clankership.net/agent/v1/environments:create \ -H "Authorization: Bearer $CLANKER_AGENT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "slug": "staging", "name": "Staging", "class": "non-production", "description": "Pre-release builds with test data.", "emoji": "🧪" }'