Environments
Environments endpoints of the Ellipsis REST API.
To define it in a repository instead, commit a `kind: environment` YAML under an agents directory. 409 when another live environment already holds the name.
curl -X POST "https://api.ellipsis.dev/v1/environments" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"environment":"..."}'import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.environments.create("...")
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.environments.create({ environment: '...' });
console.log(result);Request
The environment's definition.
Responses
curl "https://api.ellipsis.dev/v1/environments" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY"import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.environments.list()
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.environments.list();
console.log(result);Responses
curl "https://api.ellipsis.dev/v1/environments/{environment_id}" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY"import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.environments.get("...")
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.environments.get('...');
console.log(result);Request
Responses
The whole definition is replaced, live at once — future sessions resolve the new body; running sessions keep the one frozen at their start. Only for environments managed through this API: one defined by a repository file is a 409.
curl -X PUT "https://api.ellipsis.dev/v1/environments/{environment_id}" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"environment":"..."}'import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.environments.update("...", "...")
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.environments.update('...', { environment: '...' });
console.log(result);Request
The environment's new definition. Replaces the previous one wholesale — this is not a partial update.
Responses
Always succeeds, even while agents still reference it — their next session start fails with a clear error naming the missing environment. Past sessions remain readable. Only for environments managed through this API — delete the file to remove one defined by a repository.
curl -X DELETE "https://api.ellipsis.dev/v1/environments/{environment_id}" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY"import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.environments.delete("...")
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.environments.delete('...');
console.log(result);Request
Responses
Addressed by rung: the account rung (repository omitted) or a repository rung ("owner/name"); the environment by id or name. Returns the full resulting ladder. Refused for sandbox tokens.
curl -X PUT "https://api.ellipsis.dev/v1/environments/defaults" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"environment":"..."}'import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.environments.defaults.set("...")
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.environments.defaults.set({ environment: '...' });
console.log(result);Request
The environment to make the default: an environment id, or its customer-unique name.
The rung to set: "owner/name" for a repo default; omit to set the account default. An unknown or foreign repo is a 404.
Responses
The account-wide default and the per-repository defaults, as environment ids. Repo rungs are keyed "owner/name".
curl "https://api.ellipsis.dev/v1/environments/defaults" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY"import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.environments.defaults.list()
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.environments.defaults.list();
console.log(result);Responses
Addressed by rung: the account rung (repository omitted) or a repository rung. Refused for sandbox tokens.
curl -X DELETE "https://api.ellipsis.dev/v1/environments/defaults" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY"import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.environments.defaults.delete()
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.environments.defaults.delete();
console.log(result);Request
Repo rung to clear ("owner/name"); omit to clear the account default.