Create environment
Creates an environment and starts it. It is PROVISIONING until it runs.
Creates an environment and starts it. It is PROVISIONING until it runs.
bearerAuthorizationBearer <token>An access token, or an API key.
project*stringThe project's ID.
^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$requestId?stringMakes retries safe: creating again with the same ID in the project returns the environment the first request created, rather than another.
uuidvalidateOnly?booleanChecks the environment, and the quotas it would take, without creating it.
application/json- body
diskGib?integerThe disk in GiB, from 10 to 500, and at most what the project's policies allow; 20 unless set. It never changes.
int320 <= value <= 500displayName*stringName shown in user interfaces.
1 <= length <= 63idleTimeoutSeconds?integerHow long, in seconds, the environment runs unused before kosem stops it: from 900 (15 minutes) to 14400 (4 hours), and an hour unless set, or the longest that the environments.maxIdleTimeout policy allows if less.
int640 <= value <= 14400image?stringContainer image reference, with a tag or digest; the configured kosem image unless set. The environment keeps it.
length <= 512memoryMib?integerMemory in MiB, from 1024 to 6656 for each vCPU, and at most what the environments.maxMemoryGib policy allows; 4096 for each vCPU unless set. It takes vcpus, and never changes.
int320 <= value <= 53248runnerPool?stringA runner pool to run in, on hosts of the organization's or the project's own, rather than on kosem's machines: the project's own, or one its organization shares with it. Its vCPUs and disk take none of the organization's quotas of them. It never changes.
length <= 200stoppedTtlSeconds?integerHow long, in seconds, the environment is kept stopped before kosem deletes it, with its disk: from 86400 (a day) to 2592000 (30 days). Unset, it is kept until someone deletes it, or, where the environments.maxStoppedTtl policy bounds it, as long as that allows. Setting it shorter than that takes environments.environments.delete.
int640 <= value <= 2592000vcpus?integerVirtual CPUs, from 1 to 8, and at most what the environments.maxVcpus policy allows; 2 unless set, or the most that the policies allow if less. It never changes.
int320 <= value <= 8Created
application/json- response
createTime*stringWhen the environment was created.
date-timedisplayName*stringName shown in user interfaces.
idleTimeoutSeconds*integerHow long, in seconds, the environment runs unused before kosem stops it, keeping its disk; 0 if kosem never does. Unused is since lastUsedTime, with no background job running whose end its owner is told of: a job that nobody waits for, such as a server, stops with it.
int64image*stringContainer image reference, with a tag or digest, which supplies the environment's OS, packages and tools; its entrypoint and command are not run. The environment keeps it; a digest makes restarts reproducible.
lastUsedTime?stringWhen the environment was last used: when its owner last started it, ran a command in it or reached its files, or a command last ran in it for a caller; absent until it is used. A background job that runs on in it doesn't use it.
date-timename*stringResource name, projects/{project_id}/environments/{environment_id}.
owner*stringThe principal that owns the environment, such as an agent, agent:{agent_id}, which alone runs commands in it and makes and starts it as it needs to; empty for environments that people create. People may still stop and delete it.
runner?stringThe runner of its pool that holds its disk, once kosem placed it.
runnerPool?stringThe runner pool it runs in, on hosts of its organization's or its project's own; absent on kosem's machines.
runningJobs?integerHow many background jobs run in the environment, such as servers and builds that its owner left running, as the environment last said; 0 unless it is RUNNING. Each runs until it ends, its owner ends it or the environment stops.
int32size*How large the environment and its disk are.
state*stringWhere the environment is in its lifecycle: PROVISIONING while its disk and compute are made, RUNNING, STOPPING while its compute is removed, STOPPED with only its disk, STARTING again on its disk, and DELETING with its disk.
"PROVISIONING""RUNNING""STOPPING""STOPPED""STARTING""DELETING"stateReason*stringWhat the environment waits for, such as capacity, or what keeps it from getting there, which it keeps trying past.
stoppedTtlSeconds*integerHow long, in seconds, the environment is kept stopped before kosem deletes it, with its disk; 0 if it is kept until someone deletes it.
int64updateTime*stringWhen the environment was last changed.
date-timecurl -X POST 'https://api.kosem.ai/v1/projects/string/environments' \
-H 'Content-Type: application/json' \
-d '{
"displayName": "string"
}'{
"createTime": "2019-08-24T14:15:22Z",
"displayName": "string",
"idleTimeoutSeconds": 0,
"image": "string",
"lastUsedTime": "2019-08-24T14:15:22Z",
"name": "string",
"owner": "string",
"runner": "string",
"runnerPool": "string",
"runningJobs": 0,
"size": {
"diskGib": 0,
"memoryMib": 0,
"vcpus": 0
},
"state": "PROVISIONING",
"stateReason": "string",
"stoppedTtlSeconds": 0,
"updateTime": "2019-08-24T14:15:22Z"
}