Create an environment (the controller provisions its namespace).
const url = 'https://example.com/api/v1/projects/example/environments';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"prod","env_type":"standard","quota":{"cpu":"4","memory":"8Gi","pods":50}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/projects/example/environments \ --header 'Content-Type: application/json' \ --data '{ "name": "prod", "env_type": "standard", "quota": { "cpu": "4", "memory": "8Gi", "pods": 50 } }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project name
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”object
Short name used in URLs, e.g. prod.
Kubernetes object name, e.g. shop-prod.
standard, production or preview.
Pending, Ready, Terminating or Degraded.
When a soft-deleted environment will be purged.
Examplegenerated
{ "name": "example", "resource_name": "example", "project": "example", "env_type": "example", "namespace": "example", "phase": "example", "ready": true, "message": "example", "deleting": true, "deletion_scheduled_at": "example", "created_at": "example"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}No cluster configured
Problem Details body.
object
Stable machine-readable code, e.g. forbidden.
Short human readable title.
HTTP status.
Details, if safe to expose.
Example
{ "code": "forbidden"}