Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

feat: sync API specs from infra and belt with Copybara (#1564)

Mish Ushakov4fcf7cb1504e
diff --git a/.changeset/lucky-donuts-fetch.md b/.changeset/lucky-donuts-fetch.md
new file mode 100644
index 000000000..32637b18d
--- /dev/null
+++ b/.changeset/lucky-donuts-fetch.md
@@ -0,0 +1,6 @@
+---
+'e2b': patch
+'@e2b/python-sdk': patch
+---
+
+Regenerate API clients from the latest specs, which are now synced with Copybara from their source-of-truth repositories (e2b-dev/infra@e2255f0 for the REST and envd specs, belt for the volume-content spec) instead of being copied by hand. Picks up the latest spec changes: named `SandboxTimeoutRequest`/`SandboxSnapshotRequest`/`SandboxRefreshRequest` request schemas, `SandboxNetworkConfig` and `SandboxIam` workload-identity models, the `FILE_TYPE_SYMLINK` filesystem entry type, and deprecation of access-token auth in favor of API keys. Anything the upstream specs mark `x-not-implemented: true` (currently the SOCKS5 egress-proxy config) is excluded from the generated clients. Generated Python client models now list fields in spec order instead of alphabetical order (the tag filtering moved from a custom script to Redocly CLI); construct them with keyword arguments if you don't already
diff --git a/.changeset/symlink-file-type.md b/.changeset/symlink-file-type.md
new file mode 100644
index 000000000..bd188ef08
--- /dev/null
+++ b/.changeset/symlink-file-type.md
@@ -0,0 +1,6 @@
+---
+'e2b': minor
+'@e2b/python-sdk': minor
+---
+
+Add `FileType.SYMLINK` to the sandbox filesystem types. Newer envd versions report symlinks with a dedicated `FILE_TYPE_SYMLINK` entry type; previously the SDKs treated it as unknown, so `files.list()` silently omitted symlink entries and `getInfo()`/`get_info()` returned an `undefined`/`None` type for them. Symlinks now surface as `FileType.SYMLINK` (`'symlink'`) with `symlinkTarget`/`symlink_target` populated, in JS and both sync and async Python.
diff --git a/.github/workflows/codegen_image_cache.yml b/.github/workflows/codegen_image_cache.yml
index 23d108888..0155533b5 100644
--- a/.github/workflows/codegen_image_cache.yml
+++ b/.github/workflows/codegen_image_cache.yml
@@ -1,13 +1,15 @@
name: Codegen image cache
-# Seeds the buildkit cache for codegen.Dockerfile from main so pull request
-# runs of generated_files.yml warm-start. PR-scoped cache writes are not
-# readable by other PRs, so main is the only scope worth writing to.
+# Seeds the buildkit caches for codegen.Dockerfile and copybara.Dockerfile
+# from main so pull request runs of generated_files.yml warm-start. PR-scoped
+# cache writes are not readable by other PRs, so main is the only scope worth
+# writing to.
on:
push:
branches: [main]
paths:
- 'codegen.Dockerfile'
+ - 'copybara.Dockerfile'
- '.github/workflows/codegen_image_cache.yml'
workflow_dispatch:
@@ -32,3 +34,11 @@ jobs:
file: codegen.Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
+
+ - name: Build copybara image and export cache
+ uses: docker/build-push-action@v6
+ with:
+ context: .
+ file: copybara.Dockerfile
+ cache-from: type=gha,scope=copybara
+ cache-to: type=gha,mode=max,scope=copybara
diff --git a/.github/workflows/generated_files.yml b/.github/workflows/generated_files.yml
index 772c48fda..83cb845b5 100644
--- a/.github/workflows/generated_files.yml
+++ b/.github/workflows/generated_files.yml
@@ -25,6 +25,10 @@ jobs:
generated:
- 'spec/**/!(*.md)'
- 'codegen.Dockerfile'
+ - 'copybara.Dockerfile'
+ - 'copy.bara.sky'
+ - 'redocly.yaml'
+ - 'scripts/fetch-spec.sh'
- 'Makefile'
- 'packages/**/!(*.md)'
- 'pnpm-lock.yaml'
@@ -86,8 +90,43 @@ jobs:
# the repo's 10 GB Actions cache, evicting other caches.
cache-from: type=gha
+ - name: Build copybara image with caching
+ uses: docker/build-push-action@v6
+ with:
+ context: .
+ file: copybara.Dockerfile
+ tags: e2b-copybara:latest
+ load: true # makes the image available for `docker run`
+ # Cache is seeded from main by codegen_image_cache.yml (see the
+ # cache-to note above for why there is no cache-to here).
+ cache-from: type=gha,scope=copybara
+
+ # scripts/fetch-spec.sh needs read access to the private e2b-dev/belt
+ # repo to fetch the volume-content spec. The default `secrets.GITHUB_TOKEN`
+ # is scoped to this repository only, so mint a short-lived token from
+ # the Autofixer GitHub App instead, scoped to every repo the fetches
+ # touch. Fork PRs have no access to the App secret, so they skip the
+ # mint, run the public infra fetches with the default token, and fall
+ # back to the tracked volume-content spec (make fetch-specs warns
+ # instead of failing).
+ - name: Generate token for spec repos
+ id: spec-repos-token
+ if: github.event.pull_request.head.repo.full_name == github.repository
+ uses: actions/create-github-app-token@v2
+ with:
+ app-id: ${{ vars.AUTOFIXER_APP_ID }}
+ private-key: ${{ secrets.AUTOFIXER_APP_SECRET }}
+ owner: e2b-dev
+ repositories: belt,infra
+ permission-contents: read
+
- name: Run codegen
- run: CODEGEN_IMAGE=codegen-env:latest make codegen
+ env:
+ GITHUB_TOKEN: ${{ steps.spec-repos-token.outputs.token || github.token }}
+ run: |
+ CODEGEN_IMAGE=codegen-env:latest \
+ COPYBARA_IMAGE=e2b-copybara:latest \
+ make codegen
- name: Check for uncommitted changes
run: |
diff --git a/.gitignore b/.gitignore
index 7ccb79cde..7ab229f28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -293,5 +293,8 @@ cython_debug/
sdk_ref/
sdkRefRoutes.json
-# SDK Client generated spec
+# SDK Client generated specs (per-SDK redocly bundle outputs; the bare
+# openapi_generated.yml pattern covers stale copies from older checkouts)
+spec/openapi_generated.*.yml
spec/openapi_generated.yml
+
diff --git a/CLAUDE.md b/CLAUDE.md
index 792513511..45cca0f90 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -1,7 +1,7 @@
Use pnpm for node and uv for python to install and update dependencies.
Run `pnpm run format`, `pnpm run lint` and `pnpm run typecheck` before committing changes.
When modifying the SDK packages, ensure equivalent changes are applied to both JS as well as sync and async Python implementations.
-To re-generate the API client run `make codegen` in the repository root when modifying spec/.
+Never edit the API, envd, or volume-content specs in spec/ by hand; they are synced with Copybara from e2b-dev/infra and e2b-dev/belt at the commits pinned in spec/infra-ref and spec/belt-ref (see copy.bara.sky and spec/README.md). To update the specs, bump the pins and re-run `make codegen`, which re-fetches them before generating.
Create or update tests covering affected codepaths and run them using `pnpm run test`.
Generate a changeset when updating packages/cli, packages/js-sdk, packages/python-sdk with `pnpm changeset` in the repository root.
When creating a pull request, add usage examples for user-facing changes to the PR description.
diff --git a/Makefile b/Makefile
index 1027af6cd..de5b1abee 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,25 @@
+# Specs are fetched from their source-of-truth repositories (e2b-dev/infra
+# and e2b-dev/belt) at the commits pinned in spec/infra-ref and spec/belt-ref.
+# To update the specs, bump the pins and re-run `make codegen`.
+# When a fetch fails (no GitHub token, no access to the private belt repo),
+# fall back to the tracked copy in spec/ with a warning.
+.PHONY: fetch-specs
+fetch-specs:
+ @for spec in api-spec envd-spec volume-api-spec; do \
+ ./scripts/fetch-spec.sh $$spec || \
+ echo "WARNING: could not fetch $$spec; using the tracked copy in spec/"; \
+ done
+
+# Set CODEGEN_IMAGE to skip the image build and use a prebuilt image instead
+# (CI builds it separately with a warm buildkit cache).
.PHONY: codegen
-codegen:
+codegen: fetch-specs
+ifeq ($(CODEGEN_IMAGE),)
@echo "Building codegen image"
docker build -q -t codegen-env . -f codegen.Dockerfile
+endif
@echo "Generating code"
- docker run -v $$PWD:/workspace codegen-env make generate
+ docker run -v $$PWD:/workspace $(or $(CODEGEN_IMAGE),codegen-env) make generate
generate: generate-js generate-python
diff --git a/codegen.Dockerfile b/codegen.Dockerfile
index a0edd23c6..608bea218 100644
--- a/codegen.Dockerfile
+++ b/codegen.Dockerfile
@@ -21,7 +21,7 @@ ENV PATH="/go/bin:${PATH}"
# https://github.com/openapi-generators/openapi-python-client/pull/1296
# protoc-gen-py generates the Python envd protobuf-py messages and
# protoc-gen-connectrpc the Connect stubs.
-RUN pip install black==26.3.1 pyyaml==6.0.2 e2b-openapi-python-client==0.26.2 datamodel-code-generator==0.34.0 protoc-gen-connectrpc==0.11.1 protoc-gen-py==0.1.1
+RUN pip install black==26.3.1 e2b-openapi-python-client==0.26.2 datamodel-code-generator==0.34.0 protoc-gen-connectrpc==0.11.1 protoc-gen-py==0.1.1
# Install Node.js (pinned to match .tool-versions)
ENV NODE_VERSION=22.18.0
@@ -38,6 +38,7 @@ ENV PNPM_VERSION=9.15.5
RUN npm install -g \
pnpm@${PNPM_VERSION} \
@connectrpc/[email protected] \
- @bufbuild/[email protected]
+ @bufbuild/[email protected] \
CMD ["make", "generate"]
diff --git a/copy.bara.sky b/copy.bara.sky
new file mode 100644
index 000000000..19c82656e
--- /dev/null
+++ b/copy.bara.sky
@@ -0,0 +1,79 @@
+# Copybara config that imports API specs from their source-of-truth
+# repositories into spec/. The imported files are tracked here but must not
+# be edited by hand — `make codegen` re-fetches the infra ones at the commit
+# pinned in spec/infra-ref before generating the clients, and the
+# generated-files CI check fails if the tracked copies don't match the pin.
+# See spec/README.md.
+#
+# scripts/fetch-spec.sh runs these workflows with `--folder-dir` pointing at
+# spec/ itself. Each workflow's destination_files glob declares the spec/
+# paths its upstream owns: after a successful fetch, Copybara replaces
+# exactly those paths (so files deleted upstream are deleted here too) and
+# leaves the repo-owned files in spec/ untouched.
+
+INFRA_REPO = "https://github.com/e2b-dev/infra.git"
+BELT_REPO = "https://github.com/e2b-dev/belt.git"
+
+AUTHORING = authoring.pass_thru("E2B <[email protected]>")
+
+# REST API spec -> spec/openapi.yml
+core.workflow(
+ name = "api-spec",
+ origin = git.github_origin(
+ url = INFRA_REPO,
+ ),
+ destination = folder.destination(),
+ origin_files = glob(["spec/openapi.yml"]),
+ destination_files = glob(["openapi.yml"]),
+ authoring = AUTHORING,
+ mode = "SQUASH",
+ transformations = [
+ core.move("spec/openapi.yml", "openapi.yml"),
+ ],
+)
+
+# envd spec (HTTP API + protobufs) -> spec/envd/
+core.workflow(
+ name = "envd-spec",
+ origin = git.github_origin(
+ url = INFRA_REPO,
+ ),
+ destination = folder.destination(),
+ origin_files = glob(
+ [
+ "packages/envd/spec/envd.yaml",
+ "packages/envd/spec/filesystem/**",
+ "packages/envd/spec/process/**",
+ ],
+ # This repo has its own buf generation templates in spec/envd.
+ exclude = ["packages/envd/spec/buf*.yaml"],
+ ),
+ destination_files = glob([
+ "envd/envd.yaml",
+ "envd/filesystem/**",
+ "envd/process/**",
+ ]),
+ authoring = AUTHORING,
+ mode = "SQUASH",
+ transformations = [
+ core.move("packages/envd/spec", "envd"),
+ ],
+)
+
+# Volume-content API spec -> spec/openapi-volumecontent.yml
+# belt is private, so the fetch authenticates with a GitHub token
+# (see scripts/fetch-spec.sh).
+core.workflow(
+ name = "volume-api-spec",
+ origin = git.github_origin(
+ url = BELT_REPO,
+ ),
+ destination = folder.destination(),
+ origin_files = glob(["packages/volume-content/openapi.yml"]),
+ destination_files = glob(["openapi-volumecontent.yml"]),
+ authoring = AUTHORING,
+ mode = "SQUASH",
+ transformations = [
+ core.move("packages/volume-content/openapi.yml", "openapi-volumecontent.yml"),
+ ],
+)
diff --git a/copybara.Dockerfile b/copybara.Dockerfile
new file mode 100644
index 000000000..ade00f320
--- /dev/null
+++ b/copybara.Dockerfile
@@ -0,0 +1,27 @@
+FROM eclipse-temurin:21-jre
+
+RUN apt-get update && apt-get install -y --no-install-recommends git && \
+ rm -rf /var/lib/apt/lists/*
+
+# gh serves as the git credential helper for private origins; it reads the
+# token from GH_TOKEN in the environment.
+ENV GH_VERSION=2.96.0
+RUN ARCH=$(uname -m) && \
+ case "$ARCH" in \
+ x86_64) GH_ARCH="amd64" ;; \
+ arm64|aarch64) GH_ARCH="arm64" ;; \
+ *) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
+ esac && \
+ curl -fsSL https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_${GH_ARCH}.tar.gz | \
+ tar -xz --strip-components=2 -C /usr/local/bin gh_${GH_VERSION}_linux_${GH_ARCH}/bin/gh && \
+ git config --system credential.helper '!gh auth git-credential'
+
+ENV COPYBARA_VERSION=v20260720
+ENV COPYBARA_SHA256=e94448c702addc17cfc45d4bbfc8509d458b9a25f4715e3e77207ad570e1075d
+RUN curl -fsSL -o /opt/copybara.jar \
+ https://github.com/google/copybara/releases/download/${COPYBARA_VERSION}/copybara_deploy.jar && \
+ echo "${COPYBARA_SHA256} /opt/copybara.jar" | sha256sum -c -
+
+WORKDIR /workspace
+
+ENTRYPOINT ["java", "-jar", "/opt/copybara.jar"]
diff --git a/package.json b/package.json
index a5d419c05..d4d5a3447 100644
--- a/package.json
+++ b/package.json
@@ -7,6 +7,9 @@
"test": "pnpm test --recursive --if-present",
"rm-node-modules": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +",
"pnpm-install-hack": "cd packages/js-sdk && sed -i '' 's/\"version\": \".*\"/\"version\": \"9.9.9\"/g' package.json && cd ../.. && pnpm i && git checkout -- packages/js-sdk/package.json",
+ "fetch:api-spec": "./scripts/fetch-spec.sh api-spec",
+ "fetch:envd-spec": "./scripts/fetch-spec.sh envd-spec",
+ "fetch:volume-spec": "./scripts/fetch-spec.sh volume-api-spec",
"lint": "pnpm --if-present --recursive run lint",
"typecheck": "pnpm --if-present --recursive run typecheck",
"format": "pnpm --if-present --recursive run format",
diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json
index 39be9a578..fd1500261 100644
--- a/packages/js-sdk/package.json
+++ b/packages/js-sdk/package.json
@@ -29,7 +29,7 @@
"example": "tsx example.mts",
"test": "vitest run",
"generate": "npm-run-all generate:* && pnpm run format",
- "generate:api": "python ./../../spec/remove_extra_tags.py sandboxes snapshots templates tags auth volumes && openapi-typescript ../../spec/openapi_generated.yml -x api_key --array-length --alphabetize --default-non-nullable false --output src/api/schema.gen.ts",
+ "generate:api": "redocly bundle js-sdk --config ../../redocly.yaml -o ../../spec/openapi_generated.js-sdk.yml && openapi-typescript ../../spec/openapi_generated.js-sdk.yml -x api_key --array-length --alphabetize --default-non-nullable false --output src/api/schema.gen.ts",
"generate:envd": "cd ../../spec/envd && buf generate --template buf-js.gen.yaml\n",
"generate:envd-api": "openapi-typescript ../../spec/envd/envd.yaml -x api_key --array-length --alphabetize --output src/envd/schema.gen.ts",
"generate:volume-api": "openapi-typescript ../../spec/openapi-volumecontent.yml -x api_key --array-length --alphabetize --output src/volume/schema.gen.ts",
@@ -46,6 +46,7 @@
},
"devDependencies": {
"@cloudflare/vitest-pool-workers": "^0.18.7",
+ "@redocly/cli": "2.39.0",
"@testing-library/react": "^16.2.0",
"@types/node": "^20.19.19",
"@types/platform": "^1.3.6",
diff --git a/packages/js-sdk/src/api/schema.gen.ts b/packages/js-sdk/src/api/schema.gen.ts
index 4d863e2b3..d0dc1226f 100644
--- a/packages/js-sdk/src/api/schema.gen.ts
+++ b/packages/js-sdk/src/api/schema.gen.ts
@@ -11,7 +11,11 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description List all running sandboxes */
+ /**
+ * List running sandboxes
+ * @deprecated
+ * @description List all running sandboxes. Use GET /v2/sandboxes instead.
+ */
get: {
parameters: {
query?: {
@@ -39,7 +43,10 @@ export interface paths {
};
};
put?: never;
- /** @description Create a sandbox from the template */
+ /**
+ * Create sandbox
+ * @description Create a sandbox from the template
+ */
post: {
parameters: {
query?: never;
@@ -80,7 +87,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description Get a sandbox by id */
+ /**
+ * Sandbox
+ * @description Get a sandbox by id
+ */
get: {
parameters: {
query?: never;
@@ -108,7 +118,10 @@ export interface paths {
};
put?: never;
post?: never;
- /** @description Kill a sandbox */
+ /**
+ * Kill sandbox
+ * @description Kill a sandbox
+ */
delete: {
parameters: {
query?: never;
@@ -146,7 +159,10 @@ export interface paths {
};
get?: never;
put?: never;
- /** @description Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. */
+ /**
+ * Connect sandbox
+ * @description Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended.
+ */
post: {
parameters: {
query?: never;
@@ -249,6 +265,7 @@ export interface paths {
cookie?: never;
};
/**
+ * Sandbox logs
* @deprecated
* @description Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.
*/
@@ -297,7 +314,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description Get sandbox metrics */
+ /**
+ * Sandbox metrics
+ * @description Get sandbox metrics
+ */
get: {
parameters: {
query?: {
@@ -344,7 +364,10 @@ export interface paths {
cookie?: never;
};
get?: never;
- /** @description Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it. */
+ /**
+ * Update sandbox network
+ * @description Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
+ */
put: {
parameters: {
query?: never;
@@ -389,7 +412,10 @@ export interface paths {
};
get?: never;
put?: never;
- /** @description Pause the sandbox */
+ /**
+ * Pause sandbox
+ * @description Pause the sandbox
+ */
post: {
parameters: {
query?: never;
@@ -433,7 +459,10 @@ export interface paths {
};
get?: never;
put?: never;
- /** @description Refresh the sandbox extending its time to live */
+ /**
+ * Refresh sandbox
+ * @description Refresh the sandbox extending its time to live
+ */
post: {
parameters: {
query?: never;
@@ -445,10 +474,7 @@ export interface paths {
};
requestBody?: {
content: {
- "application/json": {
- /** @description Duration for which the sandbox should be kept alive in seconds */
- duration?: number;
- };
+ "application/json": components["schemas"]["SandboxRefreshRequest"];
};
};
responses: {
@@ -479,6 +505,7 @@ export interface paths {
get?: never;
put?: never;
/**
+ * Resume sandbox
* @deprecated
* @description Resume the sandbox
*/
@@ -527,7 +554,10 @@ export interface paths {
};
get?: never;
put?: never;
- /** @description Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime. */
+ /**
+ * Create snapshot
+ * @description Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime.
+ */
post: {
parameters: {
query?: never;
@@ -539,10 +569,7 @@ export interface paths {
};
requestBody: {
content: {
- "application/json": {
- /** @description Optional name for the snapshot template. If a snapshot template with this name already exists, a new build will be assigned to the existing template instead of creating a new one. */
- name?: string;
- };
+ "application/json": components["schemas"]["SandboxSnapshotRequest"];
};
};
responses: {
@@ -576,7 +603,10 @@ export interface paths {
};
get?: never;
put?: never;
- /** @description Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration. */
+ /**
+ * Set sandbox timeout
+ * @description Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration.
+ */
post: {
parameters: {
query?: never;
@@ -588,13 +618,7 @@ export interface paths {
};
requestBody?: {
content: {
- "application/json": {
- /**
- * Format: int32
- * @description Timeout in seconds from the current time after which the sandbox should expire
- */
- timeout: number;
- };
+ "application/json": components["schemas"]["SandboxTimeoutRequest"];
};
};
responses: {
@@ -623,7 +647,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description List metrics for given sandboxes */
+ /**
+ * List sandbox metrics
+ * @description List metrics for given sandboxes
+ */
get: {
parameters: {
query: {
@@ -665,12 +692,16 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description List all snapshots for the team */
+ /**
+ * List snapshots
+ * @description List all snapshots for the team
+ */
get: {
parameters: {
query?: {
/** @description Maximum number of items to return per page */
limit?: components["parameters"]["paginationLimit"];
+ /** @description Filter snapshots by name or ID, optionally tag-qualified (e.g. "my-snapshot", "my-team/my-snapshot" or "my-snapshot:v1"). */
name?: string;
/** @description Cursor to start the list from */
nextToken?: components["parameters"]["paginationNextToken"];
@@ -710,7 +741,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description List all teams */
+ /**
+ * List teams
+ * @description List all teams
+ */
get: {
parameters: {
query?: never;
@@ -748,7 +782,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description Get metrics for the team */
+ /**
+ * Team metrics
+ * @description Get metrics for the team
+ */
get: {
parameters: {
query?: {
@@ -794,7 +831,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description Get the maximum metrics for the team in the given interval */
+ /**
+ * Maximum team metrics
+ * @description Get the maximum metrics for the team in the given interval
+ */
get: {
parameters: {
query: {
@@ -842,7 +882,11 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description List all templates */
+ /**
+ * List templates
+ * @deprecated
+ * @description List all templates
+ */
get: {
parameters: {
query?: {
@@ -869,6 +913,7 @@ export interface paths {
};
put?: never;
/**
+ * Create template
* @deprecated
* @description Create a new template
*/
@@ -912,7 +957,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description List all builds for a template */
+ /**
+ * List template builds
+ * @description List all builds for a template
+ */
get: {
parameters: {
query?: {
@@ -944,6 +992,7 @@ export interface paths {
};
put?: never;
/**
+ * Rebuild template
* @deprecated
* @description Rebuild an template
*/
@@ -975,7 +1024,10 @@ export interface paths {
500: components["responses"]["500"];
};
};
- /** @description Delete a template */
+ /**
+ * Delete template
+ * @description Delete a template
+ */
delete: {
parameters: {
query?: never;
@@ -1001,6 +1053,7 @@ export interface paths {
options?: never;
head?: never;
/**
+ * Update template
* @deprecated
* @description Update template
*/
@@ -1043,6 +1096,7 @@ export interface paths {
get?: never;
put?: never;
/**
+ * Start template build
* @deprecated
* @description Start the build
*/
@@ -1082,7 +1136,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description Get template build logs */
+ /**
+ * Template build logs
+ * @description Get template build logs
+ */
get: {
parameters: {
query?: {
@@ -1133,7 +1190,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description Get template build info */
+ /**
+ * Template build status
+ * @description Get template build info
+ */
get: {
parameters: {
query?: {
@@ -1181,7 +1241,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description Get an upload link for a tar file containing build layer files */
+ /**
+ * Template build file upload URL
+ * @description Get an upload link for a tar file containing build layer files
+ */
get: {
parameters: {
query?: never;
@@ -1224,7 +1287,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description List all tags for a template */
+ /**
+ * List template tags
+ * @description List all tags for a template
+ */
get: {
parameters: {
query?: never;
@@ -1266,7 +1332,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description Check if template with given alias exists */
+ /**
+ * Check template alias
+ * @description Check if template with given alias exists
+ */
get: {
parameters: {
query?: never;
@@ -1310,7 +1379,10 @@ export interface paths {
};
get?: never;
put?: never;
- /** @description Assign tag(s) to a template build */
+ /**
+ * Assign template tags
+ * @description Assign tag(s) to a template build
+ */
post: {
parameters: {
query?: never;
@@ -1339,7 +1411,10 @@ export interface paths {
500: components["responses"]["500"];
};
};
- /** @description Delete multiple tags from templates */
+ /**
+ * Delete template tags
+ * @description Delete multiple tags from templates
+ */
delete: {
parameters: {
query?: never;
@@ -1378,7 +1453,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description List all sandboxes */
+ /**
+ * List sandboxes (v2)
+ * @description List all sandboxes
+ */
get: {
parameters: {
query?: {
@@ -1426,7 +1504,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description Get sandbox logs */
+ /**
+ * Sandbox logs (v2)
+ * @description Get sandbox logs
+ */
get: {
parameters: {
query?: {
@@ -1478,9 +1559,45 @@ export interface paths {
path?: never;
cookie?: never;
};
- get?: never;
+ /**
+ * List templates (v2)
+ * @description List all templates
+ */
+ get: {
+ parameters: {
+ query?: {
+ /** @description Maximum number of items to return per page */
+ limit?: components["parameters"]["paginationLimit"];
+ /** @description Cursor to start the list from */
+ nextToken?: components["parameters"]["paginationNextToken"];
+ teamID?: string;
+ };
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ requestBody?: never;
+ responses: {
+ /** @description Successfully returned all templates */
+ 200: {
+ headers: {
+ /** @description Cursor to fetch the next page of results, if more exist */
+ "X-Next-Token"?: string;
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": components["schemas"]["Template"][];
+ };
+ };
+ 400: components["responses"]["400"];
+ 401: components["responses"]["401"];
+ 403: components["responses"]["403"];
+ 500: components["responses"]["500"];
+ };
+ };
put?: never;
/**
+ * Create template (v2)
* @deprecated
* @description Create a new template
*/
@@ -1530,7 +1647,10 @@ export interface paths {
delete?: never;
options?: never;
head?: never;
- /** @description Update template */
+ /**
+ * Update template (v2)
+ * @description Update template
+ */
patch: {
parameters: {
query?: never;
@@ -1571,7 +1691,10 @@ export interface paths {
};
get?: never;
put?: never;
- /** @description Start the build */
+ /**
+ * Start template build (v2)
+ * @description Start the build
+ */
post: {
parameters: {
query?: never;
@@ -1614,7 +1737,10 @@ export interface paths {
};
get?: never;
put?: never;
- /** @description Create a new template */
+ /**
+ * Create template (v3)
+ * @description Create a new template
+ */
post: {
parameters: {
query?: never;
@@ -1656,7 +1782,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description List all team volumes */
+ /**
+ * List team volumes
+ * @description List all team volumes
+ */
get: {
parameters: {
query?: never;
@@ -1680,7 +1809,10 @@ export interface paths {
};
};
put?: never;
- /** @description Create a new team volume */
+ /**
+ * Create team volume
+ * @description Create a new team volume
+ */
post: {
parameters: {
query?: never;
@@ -1721,7 +1853,10 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** @description Get team volume info */
+ /**
+ * Team volume
+ * @description Get team volume info
+ */
get: {
parameters: {
query?: never;
@@ -1749,7 +1884,10 @@ export interface paths {
};
put?: never;
post?: never;
- /** @description Delete a team volume */
+ /**
+ * Delete team volume
+ * @description Delete a team volume
+ */
delete: {
parameters: {
query?: never;
@@ -2070,6 +2208,7 @@ export interface components {
autoPauseMemory?: boolean;
autoResume?: components["schemas"]["SandboxAutoResumeConfig"];
envVars?: components["schemas"]["EnvVars"];
+ iam?: components["schemas"]["SandboxIam"];
mcp?: components["schemas"]["Mcp"];
metadata?: components["schemas"]["SandboxMetadata"];
network?: components["schemas"]["SandboxNetworkConfig"];
@@ -2125,6 +2264,11 @@ export interface components {
/** @description Service instance identifier of the node */
serviceInstanceID: string;
status: components["schemas"]["NodeStatus"];
+ /**
+ * Format: date-time
+ * @description Time when the node status was last changed
+ */
+ statusChangedAt: string;
/** @description Version of the orchestrator */
version: string;
};
@@ -2157,6 +2301,11 @@ export interface components {
/** @description Service instance identifier of the node */
serviceInstanceID: string;
status: components["schemas"]["NodeStatus"];
+ /**
+ * Format: date-time
+ * @description Time when the node status was last changed
+ */
+ statusChangedAt: string;
/** @description Version of the orchestrator */
version: string;
};
@@ -2184,6 +2333,26 @@ export interface components {
cpuPercent: number;
/** @description Detailed metrics for each disk/mount point */
disks: components["schemas"]["DiskMetrics"][];
+ /**
+ * Format: uint64
+ * @description Size of a single hugepage in bytes
+ */
+ hugePageSizeBytes: number;
+ /**
+ * Format: uint64
+ * @description Number of reserved hugepages (committed but not yet faulted)
+ */
+ hugePagesReserved: number;
+ /**
+ * Format: uint64
+ * @description Total number of preallocated hugepages on the node
+ */
+ hugePagesTotal: number;
+ /**
+ * Format: uint64
+ * @description Number of hugepages in use (total - free)
+ */
+ hugePagesUsed: number;
/**
* Format: uint64
* @description Total node memory in bytes
@@ -2315,6 +2484,20 @@ export interface components {
error?: components["schemas"]["Error"];
sandbox?: components["schemas"]["Sandbox"];
};
+ /** @description Sandbox workload identity configuration. A non-empty, valid tokens map enables workload identity for the sandbox. */
+ SandboxIam: {
+ tokens?: components["schemas"]["SandboxIamTokens"];
+ };
+ SandboxIamToken: {
+ /** @description Audience of the workload token, stored exactly as provided. */
+ audience: string;
+ /** @description Workload token type. */
+ tokenType: string;
+ };
+ /** @description Named workload-token definitions, keyed by a caller-chosen token name. */
+ SandboxIamTokens: {
+ [key: string]: components["schemas"]["SandboxIamToken"];
+ };
/** @description Sandbox lifecycle policy returned by sandbox info. */
SandboxLifecycle: {
/** @description Whether the sandbox can auto-resume. */
@@ -2464,11 +2647,26 @@ export interface components {
*/
memory?: boolean;
};
+ SandboxRefreshRequest: {
+ /** @description Duration for which the sandbox should be kept alive in seconds */
+ duration?: number;
+ };
+ SandboxSnapshotRequest: {
+ /** @description Optional name for the snapshot template. If a snapshot template with this name already exists, a new build will be assigned to the existing template instead of creating a new one. */
+ name?: string;
+ };
/**
* @description State of the sandbox
* @enum {string}
*/
SandboxState: "running" | "paused";
+ SandboxTimeoutRequest: {
+ /**
+ * Format: int32
+ * @description Timeout in seconds from the current time after which the sandbox should expire
+ */
+ timeout: number;
+ };
SandboxVolumeMount: {
/** @description Name of the volume */
name: string;
@@ -2927,6 +3125,15 @@ export interface components {
"application/json": components["schemas"]["Error"];
};
};
+ /** @description Gone */
+ 410: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": components["schemas"]["Error"];
+ };
+ };
/** @description Server error */
500: {
headers: {
diff --git a/packages/js-sdk/src/envd/filesystem/filesystem_pb.ts b/packages/js-sdk/src/envd/filesystem/filesystem_pb.ts
index c78f752d0..4a1588207 100644
--- a/packages/js-sdk/src/envd/filesystem/filesystem_pb.ts
+++ b/packages/js-sdk/src/envd/filesystem/filesystem_pb.ts
@@ -24,7 +24,7 @@ import type { Message } from '@bufbuild/protobuf'
export const file_filesystem_filesystem: GenFile =
/*@__PURE__*/
fileDesc(
- 'ChtmaWxlc3lzdGVtL2ZpbGVzeXN0ZW0ucHJvdG8SCmZpbGVzeXN0ZW0iMgoLTW92ZVJlcXVlc3QSDgoGc291cmNlGAEgASgJEhMKC2Rlc3RpbmF0aW9uGAIgASgJIjQKDE1vdmVSZXNwb25zZRIkCgVlbnRyeRgBIAEoCzIVLmZpbGVzeXN0ZW0uRW50cnlJbmZvIh4KDk1ha2VEaXJSZXF1ZXN0EgwKBHBhdGgYASABKAkiNwoPTWFrZURpclJlc3BvbnNlEiQKBWVudHJ5GAEgASgLMhUuZmlsZXN5c3RlbS5FbnRyeUluZm8iHQoNUmVtb3ZlUmVxdWVzdBIMCgRwYXRoGAEgASgJIhAKDlJlbW92ZVJlc3BvbnNlIhsKC1N0YXRSZXF1ZXN0EgwKBHBhdGgYASABKAkiNAoMU3RhdFJlc3BvbnNlEiQKBWVudHJ5GAEgASgLMhUuZmlsZXN5c3RlbS5FbnRyeUluZm8i5QIKCUVudHJ5SW5mbxIMCgRuYW1lGAEgASgJEiIKBHR5cGUYAiABKA4yFC5maWxlc3lzdGVtLkZpbGVUeXBlEgwKBHBhdGgYAyABKAkSDAoEc2l6ZRgEIAEoAxIMCgRtb2RlGAUgASgNEhMKC3Blcm1pc3Npb25zGAYgASgJEg0KBW93bmVyGAcgASgJEg0KBWdyb3VwGAggASgJEjEKDW1vZGlmaWVkX3RpbWUYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhsKDnN5bWxpbmtfdGFyZ2V0GAogASgJSACIAQESNQoIbWV0YWRhdGEYCyADKAsyIy5maWxlc3lzdGVtLkVudHJ5SW5mby5NZXRhZGF0YUVudHJ5Gi8KDU1ldGFkYXRhRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4AUIRCg9fc3ltbGlua190YXJnZXQiLQoOTGlzdERpclJlcXVlc3QSDAoEcGF0aBgBIAEoCRINCgVkZXB0aBgCIAEoDSI5Cg9MaXN0RGlyUmVzcG9uc2USJgoHZW50cmllcxgBIAMoCzIVLmZpbGVzeXN0ZW0uRW50cnlJbmZvImcKD1dhdGNoRGlyUmVxdWVzdBIMCgRwYXRoGAEgASgJEhEKCXJlY3Vyc2l2ZRgCIAEoCBIVCg1pbmNsdWRlX2VudHJ5GAMgASgIEhwKFGFsbG93X25ldHdvcmtfbW91bnRzGAQgASgIInkKD0ZpbGVzeXN0ZW1FdmVudBIMCgRuYW1lGAEgASgJEiMKBHR5cGUYAiABKA4yFS5maWxlc3lzdGVtLkV2ZW50VHlwZRIpCgVlbnRyeRgDIAEoCzIVLmZpbGVzeXN0ZW0uRW50cnlJbmZvSACIAQFCCAoGX2VudHJ5IuABChBXYXRjaERpclJlc3BvbnNlEjgKBXN0YXJ0GAEgASgLMicuZmlsZXN5c3RlbS5XYXRjaERpclJlc3BvbnNlLlN0YXJ0RXZlbnRIABIxCgpmaWxlc3lzdGVtGAIgASgLMhsuZmlsZXN5c3RlbS5GaWxlc3lzdGVtRXZlbnRIABI7CglrZWVwYWxpdmUYAyABKAsyJi5maWxlc3lzdGVtLldhdGNoRGlyUmVzcG9uc2UuS2VlcEFsaXZlSAAaDAoKU3RhcnRFdmVudBoLCglLZWVwQWxpdmVCBwoFZXZlbnQibAoUQ3JlYXRlV2F0Y2hlclJlcXVlc3QSDAoEcGF0aBgBIAEoCRIRCglyZWN1cnNpdmUYAiABKAgSFQoNaW5jbHVkZV9lbnRyeRgDIAEoCBIcChRhbGxvd19uZXR3b3JrX21vdW50cxgEIAEoCCIrChVDcmVhdGVXYXRjaGVyUmVzcG9uc2USEgoKd2F0Y2hlcl9pZBgBIAEoCSItChdHZXRXYXRjaGVyRXZlbnRzUmVxdWVzdBISCgp3YXRjaGVyX2lkGAEgASgJIkcKGEdldFdhdGNoZXJFdmVudHNSZXNwb25zZRIrCgZldmVudHMYASADKAsyGy5maWxlc3lzdGVtLkZpbGVzeXN0ZW1FdmVudCIqChRSZW1vdmVXYXRjaGVyUmVxdWVzdBISCgp3YXRjaGVyX2lkGAEgASgJIhcKFVJlbW92ZVdhdGNoZXJSZXNwb25zZSpSCghGaWxlVHlwZRIZChVGSUxFX1RZUEVfVU5TUEVDSUZJRUQQABISCg5GSUxFX1RZUEVfRklMRRABEhcKE0ZJTEVfVFlQRV9ESVJFQ1RPUlkQAiqYAQoJRXZlbnRUeXBlEhoKFkVWRU5UX1RZUEVfVU5TUEVDSUZJRUQQABIVChFFVkVOVF9UWVBFX0NSRUFURRABEhQKEEVWRU5UX1RZUEVfV1JJVEUQAhIVChFFVkVOVF9UWVBFX1JFTU9WRRADEhUKEUVWRU5UX1RZUEVfUkVOQU1FEAQSFAoQRVZFTlRfVFlQRV9DSE1PRBAFMp8FCgpGaWxlc3lzdGVtEjkKBFN0YXQSFy5maWxlc3lzdGVtLlN0YXRSZXF1ZXN0GhguZmlsZXN5c3RlbS5TdGF0UmVzcG9uc2USQgoHTWFrZURpchIaLmZpbGVzeXN0ZW0uTWFrZURpclJlcXVlc3QaGy5maWxlc3lzdGVtLk1ha2VEaXJSZXNwb25zZRI5CgRNb3ZlEhcuZmlsZXN5c3RlbS5Nb3ZlUmVxdWVzdBoYLmZpbGVzeXN0ZW0uTW92ZVJlc3BvbnNlEkIKB0xpc3REaXISGi5maWxlc3lzdGVtLkxpc3REaXJSZXF1ZXN0GhsuZmlsZXN5c3RlbS5MaXN0RGlyUmVzcG9uc2USPwoGUmVtb3ZlEhkuZmlsZXN5c3RlbS5SZW1vdmVSZXF1ZXN0GhouZmlsZXN5c3RlbS5SZW1vdmVSZXNwb25zZRJHCghXYXRjaERpchIbLmZpbGVzeXN0ZW0uV2F0Y2hEaXJSZXF1ZXN0GhwuZmlsZXN5c3RlbS5XYXRjaERpclJlc3BvbnNlMAESVAoNQ3JlYXRlV2F0Y2hlchIgLmZpbGVzeXN0ZW0uQ3JlYXRlV2F0Y2hlclJlcXVlc3QaIS5maWxlc3lzdGVtLkNyZWF0ZVdhdGNoZXJSZXNwb25zZRJdChBHZXRXYXRjaGVyRXZlbnRzEiMuZmlsZXN5c3RlbS5HZXRXYXRjaGVyRXZlbnRzUmVxdWVzdBokLmZpbGVzeXN0ZW0uR2V0V2F0Y2hlckV2ZW50c1Jlc3BvbnNlElQKDVJlbW92ZVdhdGNoZXISIC5maWxlc3lzdGVtLlJlbW92ZVdhdGNoZXJSZXF1ZXN0GiEuZmlsZXN5c3RlbS5SZW1vdmVXYXRjaGVyUmVzcG9uc2VCaQoOY29tLmZpbGVzeXN0ZW1CD0ZpbGVzeXN0ZW1Qcm90b1ABogIDRlhYqgIKRmlsZXN5c3RlbcoCCkZpbGVzeXN0ZW3iAhZGaWxlc3lzdGVtXEdQQk1ldGFkYXRh6gIKRmlsZXN5c3RlbWIGcHJvdG8z',
+ 'ChtmaWxlc3lzdGVtL2ZpbGVzeXN0ZW0ucHJvdG8SCmZpbGVzeXN0ZW0iMgoLTW92ZVJlcXVlc3QSDgoGc291cmNlGAEgASgJEhMKC2Rlc3RpbmF0aW9uGAIgASgJIjQKDE1vdmVSZXNwb25zZRIkCgVlbnRyeRgBIAEoCzIVLmZpbGVzeXN0ZW0uRW50cnlJbmZvIh4KDk1ha2VEaXJSZXF1ZXN0EgwKBHBhdGgYASABKAkiNwoPTWFrZURpclJlc3BvbnNlEiQKBWVudHJ5GAEgASgLMhUuZmlsZXN5c3RlbS5FbnRyeUluZm8iHQoNUmVtb3ZlUmVxdWVzdBIMCgRwYXRoGAEgASgJIhAKDlJlbW92ZVJlc3BvbnNlIhsKC1N0YXRSZXF1ZXN0EgwKBHBhdGgYASABKAkiNAoMU3RhdFJlc3BvbnNlEiQKBWVudHJ5GAEgASgLMhUuZmlsZXN5c3RlbS5FbnRyeUluZm8i5QIKCUVudHJ5SW5mbxIMCgRuYW1lGAEgASgJEiIKBHR5cGUYAiABKA4yFC5maWxlc3lzdGVtLkZpbGVUeXBlEgwKBHBhdGgYAyABKAkSDAoEc2l6ZRgEIAEoAxIMCgRtb2RlGAUgASgNEhMKC3Blcm1pc3Npb25zGAYgASgJEg0KBW93bmVyGAcgASgJEg0KBWdyb3VwGAggASgJEjEKDW1vZGlmaWVkX3RpbWUYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhsKDnN5bWxpbmtfdGFyZ2V0GAogASgJSACIAQESNQoIbWV0YWRhdGEYCyADKAsyIy5maWxlc3lzdGVtLkVudHJ5SW5mby5NZXRhZGF0YUVudHJ5Gi8KDU1ldGFkYXRhRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4AUIRCg9fc3ltbGlua190YXJnZXQiLQoOTGlzdERpclJlcXVlc3QSDAoEcGF0aBgBIAEoCRINCgVkZXB0aBgCIAEoDSI5Cg9MaXN0RGlyUmVzcG9uc2USJgoHZW50cmllcxgBIAMoCzIVLmZpbGVzeXN0ZW0uRW50cnlJbmZvImcKD1dhdGNoRGlyUmVxdWVzdBIMCgRwYXRoGAEgASgJEhEKCXJlY3Vyc2l2ZRgCIAEoCBIVCg1pbmNsdWRlX2VudHJ5GAMgASgIEhwKFGFsbG93X25ldHdvcmtfbW91bnRzGAQgASgIInkKD0ZpbGVzeXN0ZW1FdmVudBIMCgRuYW1lGAEgASgJEiMKBHR5cGUYAiABKA4yFS5maWxlc3lzdGVtLkV2ZW50VHlwZRIpCgVlbnRyeRgDIAEoCzIVLmZpbGVzeXN0ZW0uRW50cnlJbmZvSACIAQFCCAoGX2VudHJ5IuABChBXYXRjaERpclJlc3BvbnNlEjgKBXN0YXJ0GAEgASgLMicuZmlsZXN5c3RlbS5XYXRjaERpclJlc3BvbnNlLlN0YXJ0RXZlbnRIABIxCgpmaWxlc3lzdGVtGAIgASgLMhsuZmlsZXN5c3RlbS5GaWxlc3lzdGVtRXZlbnRIABI7CglrZWVwYWxpdmUYAyABKAsyJi5maWxlc3lzdGVtLldhdGNoRGlyUmVzcG9uc2UuS2VlcEFsaXZlSAAaDAoKU3RhcnRFdmVudBoLCglLZWVwQWxpdmVCBwoFZXZlbnQibAoUQ3JlYXRlV2F0Y2hlclJlcXVlc3QSDAoEcGF0aBgBIAEoCRIRCglyZWN1cnNpdmUYAiABKAgSFQoNaW5jbHVkZV9lbnRyeRgDIAEoCBIcChRhbGxvd19uZXR3b3JrX21vdW50cxgEIAEoCCIrChVDcmVhdGVXYXRjaGVyUmVzcG9uc2USEgoKd2F0Y2hlcl9pZBgBIAEoCSItChdHZXRXYXRjaGVyRXZlbnRzUmVxdWVzdBISCgp3YXRjaGVyX2lkGAEgASgJIkcKGEdldFdhdGNoZXJFdmVudHNSZXNwb25zZRIrCgZldmVudHMYASADKAsyGy5maWxlc3lzdGVtLkZpbGVzeXN0ZW1FdmVudCIqChRSZW1vdmVXYXRjaGVyUmVxdWVzdBISCgp3YXRjaGVyX2lkGAEgASgJIhcKFVJlbW92ZVdhdGNoZXJSZXNwb25zZSppCghGaWxlVHlwZRIZChVGSUxFX1RZUEVfVU5TUEVDSUZJRUQQABISCg5GSUxFX1RZUEVfRklMRRABEhcKE0ZJTEVfVFlQRV9ESVJFQ1RPUlkQAhIVChFGSUxFX1RZUEVfU1lNTElOSxADKpgBCglFdmVudFR5cGUSGgoWRVZFTlRfVFlQRV9VTlNQRUNJRklFRBAAEhUKEUVWRU5UX1RZUEVfQ1JFQVRFEAESFAoQRVZFTlRfVFlQRV9XUklURRACEhUKEUVWRU5UX1RZUEVfUkVNT1ZFEAMSFQoRRVZFTlRfVFlQRV9SRU5BTUUQBBIUChBFVkVOVF9UWVBFX0NITU9EEAUynwUKCkZpbGVzeXN0ZW0SOQoEU3RhdBIXLmZpbGVzeXN0ZW0uU3RhdFJlcXVlc3QaGC5maWxlc3lzdGVtLlN0YXRSZXNwb25zZRJCCgdNYWtlRGlyEhouZmlsZXN5c3RlbS5NYWtlRGlyUmVxdWVzdBobLmZpbGVzeXN0ZW0uTWFrZURpclJlc3BvbnNlEjkKBE1vdmUSFy5maWxlc3lzdGVtLk1vdmVSZXF1ZXN0GhguZmlsZXN5c3RlbS5Nb3ZlUmVzcG9uc2USQgoHTGlzdERpchIaLmZpbGVzeXN0ZW0uTGlzdERpclJlcXVlc3QaGy5maWxlc3lzdGVtLkxpc3REaXJSZXNwb25zZRI/CgZSZW1vdmUSGS5maWxlc3lzdGVtLlJlbW92ZVJlcXVlc3QaGi5maWxlc3lzdGVtLlJlbW92ZVJlc3BvbnNlEkcKCFdhdGNoRGlyEhsuZmlsZXN5c3RlbS5XYXRjaERpclJlcXVlc3QaHC5maWxlc3lzdGVtLldhdGNoRGlyUmVzcG9uc2UwARJUCg1DcmVhdGVXYXRjaGVyEiAuZmlsZXN5c3RlbS5DcmVhdGVXYXRjaGVyUmVxdWVzdBohLmZpbGVzeXN0ZW0uQ3JlYXRlV2F0Y2hlclJlc3BvbnNlEl0KEEdldFdhdGNoZXJFdmVudHMSIy5maWxlc3lzdGVtLkdldFdhdGNoZXJFdmVudHNSZXF1ZXN0GiQuZmlsZXN5c3RlbS5HZXRXYXRjaGVyRXZlbnRzUmVzcG9uc2USVAoNUmVtb3ZlV2F0Y2hlchIgLmZpbGVzeXN0ZW0uUmVtb3ZlV2F0Y2hlclJlcXVlc3QaIS5maWxlc3lzdGVtLlJlbW92ZVdhdGNoZXJSZXNwb25zZUJpCg5jb20uZmlsZXN5c3RlbUIPRmlsZXN5c3RlbVByb3RvUAGiAgNGWFiqAgpGaWxlc3lzdGVtygIKRmlsZXN5c3RlbeICFkZpbGVzeXN0ZW1cR1BCTWV0YWRhdGHqAgpGaWxlc3lzdGVtYgZwcm90bzM',
[file_google_protobuf_timestamp]
)
@@ -572,6 +572,11 @@ export enum FileType {
* @generated from enum value: FILE_TYPE_DIRECTORY = 2;
*/
DIRECTORY = 2,
+
+ /**
+ * @generated from enum value: FILE_TYPE_SYMLINK = 3;
+ */
+ SYMLINK = 3,
}
/**
diff --git a/packages/js-sdk/src/envd/process/process_pb.ts b/packages/js-sdk/src/envd/process/process_pb.ts
index 1bdcdc47d..9376b8365 100644
--- a/packages/js-sdk/src/envd/process/process_pb.ts
+++ b/packages/js-sdk/src/envd/process/process_pb.ts
@@ -178,6 +178,9 @@ export type StartRequest = Message<'process.StartRequest'> & {
tag?: string
/**
+ * This is optional for backwards compatibility.
+ * We default to true. New SDK versions will set this to false by default.
+ *
* @generated from field: optional bool stdin = 4;
*/
stdin?: boolean
diff --git a/packages/js-sdk/src/envd/schema.gen.ts b/packages/js-sdk/src/envd/schema.gen.ts
index a6b872514..3addc58ec 100644
--- a/packages/js-sdk/src/envd/schema.gen.ts
+++ b/packages/js-sdk/src/envd/schema.gen.ts
@@ -4,6 +4,43 @@
*/
export interface paths {
+ "/collapse": {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ get?: never;
+ put?: never;
+ /** Collapse envd's own anonymous heap into 2 MiB transparent hugepages before pause, so on resume envd touches fewer distinct guest-physical frames (each a cold fault). Best-effort. */
+ post: {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ requestBody?: never;
+ responses: {
+ /** @description Heap collapsed */
+ 200: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": components["schemas"]["CollapseResult"];
+ };
+ };
+ 500: components["responses"]["InternalServerError"];
+ };
+ };
+ delete?: never;
+ options?: never;
+ head?: never;
+ patch?: never;
+ trace?: never;
+ };
"/envs": {
parameters: {
query?: never;
@@ -11,7 +48,7 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** Get the environment variables */
+ /** Environment variables */
get: {
parameters: {
query?: never;
@@ -51,13 +88,13 @@ export interface paths {
get: {
parameters: {
query?: {
- /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
+ /** @description Path to the file, URL encoded. Can be relative to the user's home directory (e.g. "file.txt" resolves to ~/file.txt). */
path?: components["parameters"]["FilePath"];
/** @description Signature used for file access permission verification. */
signature?: components["parameters"]["Signature"];
- /** @description Signature expiration used for defining the expiration time of the signature. */
+ /** @description Unix timestamp (seconds) after which the signature expires. Only used with the signature parameter. */
signature_expiration?: components["parameters"]["SignatureExpiration"];
- /** @description User used for setting the owner, or resolving relative paths. */
+ /** @description User for setting file ownership and resolving relative paths. Defaults to the sandbox's default user. */
username?: components["parameters"]["User"];
};
header?: never;
@@ -70,6 +107,7 @@ export interface paths {
400: components["responses"]["InvalidPath"];
401: components["responses"]["InvalidUser"];
404: components["responses"]["FileNotFound"];
+ 406: components["responses"]["NotAcceptable"];
500: components["responses"]["InternalServerError"];
};
};
@@ -101,13 +139,13 @@ export interface paths {
post: {
parameters: {
query?: {
- /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
+ /** @description Path to the file, URL encoded. Can be relative to the user's home directory (e.g. "file.txt" resolves to ~/file.txt). */
path?: components["parameters"]["FilePath"];
/** @description Signature used for file access permission verification. */
signature?: components["parameters"]["Signature"];
- /** @description Signature expiration used for defining the expiration time of the signature. */
+ /** @description Unix timestamp (seconds) after which the signature expires. Only used with the signature parameter. */
signature_expiration?: components["parameters"]["SignatureExpiration"];
- /** @description User used for setting the owner, or resolving relative paths. */
+ /** @description User for setting file ownership and resolving relative paths. Defaults to the sandbox's default user. */
username?: components["parameters"]["User"];
};
header?: never;
@@ -129,6 +167,177 @@ export interface paths {
patch?: never;
trace?: never;
};
+ "/files/compose": {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ get?: never;
+ put?: never;
+ /** Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition. */
+ post: {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ requestBody: {
+ content: {
+ "application/json": components["schemas"]["ComposeRequest"];
+ };
+ };
+ responses: {
+ /** @description Files composed successfully */
+ 200: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ "application/json": components["schemas"]["EntryInfo"];
+ };
+ };
+ 400: components["responses"]["InvalidPath"];
+ 401: components["responses"]["InvalidUser"];
+ 404: components["responses"]["FileNotFound"];
+ 500: components["responses"]["InternalServerError"];
+ 507: components["responses"]["NotEnoughDiskSpace"];
+ };
+ };
+ delete?: never;
+ options?: never;
+ head?: never;
+ patch?: never;
+ trace?: never;
+ };
+ "/freeze": {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ get?: never;
+ put?: never;
+ /** Freeze user/pty cgroups before pause. Written directly by envd to avoid Process.Start / shell overhead under load. */
+ post: {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ requestBody?: never;
+ responses: {
+ /** @description Cgroups frozen */
+ 204: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content?: never;
+ };
+ 500: components["responses"]["InternalServerError"];
+ /** @description Freeze lock is held by another operation */
+ 503: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content?: never;
+ };
+ };
+ };
+ delete?: never;
+ options?: never;
+ head?: never;
+ patch?: never;
+ trace?: never;
+ };
+ "/fsfreeze": {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ get?: never;
+ put?: never;
+ /** Freeze the guest rootfs (FIFREEZE) before a filesystem-only pause so it is flushed to a consistent on-disk state, closing the sync->pause race. Idempotent. On a successful filesystem-only pause the VM is rebooted, so no thaw is needed; the orchestrator thaws only on the pause-failure path. */
+ post: {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ requestBody?: never;
+ responses: {
+ /** @description Rootfs frozen */
+ 204: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content?: never;
+ };
+ 500: components["responses"]["InternalServerError"];
+ /** @description Freeze lock is held by another operation */
+ 503: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content?: never;
+ };
+ };
+ };
+ delete?: never;
+ options?: never;
+ head?: never;
+ patch?: never;
+ trace?: never;
+ };
+ "/fsthaw": {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ get?: never;
+ put?: never;
+ /** Thaw the guest rootfs (FITHAW). Intended ONLY for the orchestrator's pause-failure rollback path, so a frozen filesystem cannot leave the live VM deadlocked. Idempotent. */
+ post: {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ requestBody?: never;
+ responses: {
+ /** @description Rootfs thawed */
+ 204: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content?: never;
+ };
+ 500: components["responses"]["InternalServerError"];
+ /** @description Freeze lock is held by another operation */
+ 503: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content?: never;
+ };
+ };
+ };
+ delete?: never;
+ options?: never;
+ head?: never;
+ patch?: never;
+ trace?: never;
+ };
"/health": {
parameters: {
query?: never;
@@ -185,6 +394,8 @@ export interface paths {
"application/json": {
/** @description Access token for secure access to envd service */
accessToken?: string;
+ /** @description PEM-encoded CA certificates to install into the system trust store (may contain multiple concatenated PEM blocks) */
+ caBundle?: string;
/** @description The default user to use for operations */
defaultUser?: string;
/** @description The default working directory to use for operations */
@@ -192,11 +403,14 @@ export interface paths {
envVars?: components["schemas"]["EnvVars"];
/** @description IP address of the hyperloop server to connect to */
hyperloopIP?: string;
+ /** @description Lifecycle ID of the sandbox */
+ lifecycleID?: string;
/**
* Format: date-time
* @description The current timestamp in RFC3339 format
*/
timestamp?: string;
+ volumeMounts?: components["schemas"]["VolumeMount"][];
};
};
};
@@ -223,7 +437,7 @@ export interface paths {
path?: never;
cookie?: never;
};
- /** Get the stats of the service */
+ /** Service stats */
get: {
parameters: {
query?: never;
@@ -252,10 +466,78 @@ export interface paths {
patch?: never;
trace?: never;
};
+ "/unfreeze": {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ get?: never;
+ put?: never;
+ /** Unfreeze user/pty cgroups. Intended ONLY for the orchestrator's pause-failure rollback path; the normal resume thaw happens via /init's deferred unfreeze, not here. */
+ post: {
+ parameters: {
+ query?: never;
+ header?: never;
+ path?: never;
+ cookie?: never;
+ };
+ requestBody?: never;
+ responses: {
+ /** @description Cgroups unfrozen */
+ 204: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content?: never;
+ };
+ 500: components["responses"]["InternalServerError"];
+ /** @description Freeze lock is held by another operation */
+ 503: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content?: never;
+ };
+ };
+ };
+ delete?: never;
+ options?: never;
+ head?: never;
+ patch?: never;
+ trace?: never;
+ };
}
export type webhooks = Record<string, never>;
export interface components {
schemas: {
+ /** @description Per-call statistics from a heap collapse */
+ CollapseResult: {
+ /** @description Chunks MADV_COLLAPSE accepted but were already hugepages (no work) */
+ alreadyHuge?: number;
+ /** @description 2 MiB chunks attempted */
+ chunks?: number;
+ /** @description Chunks whose base pages were actually migrated into a new hugepage (real work) */
+ collapsed?: number;
+ /**
+ * Format: int64
+ * @description Wall-clock time spent collapsing, in milliseconds
+ */
+ elapsedMs?: number;
+ /** @description Anonymous read-write regions scanned */
+ regions?: number;
+ /** @description Chunks that could not be collapsed (empty or ineligible) */
+ skipped?: number;
+ };
+ ComposeRequest: {
+ /** @description Destination file path for the composed file */
+ destination: string;
+ /** @description Ordered list of source file paths to concatenate */
+ source_paths: string[];
+ /** @description User for setting ownership and resolving relative paths */
+ username?: string;
+ };
EntryInfo: {
/** @description User-defined metadata stored as extended attributes on the file. */
metadata?: {
@@ -294,16 +576,29 @@ export interface components {
disk_total?: number;
/** @description Used disk space in bytes */
disk_used?: number;
+ /** @description Cached memory (page cache) in bytes */
+ mem_cache?: number;
/** @description Total virtual memory in bytes */
mem_total?: number;
+ /** @description Total virtual memory in MiB */
+ mem_total_mib?: number;
/** @description Used virtual memory in bytes */
mem_used?: number;
+ /** @description Used virtual memory in MiB */
+ mem_used_mib?: number;
/**
* Format: int64
* @description Unix timestamp in UTC for current sandbox time
*/
ts?: number;
};
+ /** @description Volume mount configuration */
+ VolumeMount: {
+ /** @description Server target address */
+ nfs_target: string;
+ /** @description Mount path inside the sandbox */
+ path: string;
+ };
};
responses: {
/** @description Entire file downloaded successfully. */
@@ -321,6 +616,10 @@ export interface components {
[name: string]: unknown;
};
content: {
+ /** @example {
+ * "message": "path '/home/user/missing.txt' does not exist",
+ * "code": 404
+ * } */
"application/json": components["schemas"]["Error"];
};
};
@@ -330,6 +629,10 @@ export interface components {
[name: string]: unknown;
};
content: {
+ /** @example {
+ * "message": "error opening file '/home/user/file.txt': permission denied",
+ * "code": 500
+ * } */
"application/json": components["schemas"]["Error"];
};
};
@@ -339,6 +642,10 @@ export interface components {
[name: string]: unknown;
};
content: {
+ /** @example {
+ * "message": "path '/home/user/docs' is a directory",
+ * "code": 400
+ * } */
"application/json": components["schemas"]["Error"];
};
};
@@ -348,6 +655,23 @@ export interface components {
[name: string]: unknown;
};
content: {
+ /** @example {
+ * "message": "error looking up user 'nonexistent': user: unknown user nonexistent",
+ * "code": 401
+ * } */
+ "application/json": components["schemas"]["Error"];
+ };
+ };
+ /** @description Requested encoding is not supported */
+ NotAcceptable: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ /** @example {
+ * "message": "no acceptable encoding found, supported: [identity, gzip]",
+ * "code": 406
+ * } */
"application/json": components["schemas"]["Error"];
};
};
@@ -357,6 +681,10 @@ export interface components {
[name: string]: unknown;
};
content: {
+ /** @example {
+ * "message": "not enough disk space available",
+ * "code": 507
+ * } */
"application/json": components["schemas"]["Error"];
};
};
@@ -366,23 +694,31 @@ export interface components {
[name: string]: unknown;
};
content: {
+ /** @example [
+ * {
+ * "path": "/home/user/hello.txt",
+ * "name": "hello.txt",
+ * "type": "file"
+ * }
+ * ] */
"application/json": components["schemas"]["EntryInfo"][];
};
};
};
parameters: {
- /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
+ /** @description Path to the file, URL encoded. Can be relative to the user's home directory (e.g. "file.txt" resolves to ~/file.txt). */
FilePath: string;
/** @description Signature used for file access permission verification. */
Signature: string;
- /** @description Signature expiration used for defining the expiration time of the signature. */
+ /** @description Unix timestamp (seconds) after which the signature expires. Only used with the signature parameter. */
SignatureExpiration: number;
- /** @description User used for setting the owner, or resolving relative paths. */
+ /** @description User for setting file ownership and resolving relative paths. Defaults to the sandbox's default user. */
User: string;
};
requestBodies: {
File: {
content: {
+ "application/octet-stream": string;
"multipart/form-data": {
/** Format: binary */
file?: string;
diff --git a/packages/js-sdk/src/sandbox/filesystem/index.ts b/packages/js-sdk/src/sandbox/filesystem/index.ts
index 2748934c7..d68a794bf 100644
--- a/packages/js-sdk/src/sandbox/filesystem/index.ts
+++ b/packages/js-sdk/src/sandbox/filesystem/index.ts
@@ -156,6 +156,10 @@ export enum FileType {
* Filesystem object is a directory.
*/
DIR = 'dir',
+ /**
+ * Filesystem object is a symlink.
+ */
+ SYMLINK = 'symlink',
}
export type WriteEntry = {
@@ -169,6 +173,8 @@ function mapFileType(fileType: FsFileType) {
return FileType.DIR
case FsFileType.FILE:
return FileType.FILE
+ case FsFileType.SYMLINK:
+ return FileType.SYMLINK
}
}
diff --git a/packages/js-sdk/src/volume/schema.gen.ts b/packages/js-sdk/src/volume/schema.gen.ts
index 1d5c47930..6ebbd78c3 100644
--- a/packages/js-sdk/src/volume/schema.gen.ts
+++ b/packages/js-sdk/src/volume/schema.gen.ts
@@ -279,7 +279,7 @@ export interface paths {
};
};
responses: {
- /** @description Successfully updated a file's metadata */
+ /** @description Successfully updated a path's metadata */
200: {
headers: {
[name: string]: unknown;
diff --git a/packages/js-sdk/tests/sandbox/files/entryInfo.test.ts b/packages/js-sdk/tests/sandbox/files/entryInfo.test.ts
new file mode 100644
index 000000000..9d8371051
--- /dev/null
+++ b/packages/js-sdk/tests/sandbox/files/entryInfo.test.ts
@@ -0,0 +1,34 @@
+import { create } from '@bufbuild/protobuf'
+import { expect, test } from 'vitest'
+
+import {
+ EntryInfoSchema,
+ FileType as FsFileType,
+} from '../../../src/envd/filesystem/filesystem_pb'
+import { FileType, mapEntryInfo } from '../../../src/sandbox/filesystem'
+
+function entry(type: FsFileType, symlinkTarget?: string) {
+ return create(EntryInfoSchema, {
+ name: 'entry',
+ type,
+ path: '/home/user/entry',
+ size: BigInt(0),
+ mode: 0o644,
+ permissions: '-rw-r--r--',
+ owner: 'user',
+ group: 'user',
+ symlinkTarget,
+ })
+}
+
+test('mapEntryInfo maps every known protobuf file type to the public enum', () => {
+ expect(mapEntryInfo(entry(FsFileType.FILE)).type).toBe(FileType.FILE)
+ expect(mapEntryInfo(entry(FsFileType.DIRECTORY)).type).toBe(FileType.DIR)
+ expect(mapEntryInfo(entry(FsFileType.SYMLINK)).type).toBe(FileType.SYMLINK)
+})
+
+test('mapEntryInfo keeps the symlink target on symlink entries', () => {
+ const info = mapEntryInfo(entry(FsFileType.SYMLINK, '/home/user/a.txt'))
+ expect(info.type).toBe(FileType.SYMLINK)
+ expect(info.symlinkTarget).toBe('/home/user/a.txt')
+})
diff --git a/packages/python-sdk/Makefile b/packages/python-sdk/Makefile
index 1cc9f0701..d25138bad 100644
--- a/packages/python-sdk/Makefile
+++ b/packages/python-sdk/Makefile
@@ -1,8 +1,8 @@
ROOT_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/../..)
generate-api:
- python $(ROOT_DIR)/spec/remove_extra_tags.py sandboxes snapshots templates tags volumes
- openapi-python-client generate --output-path $(ROOT_DIR)/packages/python-sdk/e2b/api/api --overwrite --path $(ROOT_DIR)/spec/openapi_generated.yml
+ redocly bundle python-sdk --config $(ROOT_DIR)/redocly.yaml -o $(ROOT_DIR)/spec/openapi_generated.python-sdk.yml
+ openapi-python-client generate --output-path $(ROOT_DIR)/packages/python-sdk/e2b/api/api --overwrite --path $(ROOT_DIR)/spec/openapi_generated.python-sdk.yml
rm -rf e2b/api/client
mv e2b/api/api/e2b_api_client e2b/api/client
rm -rf e2b/api/api
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py b/packages/python-sdk/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py
index 77288c4ca..cc3f9d372 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py
@@ -60,7 +60,9 @@ def sync_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Any, Error]]:
- """Kill a sandbox
+ """Kill sandbox
+
+ Kill a sandbox
Args:
sandbox_id (str):
@@ -89,7 +91,9 @@ def sync(
*,
client: AuthenticatedClient,
) -> Optional[Union[Any, Error]]:
- """Kill a sandbox
+ """Kill sandbox
+
+ Kill a sandbox
Args:
sandbox_id (str):
@@ -113,7 +117,9 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Any, Error]]:
- """Kill a sandbox
+ """Kill sandbox
+
+ Kill a sandbox
Args:
sandbox_id (str):
@@ -140,7 +146,9 @@ async def asyncio(
*,
client: AuthenticatedClient,
) -> Optional[Union[Any, Error]]:
- """Kill a sandbox
+ """Kill sandbox
+
+ Kill a sandbox
Args:
sandbox_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes.py
index 19829e5ca..750ed96e0 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes.py
@@ -75,7 +75,9 @@ def sync_detailed(
client: AuthenticatedClient,
metadata: Union[Unset, str] = UNSET,
) -> Response[Union[Error, list["ListedSandbox"]]]:
- """List all running sandboxes
+ """List running sandboxes
+
+ List all running sandboxes. Use GET /v2/sandboxes instead.
Args:
metadata (Union[Unset, str]):
@@ -104,7 +106,9 @@ def sync(
client: AuthenticatedClient,
metadata: Union[Unset, str] = UNSET,
) -> Optional[Union[Error, list["ListedSandbox"]]]:
- """List all running sandboxes
+ """List running sandboxes
+
+ List all running sandboxes. Use GET /v2/sandboxes instead.
Args:
metadata (Union[Unset, str]):
@@ -128,7 +132,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
metadata: Union[Unset, str] = UNSET,
) -> Response[Union[Error, list["ListedSandbox"]]]:
- """List all running sandboxes
+ """List running sandboxes
+
+ List all running sandboxes. Use GET /v2/sandboxes instead.
Args:
metadata (Union[Unset, str]):
@@ -155,7 +161,9 @@ async def asyncio(
client: AuthenticatedClient,
metadata: Union[Unset, str] = UNSET,
) -> Optional[Union[Error, list["ListedSandbox"]]]:
- """List all running sandboxes
+ """List running sandboxes
+
+ List all running sandboxes. Use GET /v2/sandboxes instead.
Args:
metadata (Union[Unset, str]):
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py
index d05b6f900..5554bc76c 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_metrics.py
@@ -72,7 +72,9 @@ def sync_detailed(
client: AuthenticatedClient,
sandbox_ids: list[str],
) -> Response[Union[Error, SandboxesWithMetrics]]:
- """List metrics for given sandboxes
+ """List sandbox metrics
+
+ List metrics for given sandboxes
Args:
sandbox_ids (list[str]):
@@ -101,7 +103,9 @@ def sync(
client: AuthenticatedClient,
sandbox_ids: list[str],
) -> Optional[Union[Error, SandboxesWithMetrics]]:
- """List metrics for given sandboxes
+ """List sandbox metrics
+
+ List metrics for given sandboxes
Args:
sandbox_ids (list[str]):
@@ -125,7 +129,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
sandbox_ids: list[str],
) -> Response[Union[Error, SandboxesWithMetrics]]:
- """List metrics for given sandboxes
+ """List sandbox metrics
+
+ List metrics for given sandboxes
Args:
sandbox_ids (list[str]):
@@ -152,7 +158,9 @@ async def asyncio(
client: AuthenticatedClient,
sandbox_ids: list[str],
) -> Optional[Union[Error, SandboxesWithMetrics]]:
- """List metrics for given sandboxes
+ """List sandbox metrics
+
+ List metrics for given sandboxes
Args:
sandbox_ids (list[str]):
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py
index 74f0b27f8..59781ab7b 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id.py
@@ -62,7 +62,9 @@ def sync_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Error, SandboxDetail]]:
- """Get a sandbox by id
+ """Sandbox
+
+ Get a sandbox by id
Args:
sandbox_id (str):
@@ -91,7 +93,9 @@ def sync(
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, SandboxDetail]]:
- """Get a sandbox by id
+ """Sandbox
+
+ Get a sandbox by id
Args:
sandbox_id (str):
@@ -115,7 +119,9 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Error, SandboxDetail]]:
- """Get a sandbox by id
+ """Sandbox
+
+ Get a sandbox by id
Args:
sandbox_id (str):
@@ -142,7 +148,9 @@ async def asyncio(
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, SandboxDetail]]:
- """Get a sandbox by id
+ """Sandbox
+
+ Get a sandbox by id
Args:
sandbox_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py
index 39d746061..49d13223e 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py
@@ -76,7 +76,9 @@ def sync_detailed(
start: Union[Unset, int] = UNSET,
limit: Union[Unset, int] = 1000,
) -> Response[Union[Error, SandboxLogs]]:
- """Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.
+ """Sandbox logs
+
+ Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.
Args:
sandbox_id (str):
@@ -111,7 +113,9 @@ def sync(
start: Union[Unset, int] = UNSET,
limit: Union[Unset, int] = 1000,
) -> Optional[Union[Error, SandboxLogs]]:
- """Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.
+ """Sandbox logs
+
+ Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.
Args:
sandbox_id (str):
@@ -141,7 +145,9 @@ async def asyncio_detailed(
start: Union[Unset, int] = UNSET,
limit: Union[Unset, int] = 1000,
) -> Response[Union[Error, SandboxLogs]]:
- """Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.
+ """Sandbox logs
+
+ Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.
Args:
sandbox_id (str):
@@ -174,7 +180,9 @@ async def asyncio(
start: Union[Unset, int] = UNSET,
limit: Union[Unset, int] = 1000,
) -> Optional[Union[Error, SandboxLogs]]:
- """Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.
+ """Sandbox logs
+
+ Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.
Args:
sandbox_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py
index 48302c562..48343566d 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py
@@ -85,7 +85,9 @@ def sync_detailed(
start: Union[Unset, int] = UNSET,
end: Union[Unset, int] = UNSET,
) -> Response[Union[Error, list["SandboxMetric"]]]:
- """Get sandbox metrics
+ """Sandbox metrics
+
+ Get sandbox metrics
Args:
sandbox_id (str):
@@ -121,7 +123,9 @@ def sync(
start: Union[Unset, int] = UNSET,
end: Union[Unset, int] = UNSET,
) -> Optional[Union[Error, list["SandboxMetric"]]]:
- """Get sandbox metrics
+ """Sandbox metrics
+
+ Get sandbox metrics
Args:
sandbox_id (str):
@@ -152,7 +156,9 @@ async def asyncio_detailed(
start: Union[Unset, int] = UNSET,
end: Union[Unset, int] = UNSET,
) -> Response[Union[Error, list["SandboxMetric"]]]:
- """Get sandbox metrics
+ """Sandbox metrics
+
+ Get sandbox metrics
Args:
sandbox_id (str):
@@ -186,7 +192,9 @@ async def asyncio(
start: Union[Unset, int] = UNSET,
end: Union[Unset, int] = UNSET,
) -> Optional[Union[Error, list["SandboxMetric"]]]:
- """Get sandbox metrics
+ """Sandbox metrics
+
+ Get sandbox metrics
Args:
sandbox_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_v2_sandboxes.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_v2_sandboxes.py
index 4955f815c..75bfcef7f 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_v2_sandboxes.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_v2_sandboxes.py
@@ -96,7 +96,9 @@ def sync_detailed(
next_token: Union[Unset, str] = UNSET,
limit: Union[Unset, int] = 100,
) -> Response[Union[Error, list["ListedSandbox"]]]:
- """List all sandboxes
+ """List sandboxes (v2)
+
+ List all sandboxes
Args:
metadata (Union[Unset, str]):
@@ -134,7 +136,9 @@ def sync(
next_token: Union[Unset, str] = UNSET,
limit: Union[Unset, int] = 100,
) -> Optional[Union[Error, list["ListedSandbox"]]]:
- """List all sandboxes
+ """List sandboxes (v2)
+
+ List all sandboxes
Args:
metadata (Union[Unset, str]):
@@ -167,7 +171,9 @@ async def asyncio_detailed(
next_token: Union[Unset, str] = UNSET,
limit: Union[Unset, int] = 100,
) -> Response[Union[Error, list["ListedSandbox"]]]:
- """List all sandboxes
+ """List sandboxes (v2)
+
+ List all sandboxes
Args:
metadata (Union[Unset, str]):
@@ -203,7 +209,9 @@ async def asyncio(
next_token: Union[Unset, str] = UNSET,
limit: Union[Unset, int] = 100,
) -> Optional[Union[Error, list["ListedSandbox"]]]:
- """List all sandboxes
+ """List sandboxes (v2)
+
+ List all sandboxes
Args:
metadata (Union[Unset, str]):
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py b/packages/python-sdk/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py
index 6a19076b7..b3cc1dad1 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py
@@ -98,7 +98,9 @@ def sync_detailed(
level: Union[Unset, LogLevel] = UNSET,
search: Union[Unset, str] = UNSET,
) -> Response[Union[Error, SandboxLogsV2Response]]:
- """Get sandbox logs
+ """Sandbox logs (v2)
+
+ Get sandbox logs
Args:
sandbox_id (str):
@@ -142,7 +144,9 @@ def sync(
level: Union[Unset, LogLevel] = UNSET,
search: Union[Unset, str] = UNSET,
) -> Optional[Union[Error, SandboxLogsV2Response]]:
- """Get sandbox logs
+ """Sandbox logs (v2)
+
+ Get sandbox logs
Args:
sandbox_id (str):
@@ -181,7 +185,9 @@ async def asyncio_detailed(
level: Union[Unset, LogLevel] = UNSET,
search: Union[Unset, str] = UNSET,
) -> Response[Union[Error, SandboxLogsV2Response]]:
- """Get sandbox logs
+ """Sandbox logs (v2)
+
+ Get sandbox logs
Args:
sandbox_id (str):
@@ -223,7 +229,9 @@ async def asyncio(
level: Union[Unset, LogLevel] = UNSET,
search: Union[Unset, str] = UNSET,
) -> Optional[Union[Error, SandboxLogsV2Response]]:
- """Get sandbox logs
+ """Sandbox logs (v2)
+
+ Get sandbox logs
Args:
sandbox_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes.py
index 36d79cbf6..95e017c6b 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes.py
@@ -71,7 +71,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: NewSandbox,
) -> Response[Union[Error, Sandbox]]:
- """Create a sandbox from the template
+ """Create sandbox
+
+ Create a sandbox from the template
Args:
body (NewSandbox):
@@ -100,7 +102,9 @@ def sync(
client: AuthenticatedClient,
body: NewSandbox,
) -> Optional[Union[Error, Sandbox]]:
- """Create a sandbox from the template
+ """Create sandbox
+
+ Create a sandbox from the template
Args:
body (NewSandbox):
@@ -124,7 +128,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: NewSandbox,
) -> Response[Union[Error, Sandbox]]:
- """Create a sandbox from the template
+ """Create sandbox
+
+ Create a sandbox from the template
Args:
body (NewSandbox):
@@ -151,7 +157,9 @@ async def asyncio(
client: AuthenticatedClient,
body: NewSandbox,
) -> Optional[Union[Error, Sandbox]]:
- """Create a sandbox from the template
+ """Create sandbox
+
+ Create a sandbox from the template
Args:
body (NewSandbox):
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py
index c3b71fcd4..a37aa7508 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py
@@ -81,7 +81,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: ConnectSandbox,
) -> Response[Union[Error, Sandbox]]:
- """Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended.
+ """Connect sandbox
+
+ Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended.
Args:
sandbox_id (str):
@@ -113,7 +115,9 @@ def sync(
client: AuthenticatedClient,
body: ConnectSandbox,
) -> Optional[Union[Error, Sandbox]]:
- """Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended.
+ """Connect sandbox
+
+ Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended.
Args:
sandbox_id (str):
@@ -140,7 +144,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: ConnectSandbox,
) -> Response[Union[Error, Sandbox]]:
- """Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended.
+ """Connect sandbox
+
+ Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended.
Args:
sandbox_id (str):
@@ -170,7 +176,9 @@ async def asyncio(
client: AuthenticatedClient,
body: ConnectSandbox,
) -> Optional[Union[Error, Sandbox]]:
- """Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended.
+ """Connect sandbox
+
+ Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended.
Args:
sandbox_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py
index f2931d26c..186317b59 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py
@@ -75,7 +75,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: SandboxPauseRequest,
) -> Response[Union[Any, Error]]:
- """Pause the sandbox
+ """Pause sandbox
+
+ Pause the sandbox
Args:
sandbox_id (str):
@@ -107,7 +109,9 @@ def sync(
client: AuthenticatedClient,
body: SandboxPauseRequest,
) -> Optional[Union[Any, Error]]:
- """Pause the sandbox
+ """Pause sandbox
+
+ Pause the sandbox
Args:
sandbox_id (str):
@@ -134,7 +138,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: SandboxPauseRequest,
) -> Response[Union[Any, Error]]:
- """Pause the sandbox
+ """Pause sandbox
+
+ Pause the sandbox
Args:
sandbox_id (str):
@@ -164,7 +170,9 @@ async def asyncio(
client: AuthenticatedClient,
body: SandboxPauseRequest,
) -> Optional[Union[Any, Error]]:
- """Pause the sandbox
+ """Pause sandbox
+
+ Pause the sandbox
Args:
sandbox_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py
index 5b667ba5d..b9ed87127 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py
@@ -6,16 +6,14 @@ import httpx
from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.error import Error
-from ...models.post_sandboxes_sandbox_id_refreshes_body import (
- PostSandboxesSandboxIDRefreshesBody,
-)
+from ...models.sandbox_refresh_request import SandboxRefreshRequest
from ...types import Response
def _get_kwargs(
sandbox_id: str,
*,
- body: PostSandboxesSandboxIDRefreshesBody,
+ body: SandboxRefreshRequest,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
@@ -67,13 +65,15 @@ def sync_detailed(
sandbox_id: str,
*,
client: AuthenticatedClient,
- body: PostSandboxesSandboxIDRefreshesBody,
+ body: SandboxRefreshRequest,
) -> Response[Union[Any, Error]]:
- """Refresh the sandbox extending its time to live
+ """Refresh sandbox
+
+ Refresh the sandbox extending its time to live
Args:
sandbox_id (str):
- body (PostSandboxesSandboxIDRefreshesBody):
+ body (SandboxRefreshRequest):
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -99,13 +99,15 @@ def sync(
sandbox_id: str,
*,
client: AuthenticatedClient,
- body: PostSandboxesSandboxIDRefreshesBody,
+ body: SandboxRefreshRequest,
) -> Optional[Union[Any, Error]]:
- """Refresh the sandbox extending its time to live
+ """Refresh sandbox
+
+ Refresh the sandbox extending its time to live
Args:
sandbox_id (str):
- body (PostSandboxesSandboxIDRefreshesBody):
+ body (SandboxRefreshRequest):
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -126,13 +128,15 @@ async def asyncio_detailed(
sandbox_id: str,
*,
client: AuthenticatedClient,
- body: PostSandboxesSandboxIDRefreshesBody,
+ body: SandboxRefreshRequest,
) -> Response[Union[Any, Error]]:
- """Refresh the sandbox extending its time to live
+ """Refresh sandbox
+
+ Refresh the sandbox extending its time to live
Args:
sandbox_id (str):
- body (PostSandboxesSandboxIDRefreshesBody):
+ body (SandboxRefreshRequest):
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -156,13 +160,15 @@ async def asyncio(
sandbox_id: str,
*,
client: AuthenticatedClient,
- body: PostSandboxesSandboxIDRefreshesBody,
+ body: SandboxRefreshRequest,
) -> Optional[Union[Any, Error]]:
- """Refresh the sandbox extending its time to live
+ """Refresh sandbox
+
+ Refresh the sandbox extending its time to live
Args:
sandbox_id (str):
- body (PostSandboxesSandboxIDRefreshesBody):
+ body (SandboxRefreshRequest):
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py
index caca6292a..c359aa8ae 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py
@@ -77,7 +77,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: ResumedSandbox,
) -> Response[Union[Error, Sandbox]]:
- """Resume the sandbox
+ """Resume sandbox
+
+ Resume the sandbox
Args:
sandbox_id (str):
@@ -109,7 +111,9 @@ def sync(
client: AuthenticatedClient,
body: ResumedSandbox,
) -> Optional[Union[Error, Sandbox]]:
- """Resume the sandbox
+ """Resume sandbox
+
+ Resume the sandbox
Args:
sandbox_id (str):
@@ -136,7 +140,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: ResumedSandbox,
) -> Response[Union[Error, Sandbox]]:
- """Resume the sandbox
+ """Resume sandbox
+
+ Resume the sandbox
Args:
sandbox_id (str):
@@ -166,7 +172,9 @@ async def asyncio(
client: AuthenticatedClient,
body: ResumedSandbox,
) -> Optional[Union[Error, Sandbox]]:
- """Resume the sandbox
+ """Resume sandbox
+
+ Resume the sandbox
Args:
sandbox_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py
index 09b2e2a69..83e17e5e6 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py
@@ -6,9 +6,7 @@ import httpx
from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.error import Error
-from ...models.post_sandboxes_sandbox_id_snapshots_body import (
- PostSandboxesSandboxIDSnapshotsBody,
-)
+from ...models.sandbox_snapshot_request import SandboxSnapshotRequest
from ...models.snapshot_info import SnapshotInfo
from ...types import Response
@@ -16,7 +14,7 @@ from ...types import Response
def _get_kwargs(
sandbox_id: str,
*,
- body: PostSandboxesSandboxIDSnapshotsBody,
+ body: SandboxSnapshotRequest,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
@@ -77,14 +75,16 @@ def sync_detailed(
sandbox_id: str,
*,
client: AuthenticatedClient,
- body: PostSandboxesSandboxIDSnapshotsBody,
+ body: SandboxSnapshotRequest,
) -> Response[Union[Error, SnapshotInfo]]:
- """Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new
+ """Create snapshot
+
+ Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new
sandboxes and persist beyond the original sandbox's lifetime.
Args:
sandbox_id (str):
- body (PostSandboxesSandboxIDSnapshotsBody):
+ body (SandboxSnapshotRequest):
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -110,14 +110,16 @@ def sync(
sandbox_id: str,
*,
client: AuthenticatedClient,
- body: PostSandboxesSandboxIDSnapshotsBody,
+ body: SandboxSnapshotRequest,
) -> Optional[Union[Error, SnapshotInfo]]:
- """Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new
+ """Create snapshot
+
+ Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new
sandboxes and persist beyond the original sandbox's lifetime.
Args:
sandbox_id (str):
- body (PostSandboxesSandboxIDSnapshotsBody):
+ body (SandboxSnapshotRequest):
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -138,14 +140,16 @@ async def asyncio_detailed(
sandbox_id: str,
*,
client: AuthenticatedClient,
- body: PostSandboxesSandboxIDSnapshotsBody,
+ body: SandboxSnapshotRequest,
) -> Response[Union[Error, SnapshotInfo]]:
- """Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new
+ """Create snapshot
+
+ Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new
sandboxes and persist beyond the original sandbox's lifetime.
Args:
sandbox_id (str):
- body (PostSandboxesSandboxIDSnapshotsBody):
+ body (SandboxSnapshotRequest):
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -169,14 +173,16 @@ async def asyncio(
sandbox_id: str,
*,
client: AuthenticatedClient,
- body: PostSandboxesSandboxIDSnapshotsBody,
+ body: SandboxSnapshotRequest,
) -> Optional[Union[Error, SnapshotInfo]]:
- """Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new
+ """Create snapshot
+
+ Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new
sandboxes and persist beyond the original sandbox's lifetime.
Args:
sandbox_id (str):
- body (PostSandboxesSandboxIDSnapshotsBody):
+ body (SandboxSnapshotRequest):
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py
index 2756f30a8..a472b05b3 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py
@@ -6,16 +6,14 @@ import httpx
from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.error import Error
-from ...models.post_sandboxes_sandbox_id_timeout_body import (
- PostSandboxesSandboxIDTimeoutBody,
-)
+from ...models.sandbox_timeout_request import SandboxTimeoutRequest
from ...types import Response
def _get_kwargs(
sandbox_id: str,
*,
- body: PostSandboxesSandboxIDTimeoutBody,
+ body: SandboxTimeoutRequest,
) -> dict[str, Any]:
headers: dict[str, Any] = {}
@@ -71,15 +69,17 @@ def sync_detailed(
sandbox_id: str,
*,
client: AuthenticatedClient,
- body: PostSandboxesSandboxIDTimeoutBody,
+ body: SandboxTimeoutRequest,
) -> Response[Union[Any, Error]]:
- """Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request.
+ """Set sandbox timeout
+
+ Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request.
Calling this method multiple times overwrites the TTL, each time using the current timestamp as the
starting point to measure the timeout duration.
Args:
sandbox_id (str):
- body (PostSandboxesSandboxIDTimeoutBody):
+ body (SandboxTimeoutRequest):
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -105,15 +105,17 @@ def sync(
sandbox_id: str,
*,
client: AuthenticatedClient,
- body: PostSandboxesSandboxIDTimeoutBody,
+ body: SandboxTimeoutRequest,
) -> Optional[Union[Any, Error]]:
- """Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request.
+ """Set sandbox timeout
+
+ Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request.
Calling this method multiple times overwrites the TTL, each time using the current timestamp as the
starting point to measure the timeout duration.
Args:
sandbox_id (str):
- body (PostSandboxesSandboxIDTimeoutBody):
+ body (SandboxTimeoutRequest):
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -134,15 +136,17 @@ async def asyncio_detailed(
sandbox_id: str,
*,
client: AuthenticatedClient,
- body: PostSandboxesSandboxIDTimeoutBody,
+ body: SandboxTimeoutRequest,
) -> Response[Union[Any, Error]]:
- """Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request.
+ """Set sandbox timeout
+
+ Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request.
Calling this method multiple times overwrites the TTL, each time using the current timestamp as the
starting point to measure the timeout duration.
Args:
sandbox_id (str):
- body (PostSandboxesSandboxIDTimeoutBody):
+ body (SandboxTimeoutRequest):
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -166,15 +170,17 @@ async def asyncio(
sandbox_id: str,
*,
client: AuthenticatedClient,
- body: PostSandboxesSandboxIDTimeoutBody,
+ body: SandboxTimeoutRequest,
) -> Optional[Union[Any, Error]]:
- """Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request.
+ """Set sandbox timeout
+
+ Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request.
Calling this method multiple times overwrites the TTL, each time using the current timestamp as the
starting point to measure the timeout duration.
Args:
sandbox_id (str):
- body (PostSandboxesSandboxIDTimeoutBody):
+ body (SandboxTimeoutRequest):
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py b/packages/python-sdk/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py
index 64dad4655..aefbc9e48 100644
--- a/packages/python-sdk/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py
+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py
@@ -75,7 +75,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: SandboxNetworkUpdateConfig,
) -> Response[Union[Any, Error]]:
- """Update the network configuration for a running sandbox. Replaces the current egress rules with the
+ """Update sandbox network
+
+ Update the network configuration for a running sandbox. Replaces the current egress rules with the
provided configuration. Omitting field clears it.
Args:
@@ -110,7 +112,9 @@ def sync(
client: AuthenticatedClient,
body: SandboxNetworkUpdateConfig,
) -> Optional[Union[Any, Error]]:
- """Update the network configuration for a running sandbox. Replaces the current egress rules with the
+ """Update sandbox network
+
+ Update the network configuration for a running sandbox. Replaces the current egress rules with the
provided configuration. Omitting field clears it.
Args:
@@ -140,7 +144,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: SandboxNetworkUpdateConfig,
) -> Response[Union[Any, Error]]:
- """Update the network configuration for a running sandbox. Replaces the current egress rules with the
+ """Update sandbox network
+
+ Update the network configuration for a running sandbox. Replaces the current egress rules with the
provided configuration. Omitting field clears it.
Args:
@@ -173,7 +179,9 @@ async def asyncio(
client: AuthenticatedClient,
body: SandboxNetworkUpdateConfig,
) -> Optional[Union[Any, Error]]:
- """Update the network configuration for a running sandbox. Replaces the current egress rules with the
+ """Update sandbox network
+
+ Update the network configuration for a running sandbox. Replaces the current egress rules with the
provided configuration. Omitting field clears it.
Args:
diff --git a/packages/python-sdk/e2b/api/client/api/snapshots/get_snapshots.py b/packages/python-sdk/e2b/api/client/api/snapshots/get_snapshots.py
index 13f6b1758..3f200588f 100644
--- a/packages/python-sdk/e2b/api/client/api/snapshots/get_snapshots.py
+++ b/packages/python-sdk/e2b/api/client/api/snapshots/get_snapshots.py
@@ -83,12 +83,13 @@ def sync_detailed(
limit: Union[Unset, int] = 100,
next_token: Union[Unset, str] = UNSET,
) -> Response[Union[Error, list["SnapshotInfo"]]]:
- """List all snapshots for the team
+ """List snapshots
+
+ List all snapshots for the team
Args:
sandbox_id (Union[Unset, str]): Filter snapshots by source sandbox ID
- name (Union[Unset, str]): Filter snapshots by name or ID, optionally tag-qualified (e.g.
- "my-snapshot", "my-team/my-snapshot" or "my-snapshot:v1").
+ name (Union[Unset, str]):
limit (Union[Unset, int]): Default: 100.
next_token (Union[Unset, str]):
@@ -122,12 +123,13 @@ def sync(
limit: Union[Unset, int] = 100,
next_token: Union[Unset, str] = UNSET,
) -> Optional[Union[Error, list["SnapshotInfo"]]]:
- """List all snapshots for the team
+ """List snapshots
+
+ List all snapshots for the team
Args:
sandbox_id (Union[Unset, str]): Filter snapshots by source sandbox ID
- name (Union[Unset, str]): Filter snapshots by name or ID, optionally tag-qualified (e.g.
- "my-snapshot", "my-team/my-snapshot" or "my-snapshot:v1").
+ name (Union[Unset, str]):
limit (Union[Unset, int]): Default: 100.
next_token (Union[Unset, str]):
@@ -156,12 +158,13 @@ async def asyncio_detailed(
limit: Union[Unset, int] = 100,
next_token: Union[Unset, str] = UNSET,
) -> Response[Union[Error, list["SnapshotInfo"]]]:
- """List all snapshots for the team
+ """List snapshots
+
+ List all snapshots for the team
Args:
sandbox_id (Union[Unset, str]): Filter snapshots by source sandbox ID
- name (Union[Unset, str]): Filter snapshots by name or ID, optionally tag-qualified (e.g.
- "my-snapshot", "my-team/my-snapshot" or "my-snapshot:v1").
+ name (Union[Unset, str]):
limit (Union[Unset, int]): Default: 100.
next_token (Union[Unset, str]):
@@ -193,12 +196,13 @@ async def asyncio(
limit: Union[Unset, int] = 100,
next_token: Union[Unset, str] = UNSET,
) -> Optional[Union[Error, list["SnapshotInfo"]]]:
- """List all snapshots for the team
+ """List snapshots
+
+ List all snapshots for the team
Args:
sandbox_id (Union[Unset, str]): Filter snapshots by source sandbox ID
- name (Union[Unset, str]): Filter snapshots by name or ID, optionally tag-qualified (e.g.
- "my-snapshot", "my-team/my-snapshot" or "my-snapshot:v1").
+ name (Union[Unset, str]):
limit (Union[Unset, int]): Default: 100.
next_token (Union[Unset, str]):
diff --git a/packages/python-sdk/e2b/api/client/api/tags/delete_templates_tags.py b/packages/python-sdk/e2b/api/client/api/tags/delete_templates_tags.py
index 16a764aa1..6ab1f6d25 100644
--- a/packages/python-sdk/e2b/api/client/api/tags/delete_templates_tags.py
+++ b/packages/python-sdk/e2b/api/client/api/tags/delete_templates_tags.py
@@ -73,7 +73,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: DeleteTemplateTagsRequest,
) -> Response[Union[Any, Error]]:
- """Delete multiple tags from templates
+ """Delete template tags
+
+ Delete multiple tags from templates
Args:
body (DeleteTemplateTagsRequest):
@@ -102,7 +104,9 @@ def sync(
client: AuthenticatedClient,
body: DeleteTemplateTagsRequest,
) -> Optional[Union[Any, Error]]:
- """Delete multiple tags from templates
+ """Delete template tags
+
+ Delete multiple tags from templates
Args:
body (DeleteTemplateTagsRequest):
@@ -126,7 +130,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: DeleteTemplateTagsRequest,
) -> Response[Union[Any, Error]]:
- """Delete multiple tags from templates
+ """Delete template tags
+
+ Delete multiple tags from templates
Args:
body (DeleteTemplateTagsRequest):
@@ -153,7 +159,9 @@ async def asyncio(
client: AuthenticatedClient,
body: DeleteTemplateTagsRequest,
) -> Optional[Union[Any, Error]]:
- """Delete multiple tags from templates
+ """Delete template tags
+
+ Delete multiple tags from templates
Args:
body (DeleteTemplateTagsRequest):
diff --git a/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags.py b/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags.py
index 60bc625f6..636906bee 100644
--- a/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags.py
+++ b/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags.py
@@ -71,7 +71,9 @@ def sync_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Error, list["TemplateTag"]]]:
- """List all tags for a template
+ """List template tags
+
+ List all tags for a template
Args:
template_id (str):
@@ -100,7 +102,9 @@ def sync(
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, list["TemplateTag"]]]:
- """List all tags for a template
+ """List template tags
+
+ List all tags for a template
Args:
template_id (str):
@@ -124,7 +128,9 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Error, list["TemplateTag"]]]:
- """List all tags for a template
+ """List template tags
+
+ List all tags for a template
Args:
template_id (str):
@@ -151,7 +157,9 @@ async def asyncio(
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, list["TemplateTag"]]]:
- """List all tags for a template
+ """List template tags
+
+ List all tags for a template
Args:
template_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/tags/post_templates_tags.py b/packages/python-sdk/e2b/api/client/api/tags/post_templates_tags.py
index fbc0ab49e..ad36cfdc0 100644
--- a/packages/python-sdk/e2b/api/client/api/tags/post_templates_tags.py
+++ b/packages/python-sdk/e2b/api/client/api/tags/post_templates_tags.py
@@ -75,7 +75,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: AssignTemplateTagsRequest,
) -> Response[Union[AssignedTemplateTags, Error]]:
- """Assign tag(s) to a template build
+ """Assign template tags
+
+ Assign tag(s) to a template build
Args:
body (AssignTemplateTagsRequest):
@@ -104,7 +106,9 @@ def sync(
client: AuthenticatedClient,
body: AssignTemplateTagsRequest,
) -> Optional[Union[AssignedTemplateTags, Error]]:
- """Assign tag(s) to a template build
+ """Assign template tags
+
+ Assign tag(s) to a template build
Args:
body (AssignTemplateTagsRequest):
@@ -128,7 +132,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: AssignTemplateTagsRequest,
) -> Response[Union[AssignedTemplateTags, Error]]:
- """Assign tag(s) to a template build
+ """Assign template tags
+
+ Assign tag(s) to a template build
Args:
body (AssignTemplateTagsRequest):
@@ -155,7 +161,9 @@ async def asyncio(
client: AuthenticatedClient,
body: AssignTemplateTagsRequest,
) -> Optional[Union[AssignedTemplateTags, Error]]:
- """Assign tag(s) to a template build
+ """Assign template tags
+
+ Assign tag(s) to a template build
Args:
body (AssignTemplateTagsRequest):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/delete_templates_template_id.py b/packages/python-sdk/e2b/api/client/api/templates/delete_templates_template_id.py
index d73839c73..1cc2ea953 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/delete_templates_template_id.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/delete_templates_template_id.py
@@ -56,7 +56,9 @@ def sync_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Any, Error]]:
- """Delete a template
+ """Delete template
+
+ Delete a template
Args:
template_id (str):
@@ -85,7 +87,9 @@ def sync(
*,
client: AuthenticatedClient,
) -> Optional[Union[Any, Error]]:
- """Delete a template
+ """Delete template
+
+ Delete a template
Args:
template_id (str):
@@ -109,7 +113,9 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Any, Error]]:
- """Delete a template
+ """Delete template
+
+ Delete a template
Args:
template_id (str):
@@ -136,7 +142,9 @@ async def asyncio(
*,
client: AuthenticatedClient,
) -> Optional[Union[Any, Error]]:
- """Delete a template
+ """Delete template
+
+ Delete a template
Args:
template_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_templates.py b/packages/python-sdk/e2b/api/client/api/templates/get_templates.py
index a25db12f8..97d2e17a1 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_templates.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_templates.py
@@ -71,7 +71,9 @@ def sync_detailed(
client: AuthenticatedClient,
team_id: Union[Unset, str] = UNSET,
) -> Response[Union[Error, list["Template"]]]:
- """List all templates
+ """List templates
+
+ List all templates
Args:
team_id (Union[Unset, str]): Identifier of the team
@@ -100,7 +102,9 @@ def sync(
client: AuthenticatedClient,
team_id: Union[Unset, str] = UNSET,
) -> Optional[Union[Error, list["Template"]]]:
- """List all templates
+ """List templates
+
+ List all templates
Args:
team_id (Union[Unset, str]): Identifier of the team
@@ -124,7 +128,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
team_id: Union[Unset, str] = UNSET,
) -> Response[Union[Error, list["Template"]]]:
- """List all templates
+ """List templates
+
+ List all templates
Args:
team_id (Union[Unset, str]): Identifier of the team
@@ -151,7 +157,9 @@ async def asyncio(
client: AuthenticatedClient,
team_id: Union[Unset, str] = UNSET,
) -> Optional[Union[Error, list["Template"]]]:
- """List all templates
+ """List templates
+
+ List all templates
Args:
team_id (Union[Unset, str]): Identifier of the team
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_templates_aliases_alias.py b/packages/python-sdk/e2b/api/client/api/templates/get_templates_aliases_alias.py
index c862846d6..dcfe69405 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_templates_aliases_alias.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_templates_aliases_alias.py
@@ -66,7 +66,9 @@ def sync_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Error, TemplateAliasResponse]]:
- """Check if template with given alias exists
+ """Check template alias
+
+ Check if template with given alias exists
Args:
alias (str): Template alias
@@ -95,7 +97,9 @@ def sync(
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, TemplateAliasResponse]]:
- """Check if template with given alias exists
+ """Check template alias
+
+ Check if template with given alias exists
Args:
alias (str): Template alias
@@ -119,7 +123,9 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Error, TemplateAliasResponse]]:
- """Check if template with given alias exists
+ """Check template alias
+
+ Check if template with given alias exists
Args:
alias (str): Template alias
@@ -146,7 +152,9 @@ async def asyncio(
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, TemplateAliasResponse]]:
- """Check if template with given alias exists
+ """Check template alias
+
+ Check if template with given alias exists
Args:
alias (str): Template alias
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id.py b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id.py
index 875f9e945..444405217 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id.py
@@ -72,7 +72,9 @@ def sync_detailed(
next_token: Union[Unset, str] = UNSET,
limit: Union[Unset, int] = 100,
) -> Response[Union[Error, TemplateWithBuilds]]:
- """List all builds for a template
+ """List template builds
+
+ List all builds for a template
Args:
template_id (str):
@@ -107,7 +109,9 @@ def sync(
next_token: Union[Unset, str] = UNSET,
limit: Union[Unset, int] = 100,
) -> Optional[Union[Error, TemplateWithBuilds]]:
- """List all builds for a template
+ """List template builds
+
+ List all builds for a template
Args:
template_id (str):
@@ -137,7 +141,9 @@ async def asyncio_detailed(
next_token: Union[Unset, str] = UNSET,
limit: Union[Unset, int] = 100,
) -> Response[Union[Error, TemplateWithBuilds]]:
- """List all builds for a template
+ """List template builds
+
+ List all builds for a template
Args:
template_id (str):
@@ -170,7 +176,9 @@ async def asyncio(
next_token: Union[Unset, str] = UNSET,
limit: Union[Unset, int] = 100,
) -> Optional[Union[Error, TemplateWithBuilds]]:
- """List all builds for a template
+ """List template builds
+
+ List all builds for a template
Args:
template_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py
index 1f4fee6f3..f396c62ba 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py
@@ -105,7 +105,9 @@ def sync_detailed(
level: Union[Unset, LogLevel] = UNSET,
source: Union[Unset, LogsSource] = UNSET,
) -> Response[Union[Error, TemplateBuildLogsResponse]]:
- """Get template build logs
+ """Template build logs
+
+ Get template build logs
Args:
template_id (str):
@@ -152,7 +154,9 @@ def sync(
level: Union[Unset, LogLevel] = UNSET,
source: Union[Unset, LogsSource] = UNSET,
) -> Optional[Union[Error, TemplateBuildLogsResponse]]:
- """Get template build logs
+ """Template build logs
+
+ Get template build logs
Args:
template_id (str):
@@ -194,7 +198,9 @@ async def asyncio_detailed(
level: Union[Unset, LogLevel] = UNSET,
source: Union[Unset, LogsSource] = UNSET,
) -> Response[Union[Error, TemplateBuildLogsResponse]]:
- """Get template build logs
+ """Template build logs
+
+ Get template build logs
Args:
template_id (str):
@@ -239,7 +245,9 @@ async def asyncio(
level: Union[Unset, LogLevel] = UNSET,
source: Union[Unset, LogsSource] = UNSET,
) -> Optional[Union[Error, TemplateBuildLogsResponse]]:
- """Get template build logs
+ """Template build logs
+
+ Get template build logs
Args:
template_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py
index 8185e2e08..07bb2d5ed 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_builds_build_id_status.py
@@ -87,7 +87,9 @@ def sync_detailed(
limit: Union[Unset, int] = 100,
level: Union[Unset, LogLevel] = UNSET,
) -> Response[Union[Error, TemplateBuildInfo]]:
- """Get template build info
+ """Template build status
+
+ Get template build info
Args:
template_id (str):
@@ -128,7 +130,9 @@ def sync(
limit: Union[Unset, int] = 100,
level: Union[Unset, LogLevel] = UNSET,
) -> Optional[Union[Error, TemplateBuildInfo]]:
- """Get template build info
+ """Template build status
+
+ Get template build info
Args:
template_id (str):
@@ -164,7 +168,9 @@ async def asyncio_detailed(
limit: Union[Unset, int] = 100,
level: Union[Unset, LogLevel] = UNSET,
) -> Response[Union[Error, TemplateBuildInfo]]:
- """Get template build info
+ """Template build status
+
+ Get template build info
Args:
template_id (str):
@@ -203,7 +209,9 @@ async def asyncio(
limit: Union[Unset, int] = 100,
level: Union[Unset, LogLevel] = UNSET,
) -> Optional[Union[Error, TemplateBuildInfo]]:
- """Get template build info
+ """Template build status
+
+ Get template build info
Args:
template_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_files_hash.py b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_files_hash.py
index 0f6a1e4ca..959dbf41a 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_files_hash.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_templates_template_id_files_hash.py
@@ -68,7 +68,9 @@ def sync_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Error, TemplateBuildFileUpload]]:
- """Get an upload link for a tar file containing build layer files
+ """Template build file upload URL
+
+ Get an upload link for a tar file containing build layer files
Args:
template_id (str):
@@ -100,7 +102,9 @@ def sync(
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, TemplateBuildFileUpload]]:
- """Get an upload link for a tar file containing build layer files
+ """Template build file upload URL
+
+ Get an upload link for a tar file containing build layer files
Args:
template_id (str):
@@ -127,7 +131,9 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Error, TemplateBuildFileUpload]]:
- """Get an upload link for a tar file containing build layer files
+ """Template build file upload URL
+
+ Get an upload link for a tar file containing build layer files
Args:
template_id (str):
@@ -157,7 +163,9 @@ async def asyncio(
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, TemplateBuildFileUpload]]:
- """Get an upload link for a tar file containing build layer files
+ """Template build file upload URL
+
+ Get an upload link for a tar file containing build layer files
Args:
template_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/get_v2_templates.py b/packages/python-sdk/e2b/api/client/api/templates/get_v2_templates.py
new file mode 100644
index 000000000..915156e95
--- /dev/null
+++ b/packages/python-sdk/e2b/api/client/api/templates/get_v2_templates.py
@@ -0,0 +1,218 @@
+from http import HTTPStatus
+from typing import Any, Optional, Union
+
+import httpx
+
+from ... import errors
+from ...client import AuthenticatedClient, Client
+from ...models.error import Error
+from ...models.template import Template
+from ...types import UNSET, Response, Unset
+
+
+def _get_kwargs(
+ *,
+ team_id: Union[Unset, str] = UNSET,
+ next_token: Union[Unset, str] = UNSET,
+ limit: Union[Unset, int] = 100,
+) -> dict[str, Any]:
+ params: dict[str, Any] = {}
+
+ params["teamID"] = team_id
+
+ params["nextToken"] = next_token
+
+ params["limit"] = limit
+
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
+
+ _kwargs: dict[str, Any] = {
+ "method": "get",
+ "url": "/v2/templates",
+ "params": params,
+ }
+
+ return _kwargs
+
+
+def _parse_response(
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
+) -> Optional[Union[Error, list["Template"]]]:
+ if response.status_code == 200:
+ response_200 = []
+ _response_200 = response.json()
+ for response_200_item_data in _response_200:
+ response_200_item = Template.from_dict(response_200_item_data)
+
+ response_200.append(response_200_item)
+
+ return response_200
+ if response.status_code == 400:
+ response_400 = Error.from_dict(response.json())
+
+ return response_400
+ if response.status_code == 401:
+ response_401 = Error.from_dict(response.json())
+
+ return response_401
+ if response.status_code == 403:
+ response_403 = Error.from_dict(response.json())
+
+ return response_403
+ if response.status_code == 500:
+ response_500 = Error.from_dict(response.json())
+
+ return response_500
+ if client.raise_on_unexpected_status:
+ raise errors.UnexpectedStatus(response.status_code, response.content)
+ else:
+ return None
+
+
+def _build_response(
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
+) -> Response[Union[Error, list["Template"]]]:
+ return Response(
+ status_code=HTTPStatus(response.status_code),
+ content=response.content,
+ headers=response.headers,
+ parsed=_parse_response(client=client, response=response),
+ )
+
+
+def sync_detailed(
+ *,
+ client: AuthenticatedClient,
+ team_id: Union[Unset, str] = UNSET,
+ next_token: Union[Unset, str] = UNSET,
+ limit: Union[Unset, int] = 100,
+) -> Response[Union[Error, list["Template"]]]:
+ """List templates (v2)
+
+ List all templates
+
+ Args:
+ team_id (Union[Unset, str]): Identifier of the team
+ next_token (Union[Unset, str]):
+ limit (Union[Unset, int]): Default: 100.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Union[Error, list['Template']]]
+ """
+
+ kwargs = _get_kwargs(
+ team_id=team_id,
+ next_token=next_token,
+ limit=limit,
+ )
+
+ response = client.get_httpx_client().request(
+ **kwargs,
+ )
+
+ return _build_response(client=client, response=response)
+
+
+def sync(
+ *,
+ client: AuthenticatedClient,
+ team_id: Union[Unset, str] = UNSET,
+ next_token: Union[Unset, str] = UNSET,
+ limit: Union[Unset, int] = 100,
+) -> Optional[Union[Error, list["Template"]]]:
+ """List templates (v2)
+
+ List all templates
+
+ Args:
+ team_id (Union[Unset, str]): Identifier of the team
+ next_token (Union[Unset, str]):
+ limit (Union[Unset, int]): Default: 100.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Union[Error, list['Template']]
+ """
+
+ return sync_detailed(
+ client=client,
+ team_id=team_id,
+ next_token=next_token,
+ limit=limit,
+ ).parsed
+
+
+async def asyncio_detailed(
+ *,
+ client: AuthenticatedClient,
+ team_id: Union[Unset, str] = UNSET,
+ next_token: Union[Unset, str] = UNSET,
+ limit: Union[Unset, int] = 100,
+) -> Response[Union[Error, list["Template"]]]:
+ """List templates (v2)
+
+ List all templates
+
+ Args:
+ team_id (Union[Unset, str]): Identifier of the team
+ next_token (Union[Unset, str]):
+ limit (Union[Unset, int]): Default: 100.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Response[Union[Error, list['Template']]]
+ """
+
+ kwargs = _get_kwargs(
+ team_id=team_id,
+ next_token=next_token,
+ limit=limit,
+ )
+
+ response = await client.get_async_httpx_client().request(**kwargs)
+
+ return _build_response(client=client, response=response)
+
+
+async def asyncio(
+ *,
+ client: AuthenticatedClient,
+ team_id: Union[Unset, str] = UNSET,
+ next_token: Union[Unset, str] = UNSET,
+ limit: Union[Unset, int] = 100,
+) -> Optional[Union[Error, list["Template"]]]:
+ """List templates (v2)
+
+ List all templates
+
+ Args:
+ team_id (Union[Unset, str]): Identifier of the team
+ next_token (Union[Unset, str]):
+ limit (Union[Unset, int]): Default: 100.
+
+ Raises:
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+ Returns:
+ Union[Error, list['Template']]
+ """
+
+ return (
+ await asyncio_detailed(
+ client=client,
+ team_id=team_id,
+ next_token=next_token,
+ limit=limit,
+ )
+ ).parsed
diff --git a/packages/python-sdk/e2b/api/client/api/templates/patch_templates_template_id.py b/packages/python-sdk/e2b/api/client/api/templates/patch_templates_template_id.py
index cf19391f4..7ea0a857c 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/patch_templates_template_id.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/patch_templates_template_id.py
@@ -73,6 +73,8 @@ def sync_detailed(
) -> Response[Union[Any, Error]]:
"""Update template
+ Update template
+
Args:
template_id (str):
body (TemplateUpdateRequest):
@@ -105,6 +107,8 @@ def sync(
) -> Optional[Union[Any, Error]]:
"""Update template
+ Update template
+
Args:
template_id (str):
body (TemplateUpdateRequest):
@@ -132,6 +136,8 @@ async def asyncio_detailed(
) -> Response[Union[Any, Error]]:
"""Update template
+ Update template
+
Args:
template_id (str):
body (TemplateUpdateRequest):
@@ -162,6 +168,8 @@ async def asyncio(
) -> Optional[Union[Any, Error]]:
"""Update template
+ Update template
+
Args:
template_id (str):
body (TemplateUpdateRequest):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/patch_v_2_templates_template_id.py b/packages/python-sdk/e2b/api/client/api/templates/patch_v_2_templates_template_id.py
index b26233253..699626d41 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/patch_v_2_templates_template_id.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/patch_v_2_templates_template_id.py
@@ -73,7 +73,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: TemplateUpdateRequest,
) -> Response[Union[Error, TemplateUpdateResponse]]:
- """Update template
+ """Update template (v2)
+
+ Update template
Args:
template_id (str):
@@ -105,7 +107,9 @@ def sync(
client: AuthenticatedClient,
body: TemplateUpdateRequest,
) -> Optional[Union[Error, TemplateUpdateResponse]]:
- """Update template
+ """Update template (v2)
+
+ Update template
Args:
template_id (str):
@@ -132,7 +136,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: TemplateUpdateRequest,
) -> Response[Union[Error, TemplateUpdateResponse]]:
- """Update template
+ """Update template (v2)
+
+ Update template
Args:
template_id (str):
@@ -162,7 +168,9 @@ async def asyncio(
client: AuthenticatedClient,
body: TemplateUpdateRequest,
) -> Optional[Union[Error, TemplateUpdateResponse]]:
- """Update template
+ """Update template (v2)
+
+ Update template
Args:
template_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/post_templates.py b/packages/python-sdk/e2b/api/client/api/templates/post_templates.py
index 015b0d911..e561b2adb 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/post_templates.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/post_templates.py
@@ -71,7 +71,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: TemplateBuildRequest,
) -> Response[Union[Error, TemplateLegacy]]:
- """Create a new template
+ """Create template
+
+ Create a new template
Args:
body (TemplateBuildRequest):
@@ -100,7 +102,9 @@ def sync(
client: AuthenticatedClient,
body: TemplateBuildRequest,
) -> Optional[Union[Error, TemplateLegacy]]:
- """Create a new template
+ """Create template
+
+ Create a new template
Args:
body (TemplateBuildRequest):
@@ -124,7 +128,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: TemplateBuildRequest,
) -> Response[Union[Error, TemplateLegacy]]:
- """Create a new template
+ """Create template
+
+ Create a new template
Args:
body (TemplateBuildRequest):
@@ -151,7 +157,9 @@ async def asyncio(
client: AuthenticatedClient,
body: TemplateBuildRequest,
) -> Optional[Union[Error, TemplateLegacy]]:
- """Create a new template
+ """Create template
+
+ Create a new template
Args:
body (TemplateBuildRequest):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id.py b/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id.py
index 986a3b51f..067d1ebc6 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id.py
@@ -69,7 +69,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: TemplateBuildRequest,
) -> Response[Union[Error, TemplateLegacy]]:
- """Rebuild an template
+ """Rebuild template
+
+ Rebuild an template
Args:
template_id (str):
@@ -101,7 +103,9 @@ def sync(
client: AuthenticatedClient,
body: TemplateBuildRequest,
) -> Optional[Union[Error, TemplateLegacy]]:
- """Rebuild an template
+ """Rebuild template
+
+ Rebuild an template
Args:
template_id (str):
@@ -128,7 +132,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: TemplateBuildRequest,
) -> Response[Union[Error, TemplateLegacy]]:
- """Rebuild an template
+ """Rebuild template
+
+ Rebuild an template
Args:
template_id (str):
@@ -158,7 +164,9 @@ async def asyncio(
client: AuthenticatedClient,
body: TemplateBuildRequest,
) -> Optional[Union[Error, TemplateLegacy]]:
- """Rebuild an template
+ """Rebuild template
+
+ Rebuild an template
Args:
template_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id_builds_build_id.py b/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id_builds_build_id.py
index d2709ffd4..bab91c658 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id_builds_build_id.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/post_templates_template_id_builds_build_id.py
@@ -58,7 +58,9 @@ def sync_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Any, Error]]:
- """Start the build
+ """Start template build
+
+ Start the build
Args:
template_id (str):
@@ -90,7 +92,9 @@ def sync(
*,
client: AuthenticatedClient,
) -> Optional[Union[Any, Error]]:
- """Start the build
+ """Start template build
+
+ Start the build
Args:
template_id (str):
@@ -117,7 +121,9 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Any, Error]]:
- """Start the build
+ """Start template build
+
+ Start the build
Args:
template_id (str):
@@ -147,7 +153,9 @@ async def asyncio(
*,
client: AuthenticatedClient,
) -> Optional[Union[Any, Error]]:
- """Start the build
+ """Start template build
+
+ Start the build
Args:
template_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/post_v2_templates.py b/packages/python-sdk/e2b/api/client/api/templates/post_v2_templates.py
index 86b5ebeb0..0c3f568d1 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/post_v2_templates.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/post_v2_templates.py
@@ -71,7 +71,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: TemplateBuildRequestV2,
) -> Response[Union[Error, TemplateLegacy]]:
- """Create a new template
+ """Create template (v2)
+
+ Create a new template
Args:
body (TemplateBuildRequestV2):
@@ -100,7 +102,9 @@ def sync(
client: AuthenticatedClient,
body: TemplateBuildRequestV2,
) -> Optional[Union[Error, TemplateLegacy]]:
- """Create a new template
+ """Create template (v2)
+
+ Create a new template
Args:
body (TemplateBuildRequestV2):
@@ -124,7 +128,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: TemplateBuildRequestV2,
) -> Response[Union[Error, TemplateLegacy]]:
- """Create a new template
+ """Create template (v2)
+
+ Create a new template
Args:
body (TemplateBuildRequestV2):
@@ -151,7 +157,9 @@ async def asyncio(
client: AuthenticatedClient,
body: TemplateBuildRequestV2,
) -> Optional[Union[Error, TemplateLegacy]]:
- """Create a new template
+ """Create template (v2)
+
+ Create a new template
Args:
body (TemplateBuildRequestV2):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/post_v3_templates.py b/packages/python-sdk/e2b/api/client/api/templates/post_v3_templates.py
index d46b256a1..fd390477d 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/post_v3_templates.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/post_v3_templates.py
@@ -75,7 +75,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: TemplateBuildRequestV3,
) -> Response[Union[Error, TemplateRequestResponseV3]]:
- """Create a new template
+ """Create template (v3)
+
+ Create a new template
Args:
body (TemplateBuildRequestV3):
@@ -104,7 +106,9 @@ def sync(
client: AuthenticatedClient,
body: TemplateBuildRequestV3,
) -> Optional[Union[Error, TemplateRequestResponseV3]]:
- """Create a new template
+ """Create template (v3)
+
+ Create a new template
Args:
body (TemplateBuildRequestV3):
@@ -128,7 +132,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: TemplateBuildRequestV3,
) -> Response[Union[Error, TemplateRequestResponseV3]]:
- """Create a new template
+ """Create template (v3)
+
+ Create a new template
Args:
body (TemplateBuildRequestV3):
@@ -155,7 +161,9 @@ async def asyncio(
client: AuthenticatedClient,
body: TemplateBuildRequestV3,
) -> Optional[Union[Error, TemplateRequestResponseV3]]:
- """Create a new template
+ """Create template (v3)
+
+ Create a new template
Args:
body (TemplateBuildRequestV3):
diff --git a/packages/python-sdk/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py b/packages/python-sdk/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py
index 0d3da1fb5..5ec52d489 100644
--- a/packages/python-sdk/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py
+++ b/packages/python-sdk/e2b/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py
@@ -69,7 +69,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: TemplateBuildStartV2,
) -> Response[Union[Any, Error]]:
- """Start the build
+ """Start template build (v2)
+
+ Start the build
Args:
template_id (str):
@@ -104,7 +106,9 @@ def sync(
client: AuthenticatedClient,
body: TemplateBuildStartV2,
) -> Optional[Union[Any, Error]]:
- """Start the build
+ """Start template build (v2)
+
+ Start the build
Args:
template_id (str):
@@ -134,7 +138,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: TemplateBuildStartV2,
) -> Response[Union[Any, Error]]:
- """Start the build
+ """Start template build (v2)
+
+ Start the build
Args:
template_id (str):
@@ -167,7 +173,9 @@ async def asyncio(
client: AuthenticatedClient,
body: TemplateBuildStartV2,
) -> Optional[Union[Any, Error]]:
- """Start the build
+ """Start template build (v2)
+
+ Start the build
Args:
template_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/volumes/delete_volumes_volume_id.py b/packages/python-sdk/e2b/api/client/api/volumes/delete_volumes_volume_id.py
index d79ca75ad..250b859df 100644
--- a/packages/python-sdk/e2b/api/client/api/volumes/delete_volumes_volume_id.py
+++ b/packages/python-sdk/e2b/api/client/api/volumes/delete_volumes_volume_id.py
@@ -60,7 +60,9 @@ def sync_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Any, Error]]:
- """Delete a team volume
+ """Delete team volume
+
+ Delete a team volume
Args:
volume_id (str):
@@ -89,7 +91,9 @@ def sync(
*,
client: AuthenticatedClient,
) -> Optional[Union[Any, Error]]:
- """Delete a team volume
+ """Delete team volume
+
+ Delete a team volume
Args:
volume_id (str):
@@ -113,7 +117,9 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Any, Error]]:
- """Delete a team volume
+ """Delete team volume
+
+ Delete a team volume
Args:
volume_id (str):
@@ -140,7 +146,9 @@ async def asyncio(
*,
client: AuthenticatedClient,
) -> Optional[Union[Any, Error]]:
- """Delete a team volume
+ """Delete team volume
+
+ Delete a team volume
Args:
volume_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/volumes/get_volumes.py b/packages/python-sdk/e2b/api/client/api/volumes/get_volumes.py
index 2c794b5ce..375df68ee 100644
--- a/packages/python-sdk/e2b/api/client/api/volumes/get_volumes.py
+++ b/packages/python-sdk/e2b/api/client/api/volumes/get_volumes.py
@@ -60,7 +60,9 @@ def sync_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Error, list["Volume"]]]:
- """List all team volumes
+ """List team volumes
+
+ List all team volumes
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -83,7 +85,9 @@ def sync(
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, list["Volume"]]]:
- """List all team volumes
+ """List team volumes
+
+ List all team volumes
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -102,7 +106,9 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Error, list["Volume"]]]:
- """List all team volumes
+ """List team volumes
+
+ List all team volumes
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -123,7 +129,9 @@ async def asyncio(
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, list["Volume"]]]:
- """List all team volumes
+ """List team volumes
+
+ List all team volumes
Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
diff --git a/packages/python-sdk/e2b/api/client/api/volumes/get_volumes_volume_id.py b/packages/python-sdk/e2b/api/client/api/volumes/get_volumes_volume_id.py
index 7fc5ebf91..9511c0670 100644
--- a/packages/python-sdk/e2b/api/client/api/volumes/get_volumes_volume_id.py
+++ b/packages/python-sdk/e2b/api/client/api/volumes/get_volumes_volume_id.py
@@ -62,7 +62,9 @@ def sync_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Error, VolumeAndToken]]:
- """Get team volume info
+ """Team volume
+
+ Get team volume info
Args:
volume_id (str):
@@ -91,7 +93,9 @@ def sync(
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, VolumeAndToken]]:
- """Get team volume info
+ """Team volume
+
+ Get team volume info
Args:
volume_id (str):
@@ -115,7 +119,9 @@ async def asyncio_detailed(
*,
client: AuthenticatedClient,
) -> Response[Union[Error, VolumeAndToken]]:
- """Get team volume info
+ """Team volume
+
+ Get team volume info
Args:
volume_id (str):
@@ -142,7 +148,9 @@ async def asyncio(
*,
client: AuthenticatedClient,
) -> Optional[Union[Error, VolumeAndToken]]:
- """Get team volume info
+ """Team volume
+
+ Get team volume info
Args:
volume_id (str):
diff --git a/packages/python-sdk/e2b/api/client/api/volumes/post_volumes.py b/packages/python-sdk/e2b/api/client/api/volumes/post_volumes.py
index 74e1c8f4d..8967e7366 100644
--- a/packages/python-sdk/e2b/api/client/api/volumes/post_volumes.py
+++ b/packages/python-sdk/e2b/api/client/api/volumes/post_volumes.py
@@ -71,7 +71,9 @@ def sync_detailed(
client: AuthenticatedClient,
body: NewVolume,
) -> Response[Union[Error, VolumeAndToken]]:
- """Create a new team volume
+ """Create team volume
+
+ Create a new team volume
Args:
body (NewVolume):
@@ -100,7 +102,9 @@ def sync(
client: AuthenticatedClient,
body: NewVolume,
) -> Optional[Union[Error, VolumeAndToken]]:
- """Create a new team volume
+ """Create team volume
+
+ Create a new team volume
Args:
body (NewVolume):
@@ -124,7 +128,9 @@ async def asyncio_detailed(
client: AuthenticatedClient,
body: NewVolume,
) -> Response[Union[Error, VolumeAndToken]]:
- """Create a new team volume
+ """Create team volume
+
+ Create a new team volume
Args:
body (NewVolume):
@@ -151,7 +157,9 @@ async def asyncio(
client: AuthenticatedClient,
body: NewVolume,
) -> Optional[Union[Error, VolumeAndToken]]:
- """Create a new team volume
+ """Create team volume
+
+ Create a new team volume
Args:
body (NewVolume):
diff --git a/packages/python-sdk/e2b/api/client/models/__init__.py b/packages/python-sdk/e2b/api/client/models/__init__.py
index 0a9e23b48..997ffb895 100644
--- a/packages/python-sdk/e2b/api/client/models/__init__.py
+++ b/packages/python-sdk/e2b/api/client/models/__init__.py
@@ -35,19 +35,15 @@ from .node_detail import NodeDetail
from .node_metrics import NodeMetrics
from .node_status import NodeStatus
from .node_status_change import NodeStatusChange
-from .post_sandboxes_sandbox_id_refreshes_body import (
- PostSandboxesSandboxIDRefreshesBody,
-)
-from .post_sandboxes_sandbox_id_snapshots_body import (
- PostSandboxesSandboxIDSnapshotsBody,
-)
-from .post_sandboxes_sandbox_id_timeout_body import PostSandboxesSandboxIDTimeoutBody
from .resumed_sandbox import ResumedSandbox
from .sandbox import Sandbox
from .sandbox_auto_resume_config import SandboxAutoResumeConfig
from .sandbox_detail import SandboxDetail
from .sandbox_fork_request import SandboxForkRequest
from .sandbox_fork_result import SandboxForkResult
+from .sandbox_iam import SandboxIam
+from .sandbox_iam_token import SandboxIamToken
+from .sandbox_iam_tokens import SandboxIamTokens
from .sandbox_lifecycle import SandboxLifecycle
from .sandbox_log import SandboxLog
from .sandbox_log_entry import SandboxLogEntry
@@ -64,7 +60,10 @@ from .sandbox_network_update_config import SandboxNetworkUpdateConfig
from .sandbox_network_update_config_rules import SandboxNetworkUpdateConfigRules
from .sandbox_on_timeout import SandboxOnTimeout
from .sandbox_pause_request import SandboxPauseRequest
+from .sandbox_refresh_request import SandboxRefreshRequest
+from .sandbox_snapshot_request import SandboxSnapshotRequest
from .sandbox_state import SandboxState
+from .sandbox_timeout_request import SandboxTimeoutRequest
from .sandbox_volume_mount import SandboxVolumeMount
from .sandboxes_with_metrics import SandboxesWithMetrics
from .snapshot_info import SnapshotInfo
@@ -131,9 +130,6 @@ __all__ = (
"NodeMetrics",
"NodeStatus",
"NodeStatusChange",
- "PostSandboxesSandboxIDRefreshesBody",
- "PostSandboxesSandboxIDSnapshotsBody",
- "PostSandboxesSandboxIDTimeoutBody",
"ResumedSandbox",
"Sandbox",
"SandboxAutoResumeConfig",
@@ -141,6 +137,9 @@ __all__ = (
"SandboxesWithMetrics",
"SandboxForkRequest",
"SandboxForkResult",
+ "SandboxIam",
+ "SandboxIamToken",
+ "SandboxIamTokens",
"SandboxLifecycle",
"SandboxLog",
"SandboxLogEntry",
@@ -157,7 +156,10 @@ __all__ = (
"SandboxNetworkUpdateConfigRules",
"SandboxOnTimeout",
"SandboxPauseRequest",
+ "SandboxRefreshRequest",
+ "SandboxSnapshotRequest",
"SandboxState",
+ "SandboxTimeoutRequest",
"SandboxVolumeMount",
"SnapshotInfo",
"Team",
diff --git a/packages/python-sdk/e2b/api/client/models/admin_sandbox_kill_result.py b/packages/python-sdk/e2b/api/client/models/admin_sandbox_kill_result.py
index ac1df8911..10dcfe372 100644
--- a/packages/python-sdk/e2b/api/client/models/admin_sandbox_kill_result.py
+++ b/packages/python-sdk/e2b/api/client/models/admin_sandbox_kill_result.py
@@ -11,25 +11,25 @@ T = TypeVar("T", bound="AdminSandboxKillResult")
class AdminSandboxKillResult:
"""
Attributes:
- failed_count (int): Number of sandboxes that failed to kill
killed_count (int): Number of sandboxes successfully killed
+ failed_count (int): Number of sandboxes that failed to kill
"""
- failed_count: int
killed_count: int
+ failed_count: int
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- failed_count = self.failed_count
-
killed_count = self.killed_count
+ failed_count = self.failed_count
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "failedCount": failed_count,
"killedCount": killed_count,
+ "failedCount": failed_count,
}
)
@@ -38,13 +38,13 @@ class AdminSandboxKillResult:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- failed_count = d.pop("failedCount")
-
killed_count = d.pop("killedCount")
+ failed_count = d.pop("failedCount")
+
admin_sandbox_kill_result = cls(
- failed_count=failed_count,
killed_count=killed_count,
+ failed_count=failed_count,
)
admin_sandbox_kill_result.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/assign_template_tags_request.py b/packages/python-sdk/e2b/api/client/models/assign_template_tags_request.py
index 3fb10a069..b5ab47821 100644
--- a/packages/python-sdk/e2b/api/client/models/assign_template_tags_request.py
+++ b/packages/python-sdk/e2b/api/client/models/assign_template_tags_request.py
@@ -11,25 +11,25 @@ T = TypeVar("T", bound="AssignTemplateTagsRequest")
class AssignTemplateTagsRequest:
"""
Attributes:
- tags (list[str]): Tags to assign to the template
target (str): Target template in "name:tag" format
+ tags (list[str]): Tags to assign to the template
"""
- tags: list[str]
target: str
+ tags: list[str]
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- tags = self.tags
-
target = self.target
+ tags = self.tags
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "tags": tags,
"target": target,
+ "tags": tags,
}
)
@@ -38,13 +38,13 @@ class AssignTemplateTagsRequest:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- tags = cast(list[str], d.pop("tags"))
-
target = d.pop("target")
+ tags = cast(list[str], d.pop("tags"))
+
assign_template_tags_request = cls(
- tags=tags,
target=target,
+ tags=tags,
)
assign_template_tags_request.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/assigned_template_tags.py b/packages/python-sdk/e2b/api/client/models/assigned_template_tags.py
index 7f9ecaa7f..5e0e45f15 100644
--- a/packages/python-sdk/e2b/api/client/models/assigned_template_tags.py
+++ b/packages/python-sdk/e2b/api/client/models/assigned_template_tags.py
@@ -12,25 +12,25 @@ T = TypeVar("T", bound="AssignedTemplateTags")
class AssignedTemplateTags:
"""
Attributes:
- build_id (UUID): Identifier of the build associated with these tags
tags (list[str]): Assigned tags of the template
+ build_id (UUID): Identifier of the build associated with these tags
"""
- build_id: UUID
tags: list[str]
+ build_id: UUID
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- build_id = str(self.build_id)
-
tags = self.tags
+ build_id = str(self.build_id)
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "buildID": build_id,
"tags": tags,
+ "buildID": build_id,
}
)
@@ -39,13 +39,13 @@ class AssignedTemplateTags:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- build_id = UUID(d.pop("buildID"))
-
tags = cast(list[str], d.pop("tags"))
+ build_id = UUID(d.pop("buildID"))
+
assigned_template_tags = cls(
- build_id=build_id,
tags=tags,
+ build_id=build_id,
)
assigned_template_tags.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/aws_registry.py b/packages/python-sdk/e2b/api/client/models/aws_registry.py
index ef1ea9748..6f8d7286e 100644
--- a/packages/python-sdk/e2b/api/client/models/aws_registry.py
+++ b/packages/python-sdk/e2b/api/client/models/aws_registry.py
@@ -13,35 +13,35 @@ T = TypeVar("T", bound="AWSRegistry")
class AWSRegistry:
"""
Attributes:
+ type_ (AWSRegistryType): Type of registry authentication
aws_access_key_id (str): AWS Access Key ID for ECR authentication
- aws_region (str): AWS Region where the ECR registry is located
aws_secret_access_key (str): AWS Secret Access Key for ECR authentication
- type_ (AWSRegistryType): Type of registry authentication
+ aws_region (str): AWS Region where the ECR registry is located
"""
+ type_: AWSRegistryType
aws_access_key_id: str
- aws_region: str
aws_secret_access_key: str
- type_: AWSRegistryType
+ aws_region: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- aws_access_key_id = self.aws_access_key_id
+ type_ = self.type_.value
- aws_region = self.aws_region
+ aws_access_key_id = self.aws_access_key_id
aws_secret_access_key = self.aws_secret_access_key
- type_ = self.type_.value
+ aws_region = self.aws_region
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
+ "type": type_,
"awsAccessKeyId": aws_access_key_id,
- "awsRegion": aws_region,
"awsSecretAccessKey": aws_secret_access_key,
- "type": type_,
+ "awsRegion": aws_region,
}
)
@@ -50,19 +50,19 @@ class AWSRegistry:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- aws_access_key_id = d.pop("awsAccessKeyId")
+ type_ = AWSRegistryType(d.pop("type"))
- aws_region = d.pop("awsRegion")
+ aws_access_key_id = d.pop("awsAccessKeyId")
aws_secret_access_key = d.pop("awsSecretAccessKey")
- type_ = AWSRegistryType(d.pop("type"))
+ aws_region = d.pop("awsRegion")
aws_registry = cls(
+ type_=type_,
aws_access_key_id=aws_access_key_id,
- aws_region=aws_region,
aws_secret_access_key=aws_secret_access_key,
- type_=type_,
+ aws_region=aws_region,
)
aws_registry.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/build_log_entry.py b/packages/python-sdk/e2b/api/client/models/build_log_entry.py
index 35cae954f..bd07f82ea 100644
--- a/packages/python-sdk/e2b/api/client/models/build_log_entry.py
+++ b/packages/python-sdk/e2b/api/client/models/build_log_entry.py
@@ -16,24 +16,24 @@ T = TypeVar("T", bound="BuildLogEntry")
class BuildLogEntry:
"""
Attributes:
- level (LogLevel): State of the sandbox
- message (str): Log message content
timestamp (datetime.datetime): Timestamp of the log entry
+ message (str): Log message content
+ level (LogLevel): State of the sandbox
step (Union[Unset, str]): Step in the build process related to the log entry
"""
- level: LogLevel
- message: str
timestamp: datetime.datetime
+ message: str
+ level: LogLevel
step: Union[Unset, str] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- level = self.level.value
+ timestamp = self.timestamp.isoformat()
message = self.message
- timestamp = self.timestamp.isoformat()
+ level = self.level.value
step = self.step
@@ -41,9 +41,9 @@ class BuildLogEntry:
field_dict.update(self.additional_properties)
field_dict.update(
{
- "level": level,
- "message": message,
"timestamp": timestamp,
+ "message": message,
+ "level": level,
}
)
if step is not UNSET:
@@ -54,18 +54,18 @@ class BuildLogEntry:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- level = LogLevel(d.pop("level"))
+ timestamp = isoparse(d.pop("timestamp"))
message = d.pop("message")
- timestamp = isoparse(d.pop("timestamp"))
+ level = LogLevel(d.pop("level"))
step = d.pop("step", UNSET)
build_log_entry = cls(
- level=level,
- message=message,
timestamp=timestamp,
+ message=message,
+ level=level,
step=step,
)
diff --git a/packages/python-sdk/e2b/api/client/models/build_status_reason.py b/packages/python-sdk/e2b/api/client/models/build_status_reason.py
index e2af40317..d6ce4437e 100644
--- a/packages/python-sdk/e2b/api/client/models/build_status_reason.py
+++ b/packages/python-sdk/e2b/api/client/models/build_status_reason.py
@@ -18,18 +18,20 @@ class BuildStatusReason:
"""
Attributes:
message (str): Message with the status reason, currently reporting only for error status
- log_entries (Union[Unset, list['BuildLogEntry']]): Log entries related to the status reason
step (Union[Unset, str]): Step that failed
+ log_entries (Union[Unset, list['BuildLogEntry']]): Log entries related to the status reason
"""
message: str
- log_entries: Union[Unset, list["BuildLogEntry"]] = UNSET
step: Union[Unset, str] = UNSET
+ log_entries: Union[Unset, list["BuildLogEntry"]] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
message = self.message
+ step = self.step
+
log_entries: Union[Unset, list[dict[str, Any]]] = UNSET
if not isinstance(self.log_entries, Unset):
log_entries = []
@@ -37,8 +39,6 @@ class BuildStatusReason:
log_entries_item = log_entries_item_data.to_dict()
log_entries.append(log_entries_item)
- step = self.step
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
@@ -46,10 +46,10 @@ class BuildStatusReason:
"message": message,
}
)
- if log_entries is not UNSET:
- field_dict["logEntries"] = log_entries
if step is not UNSET:
field_dict["step"] = step
+ if log_entries is not UNSET:
+ field_dict["logEntries"] = log_entries
return field_dict
@@ -60,6 +60,8 @@ class BuildStatusReason:
d = dict(src_dict)
message = d.pop("message")
+ step = d.pop("step", UNSET)
+
log_entries = []
_log_entries = d.pop("logEntries", UNSET)
for log_entries_item_data in _log_entries or []:
@@ -67,12 +69,10 @@ class BuildStatusReason:
log_entries.append(log_entries_item)
- step = d.pop("step", UNSET)
-
build_status_reason = cls(
message=message,
- log_entries=log_entries,
step=step,
+ log_entries=log_entries,
)
build_status_reason.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/created_access_token.py b/packages/python-sdk/e2b/api/client/models/created_access_token.py
index 04224adbc..2b038a2d7 100644
--- a/packages/python-sdk/e2b/api/client/models/created_access_token.py
+++ b/packages/python-sdk/e2b/api/client/models/created_access_token.py
@@ -18,40 +18,40 @@ T = TypeVar("T", bound="CreatedAccessToken")
class CreatedAccessToken:
"""
Attributes:
- created_at (datetime.datetime): Timestamp of access token creation
id (UUID): Identifier of the access token
- mask (IdentifierMaskingDetails):
name (str): Name of the access token
token (str): The fully created access token
+ mask (IdentifierMaskingDetails):
+ created_at (datetime.datetime): Timestamp of access token creation
"""
- created_at: datetime.datetime
id: UUID
- mask: "IdentifierMaskingDetails"
name: str
token: str
+ mask: "IdentifierMaskingDetails"
+ created_at: datetime.datetime
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- created_at = self.created_at.isoformat()
-
id = str(self.id)
- mask = self.mask.to_dict()
-
name = self.name
token = self.token
+ mask = self.mask.to_dict()
+
+ created_at = self.created_at.isoformat()
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "createdAt": created_at,
"id": id,
- "mask": mask,
"name": name,
"token": token,
+ "mask": mask,
+ "createdAt": created_at,
}
)
@@ -62,22 +62,22 @@ class CreatedAccessToken:
from ..models.identifier_masking_details import IdentifierMaskingDetails
d = dict(src_dict)
- created_at = isoparse(d.pop("createdAt"))
-
id = UUID(d.pop("id"))
- mask = IdentifierMaskingDetails.from_dict(d.pop("mask"))
-
name = d.pop("name")
token = d.pop("token")
+ mask = IdentifierMaskingDetails.from_dict(d.pop("mask"))
+
+ created_at = isoparse(d.pop("createdAt"))
+
created_access_token = cls(
- created_at=created_at,
id=id,
- mask=mask,
name=name,
token=token,
+ mask=mask,
+ created_at=created_at,
)
created_access_token.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/created_team_api_key.py b/packages/python-sdk/e2b/api/client/models/created_team_api_key.py
index f1d4150b7..2e9ee3ea0 100644
--- a/packages/python-sdk/e2b/api/client/models/created_team_api_key.py
+++ b/packages/python-sdk/e2b/api/client/models/created_team_api_key.py
@@ -21,20 +21,20 @@ T = TypeVar("T", bound="CreatedTeamAPIKey")
class CreatedTeamAPIKey:
"""
Attributes:
- created_at (datetime.datetime): Timestamp of API key creation
id (UUID): Identifier of the API key
key (str): Raw value of the API key
mask (IdentifierMaskingDetails):
name (str): Name of the API key
+ created_at (datetime.datetime): Timestamp of API key creation
created_by (Union['TeamUser', None, Unset]):
last_used (Union[None, Unset, datetime.datetime]): Last time this API key was used
"""
- created_at: datetime.datetime
id: UUID
key: str
mask: "IdentifierMaskingDetails"
name: str
+ created_at: datetime.datetime
created_by: Union["TeamUser", None, Unset] = UNSET
last_used: Union[None, Unset, datetime.datetime] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -42,8 +42,6 @@ class CreatedTeamAPIKey:
def to_dict(self) -> dict[str, Any]:
from ..models.team_user import TeamUser
- created_at = self.created_at.isoformat()
-
id = str(self.id)
key = self.key
@@ -52,6 +50,8 @@ class CreatedTeamAPIKey:
name = self.name
+ created_at = self.created_at.isoformat()
+
created_by: Union[None, Unset, dict[str, Any]]
if isinstance(self.created_by, Unset):
created_by = UNSET
@@ -72,11 +72,11 @@ class CreatedTeamAPIKey:
field_dict.update(self.additional_properties)
field_dict.update(
{
- "createdAt": created_at,
"id": id,
"key": key,
"mask": mask,
"name": name,
+ "createdAt": created_at,
}
)
if created_by is not UNSET:
@@ -92,8 +92,6 @@ class CreatedTeamAPIKey:
from ..models.team_user import TeamUser
d = dict(src_dict)
- created_at = isoparse(d.pop("createdAt"))
-
id = UUID(d.pop("id"))
key = d.pop("key")
@@ -102,6 +100,8 @@ class CreatedTeamAPIKey:
name = d.pop("name")
+ created_at = isoparse(d.pop("createdAt"))
+
def _parse_created_by(data: object) -> Union["TeamUser", None, Unset]:
if data is None:
return data
@@ -137,11 +137,11 @@ class CreatedTeamAPIKey:
last_used = _parse_last_used(d.pop("lastUsed", UNSET))
created_team_api_key = cls(
- created_at=created_at,
id=id,
key=key,
mask=mask,
name=name,
+ created_at=created_at,
created_by=created_by,
last_used=last_used,
)
diff --git a/packages/python-sdk/e2b/api/client/models/disk_metrics.py b/packages/python-sdk/e2b/api/client/models/disk_metrics.py
index 6d2b75c8f..c4528fa96 100644
--- a/packages/python-sdk/e2b/api/client/models/disk_metrics.py
+++ b/packages/python-sdk/e2b/api/client/models/disk_metrics.py
@@ -11,40 +11,40 @@ T = TypeVar("T", bound="DiskMetrics")
class DiskMetrics:
"""
Attributes:
+ mount_point (str): Mount point of the disk
device (str): Device name
filesystem_type (str): Filesystem type (e.g., ext4, xfs)
- mount_point (str): Mount point of the disk
- total_bytes (int): Total space in bytes
used_bytes (int): Used space in bytes
+ total_bytes (int): Total space in bytes
"""
+ mount_point: str
device: str
filesystem_type: str
- mount_point: str
- total_bytes: int
used_bytes: int
+ total_bytes: int
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
+ mount_point = self.mount_point
+
device = self.device
filesystem_type = self.filesystem_type
- mount_point = self.mount_point
+ used_bytes = self.used_bytes
total_bytes = self.total_bytes
- used_bytes = self.used_bytes
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
+ "mountPoint": mount_point,
"device": device,
"filesystemType": filesystem_type,
- "mountPoint": mount_point,
- "totalBytes": total_bytes,
"usedBytes": used_bytes,
+ "totalBytes": total_bytes,
}
)
@@ -53,22 +53,22 @@ class DiskMetrics:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
+ mount_point = d.pop("mountPoint")
+
device = d.pop("device")
filesystem_type = d.pop("filesystemType")
- mount_point = d.pop("mountPoint")
+ used_bytes = d.pop("usedBytes")
total_bytes = d.pop("totalBytes")
- used_bytes = d.pop("usedBytes")
-
disk_metrics = cls(
+ mount_point=mount_point,
device=device,
filesystem_type=filesystem_type,
- mount_point=mount_point,
- total_bytes=total_bytes,
used_bytes=used_bytes,
+ total_bytes=total_bytes,
)
disk_metrics.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/gcp_registry.py b/packages/python-sdk/e2b/api/client/models/gcp_registry.py
index 01b6ded00..ffc52ec36 100644
--- a/packages/python-sdk/e2b/api/client/models/gcp_registry.py
+++ b/packages/python-sdk/e2b/api/client/models/gcp_registry.py
@@ -13,25 +13,25 @@ T = TypeVar("T", bound="GCPRegistry")
class GCPRegistry:
"""
Attributes:
- service_account_json (str): Service Account JSON for GCP authentication
type_ (GCPRegistryType): Type of registry authentication
+ service_account_json (str): Service Account JSON for GCP authentication
"""
- service_account_json: str
type_: GCPRegistryType
+ service_account_json: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- service_account_json = self.service_account_json
-
type_ = self.type_.value
+ service_account_json = self.service_account_json
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "serviceAccountJson": service_account_json,
"type": type_,
+ "serviceAccountJson": service_account_json,
}
)
@@ -40,13 +40,13 @@ class GCPRegistry:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- service_account_json = d.pop("serviceAccountJson")
-
type_ = GCPRegistryType(d.pop("type"))
+ service_account_json = d.pop("serviceAccountJson")
+
gcp_registry = cls(
- service_account_json=service_account_json,
type_=type_,
+ service_account_json=service_account_json,
)
gcp_registry.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/general_registry.py b/packages/python-sdk/e2b/api/client/models/general_registry.py
index 38bc1795d..854d26140 100644
--- a/packages/python-sdk/e2b/api/client/models/general_registry.py
+++ b/packages/python-sdk/e2b/api/client/models/general_registry.py
@@ -13,30 +13,30 @@ T = TypeVar("T", bound="GeneralRegistry")
class GeneralRegistry:
"""
Attributes:
- password (str): Password to use for the registry
type_ (GeneralRegistryType): Type of registry authentication
username (str): Username to use for the registry
+ password (str): Password to use for the registry
"""
- password: str
type_: GeneralRegistryType
username: str
+ password: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- password = self.password
-
type_ = self.type_.value
username = self.username
+ password = self.password
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "password": password,
"type": type_,
"username": username,
+ "password": password,
}
)
@@ -45,16 +45,16 @@ class GeneralRegistry:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- password = d.pop("password")
-
type_ = GeneralRegistryType(d.pop("type"))
username = d.pop("username")
+ password = d.pop("password")
+
general_registry = cls(
- password=password,
type_=type_,
username=username,
+ password=password,
)
general_registry.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/identifier_masking_details.py b/packages/python-sdk/e2b/api/client/models/identifier_masking_details.py
index 60c0bdedb..021782526 100644
--- a/packages/python-sdk/e2b/api/client/models/identifier_masking_details.py
+++ b/packages/python-sdk/e2b/api/client/models/identifier_masking_details.py
@@ -11,35 +11,35 @@ T = TypeVar("T", bound="IdentifierMaskingDetails")
class IdentifierMaskingDetails:
"""
Attributes:
- masked_value_prefix (str): Prefix used in masked version of the token or key
- masked_value_suffix (str): Suffix used in masked version of the token or key
prefix (str): Prefix that identifies the token or key type
value_length (int): Length of the token or key
+ masked_value_prefix (str): Prefix used in masked version of the token or key
+ masked_value_suffix (str): Suffix used in masked version of the token or key
"""
- masked_value_prefix: str
- masked_value_suffix: str
prefix: str
value_length: int
+ masked_value_prefix: str
+ masked_value_suffix: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- masked_value_prefix = self.masked_value_prefix
-
- masked_value_suffix = self.masked_value_suffix
-
prefix = self.prefix
value_length = self.value_length
+ masked_value_prefix = self.masked_value_prefix
+
+ masked_value_suffix = self.masked_value_suffix
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "maskedValuePrefix": masked_value_prefix,
- "maskedValueSuffix": masked_value_suffix,
"prefix": prefix,
"valueLength": value_length,
+ "maskedValuePrefix": masked_value_prefix,
+ "maskedValueSuffix": masked_value_suffix,
}
)
@@ -48,19 +48,19 @@ class IdentifierMaskingDetails:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- masked_value_prefix = d.pop("maskedValuePrefix")
-
- masked_value_suffix = d.pop("maskedValueSuffix")
-
prefix = d.pop("prefix")
value_length = d.pop("valueLength")
+ masked_value_prefix = d.pop("maskedValuePrefix")
+
+ masked_value_suffix = d.pop("maskedValueSuffix")
+
identifier_masking_details = cls(
- masked_value_prefix=masked_value_prefix,
- masked_value_suffix=masked_value_suffix,
prefix=prefix,
value_length=value_length,
+ masked_value_prefix=masked_value_prefix,
+ masked_value_suffix=masked_value_suffix,
)
identifier_masking_details.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/listed_sandbox.py b/packages/python-sdk/e2b/api/client/models/listed_sandbox.py
index 3cc572bf1..aa14e7efc 100644
--- a/packages/python-sdk/e2b/api/client/models/listed_sandbox.py
+++ b/packages/python-sdk/e2b/api/client/models/listed_sandbox.py
@@ -20,56 +20,56 @@ T = TypeVar("T", bound="ListedSandbox")
class ListedSandbox:
"""
Attributes:
+ template_id (str): Identifier of the template from which is the sandbox created
+ sandbox_id (str): Identifier of the sandbox
client_id (str): Identifier of the client
- cpu_count (int): CPU cores for the sandbox
- disk_size_mb (int): Disk size for the sandbox in MiB
+ started_at (datetime.datetime): Time when the sandbox was started
end_at (datetime.datetime): Time when the sandbox will expire
- envd_version (str): Version of the envd running in the sandbox
+ cpu_count (int): CPU cores for the sandbox
memory_mb (int): Memory for the sandbox in MiB
- sandbox_id (str): Identifier of the sandbox
- started_at (datetime.datetime): Time when the sandbox was started
+ disk_size_mb (int): Disk size for the sandbox in MiB
state (SandboxState): State of the sandbox
- template_id (str): Identifier of the template from which is the sandbox created
+ envd_version (str): Version of the envd running in the sandbox
alias (Union[Unset, str]): Alias of the template
metadata (Union[Unset, Any]):
volume_mounts (Union[Unset, list['SandboxVolumeMount']]):
"""
+ template_id: str
+ sandbox_id: str
client_id: str
- cpu_count: int
- disk_size_mb: int
+ started_at: datetime.datetime
end_at: datetime.datetime
- envd_version: str
+ cpu_count: int
memory_mb: int
- sandbox_id: str
- started_at: datetime.datetime
+ disk_size_mb: int
state: SandboxState
- template_id: str
+ envd_version: str
alias: Union[Unset, str] = UNSET
metadata: Union[Unset, Any] = UNSET
volume_mounts: Union[Unset, list["SandboxVolumeMount"]] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- client_id = self.client_id
+ template_id = self.template_id
- cpu_count = self.cpu_count
+ sandbox_id = self.sandbox_id
- disk_size_mb = self.disk_size_mb
+ client_id = self.client_id
+
+ started_at = self.started_at.isoformat()
end_at = self.end_at.isoformat()
- envd_version = self.envd_version
+ cpu_count = self.cpu_count
memory_mb = self.memory_mb
- sandbox_id = self.sandbox_id
-
- started_at = self.started_at.isoformat()
+ disk_size_mb = self.disk_size_mb
state = self.state.value
- template_id = self.template_id
+ envd_version = self.envd_version
alias = self.alias
@@ -86,16 +86,16 @@ class ListedSandbox:
field_dict.update(self.additional_properties)
field_dict.update(
{
+ "templateID": template_id,
+ "sandboxID": sandbox_id,
"clientID": client_id,
- "cpuCount": cpu_count,
- "diskSizeMB": disk_size_mb,
+ "startedAt": started_at,
"endAt": end_at,
- "envdVersion": envd_version,
+ "cpuCount": cpu_count,
"memoryMB": memory_mb,
- "sandboxID": sandbox_id,
- "startedAt": started_at,
+ "diskSizeMB": disk_size_mb,
"state": state,
- "templateID": template_id,
+ "envdVersion": envd_version,
}
)
if alias is not UNSET:
@@ -112,25 +112,25 @@ class ListedSandbox:
from ..models.sandbox_volume_mount import SandboxVolumeMount
d = dict(src_dict)
- client_id = d.pop("clientID")
+ template_id = d.pop("templateID")
- cpu_count = d.pop("cpuCount")
+ sandbox_id = d.pop("sandboxID")
- disk_size_mb = d.pop("diskSizeMB")
+ client_id = d.pop("clientID")
+
+ started_at = isoparse(d.pop("startedAt"))
end_at = isoparse(d.pop("endAt"))
- envd_version = d.pop("envdVersion")
+ cpu_count = d.pop("cpuCount")
memory_mb = d.pop("memoryMB")
- sandbox_id = d.pop("sandboxID")
-
- started_at = isoparse(d.pop("startedAt"))
+ disk_size_mb = d.pop("diskSizeMB")
state = SandboxState(d.pop("state"))
- template_id = d.pop("templateID")
+ envd_version = d.pop("envdVersion")
alias = d.pop("alias", UNSET)
@@ -144,16 +144,16 @@ class ListedSandbox:
volume_mounts.append(volume_mounts_item)
listed_sandbox = cls(
+ template_id=template_id,
+ sandbox_id=sandbox_id,
client_id=client_id,
- cpu_count=cpu_count,
- disk_size_mb=disk_size_mb,
+ started_at=started_at,
end_at=end_at,
- envd_version=envd_version,
+ cpu_count=cpu_count,
memory_mb=memory_mb,
- sandbox_id=sandbox_id,
- started_at=started_at,
+ disk_size_mb=disk_size_mb,
state=state,
- template_id=template_id,
+ envd_version=envd_version,
alias=alias,
metadata=metadata,
volume_mounts=volume_mounts,
diff --git a/packages/python-sdk/e2b/api/client/models/machine_info.py b/packages/python-sdk/e2b/api/client/models/machine_info.py
index cd63ef0cb..cd36351ba 100644
--- a/packages/python-sdk/e2b/api/client/models/machine_info.py
+++ b/packages/python-sdk/e2b/api/client/models/machine_info.py
@@ -11,35 +11,35 @@ T = TypeVar("T", bound="MachineInfo")
class MachineInfo:
"""
Attributes:
- cpu_architecture (str): CPU architecture of the node
cpu_family (str): CPU family of the node
cpu_model (str): CPU model of the node
cpu_model_name (str): CPU model name of the node
+ cpu_architecture (str): CPU architecture of the node
"""
- cpu_architecture: str
cpu_family: str
cpu_model: str
cpu_model_name: str
+ cpu_architecture: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- cpu_architecture = self.cpu_architecture
-
cpu_family = self.cpu_family
cpu_model = self.cpu_model
cpu_model_name = self.cpu_model_name
+ cpu_architecture = self.cpu_architecture
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "cpuArchitecture": cpu_architecture,
"cpuFamily": cpu_family,
"cpuModel": cpu_model,
"cpuModelName": cpu_model_name,
+ "cpuArchitecture": cpu_architecture,
}
)
@@ -48,19 +48,19 @@ class MachineInfo:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- cpu_architecture = d.pop("cpuArchitecture")
-
cpu_family = d.pop("cpuFamily")
cpu_model = d.pop("cpuModel")
cpu_model_name = d.pop("cpuModelName")
+ cpu_architecture = d.pop("cpuArchitecture")
+
machine_info = cls(
- cpu_architecture=cpu_architecture,
cpu_family=cpu_family,
cpu_model=cpu_model,
cpu_model_name=cpu_model_name,
+ cpu_architecture=cpu_architecture,
)
machine_info.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/new_sandbox.py b/packages/python-sdk/e2b/api/client/models/new_sandbox.py
index d09b636c2..c511ffff1 100644
--- a/packages/python-sdk/e2b/api/client/models/new_sandbox.py
+++ b/packages/python-sdk/e2b/api/client/models/new_sandbox.py
@@ -9,6 +9,7 @@ from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.mcp_type_0 import McpType0
from ..models.sandbox_auto_resume_config import SandboxAutoResumeConfig
+ from ..models.sandbox_iam import SandboxIam
from ..models.sandbox_network_config import SandboxNetworkConfig
from ..models.sandbox_volume_mount import SandboxVolumeMount
@@ -21,8 +22,7 @@ class NewSandbox:
"""
Attributes:
template_id (str): Identifier of the required template
- allow_internet_access (Union[Unset, bool]): Allow sandbox to access the internet. When set to false, it behaves
- the same as specifying denyOut to 0.0.0.0/0 in the network config.
+ timeout (Union[Unset, int]): Time to live for the sandbox in seconds. Default: 15.
auto_pause (Union[Unset, bool]): Automatically pauses the sandbox after the timeout Default: False.
auto_pause_memory (Union[Unset, bool]): Controls the snapshot kind taken when the sandbox auto-pauses on timeout
(only relevant when autoPause is true). When false, the auto-pause drops the in-memory state and persists only
@@ -30,26 +30,30 @@ class NewSandbox:
snapshot cannot be auto-resumed by traffic and must be resumed explicitly, so it cannot be combined with
autoResume. Defaults to true (full memory snapshot). Default: True.
auto_resume (Union[Unset, SandboxAutoResumeConfig]): Auto-resume configuration for paused sandboxes.
+ secure (Union[Unset, bool]): Secure all system communication with sandbox
+ allow_internet_access (Union[Unset, bool]): Allow sandbox to access the internet. When set to false, it behaves
+ the same as specifying denyOut to 0.0.0.0/0 in the network config.
+ network (Union[Unset, SandboxNetworkConfig]):
+ metadata (Union[Unset, Any]):
env_vars (Union[Unset, Any]):
mcp (Union['McpType0', None, Unset]): MCP configuration for the sandbox
- metadata (Union[Unset, Any]):
- network (Union[Unset, SandboxNetworkConfig]):
- secure (Union[Unset, bool]): Secure all system communication with sandbox
- timeout (Union[Unset, int]): Time to live for the sandbox in seconds. Default: 15.
+ iam (Union[Unset, SandboxIam]): Sandbox workload identity configuration. A non-empty, valid tokens map enables
+ workload identity for the sandbox.
volume_mounts (Union[Unset, list['SandboxVolumeMount']]):
"""
template_id: str
- allow_internet_access: Union[Unset, bool] = UNSET
+ timeout: Union[Unset, int] = 15
auto_pause: Union[Unset, bool] = False
auto_pause_memory: Union[Unset, bool] = True
auto_resume: Union[Unset, "SandboxAutoResumeConfig"] = UNSET
+ secure: Union[Unset, bool] = UNSET
+ allow_internet_access: Union[Unset, bool] = UNSET
+ network: Union[Unset, "SandboxNetworkConfig"] = UNSET
+ metadata: Union[Unset, Any] = UNSET
env_vars: Union[Unset, Any] = UNSET
mcp: Union["McpType0", None, Unset] = UNSET
- metadata: Union[Unset, Any] = UNSET
- network: Union[Unset, "SandboxNetworkConfig"] = UNSET
- secure: Union[Unset, bool] = UNSET
- timeout: Union[Unset, int] = 15
+ iam: Union[Unset, "SandboxIam"] = UNSET
volume_mounts: Union[Unset, list["SandboxVolumeMount"]] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -58,7 +62,7 @@ class NewSandbox:
template_id = self.template_id
- allow_internet_access = self.allow_internet_access
+ timeout = self.timeout
auto_pause = self.auto_pause
@@ -68,6 +72,16 @@ class NewSandbox:
if not isinstance(self.auto_resume, Unset):
auto_resume = self.auto_resume.to_dict()
+ secure = self.secure
+
+ allow_internet_access = self.allow_internet_access
+
+ network: Union[Unset, dict[str, Any]] = UNSET
+ if not isinstance(self.network, Unset):
+ network = self.network.to_dict()
+
+ metadata = self.metadata
+
env_vars = self.env_vars
mcp: Union[None, Unset, dict[str, Any]]
@@ -78,15 +92,9 @@ class NewSandbox:
else:
mcp = self.mcp
- metadata = self.metadata
-
- network: Union[Unset, dict[str, Any]] = UNSET
- if not isinstance(self.network, Unset):
- network = self.network.to_dict()
-
- secure = self.secure
-
- timeout = self.timeout
+ iam: Union[Unset, dict[str, Any]] = UNSET
+ if not isinstance(self.iam, Unset):
+ iam = self.iam.to_dict()
volume_mounts: Union[Unset, list[dict[str, Any]]] = UNSET
if not isinstance(self.volume_mounts, Unset):
@@ -102,26 +110,28 @@ class NewSandbox:
"templateID": template_id,
}
)
- if allow_internet_access is not UNSET:
- field_dict["allow_internet_access"] = allow_internet_access
+ if timeout is not UNSET:
+ field_dict["timeout"] = timeout
if auto_pause is not UNSET:
field_dict["autoPause"] = auto_pause
if auto_pause_memory is not UNSET:
field_dict["autoPauseMemory"] = auto_pause_memory
if auto_resume is not UNSET:
field_dict["autoResume"] = auto_resume
+ if secure is not UNSET:
+ field_dict["secure"] = secure
+ if allow_internet_access is not UNSET:
+ field_dict["allow_internet_access"] = allow_internet_access
+ if network is not UNSET:
+ field_dict["network"] = network
+ if metadata is not UNSET:
+ field_dict["metadata"] = metadata
if env_vars is not UNSET:
field_dict["envVars"] = env_vars
if mcp is not UNSET:
field_dict["mcp"] = mcp
- if metadata is not UNSET:
- field_dict["metadata"] = metadata
- if network is not UNSET:
- field_dict["network"] = network
- if secure is not UNSET:
- field_dict["secure"] = secure
- if timeout is not UNSET:
- field_dict["timeout"] = timeout
+ if iam is not UNSET:
+ field_dict["iam"] = iam
if volume_mounts is not UNSET:
field_dict["volumeMounts"] = volume_mounts
@@ -131,13 +141,14 @@ class NewSandbox:
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
from ..models.mcp_type_0 import McpType0
from ..models.sandbox_auto_resume_config import SandboxAutoResumeConfig
+ from ..models.sandbox_iam import SandboxIam
from ..models.sandbox_network_config import SandboxNetworkConfig
from ..models.sandbox_volume_mount import SandboxVolumeMount
d = dict(src_dict)
template_id = d.pop("templateID")
- allow_internet_access = d.pop("allow_internet_access", UNSET)
+ timeout = d.pop("timeout", UNSET)
auto_pause = d.pop("autoPause", UNSET)
@@ -150,6 +161,19 @@ class NewSandbox:
else:
auto_resume = SandboxAutoResumeConfig.from_dict(_auto_resume)
+ secure = d.pop("secure", UNSET)
+
+ allow_internet_access = d.pop("allow_internet_access", UNSET)
+
+ _network = d.pop("network", UNSET)
+ network: Union[Unset, SandboxNetworkConfig]
+ if isinstance(_network, Unset):
+ network = UNSET
+ else:
+ network = SandboxNetworkConfig.from_dict(_network)
+
+ metadata = d.pop("metadata", UNSET)
+
env_vars = d.pop("envVars", UNSET)
def _parse_mcp(data: object) -> Union["McpType0", None, Unset]:
@@ -169,18 +193,12 @@ class NewSandbox:
mcp = _parse_mcp(d.pop("mcp", UNSET))
- metadata = d.pop("metadata", UNSET)
-
- _network = d.pop("network", UNSET)
- network: Union[Unset, SandboxNetworkConfig]
- if isinstance(_network, Unset):
- network = UNSET
+ _iam = d.pop("iam", UNSET)
+ iam: Union[Unset, SandboxIam]
+ if isinstance(_iam, Unset):
+ iam = UNSET
else:
- network = SandboxNetworkConfig.from_dict(_network)
-
- secure = d.pop("secure", UNSET)
-
- timeout = d.pop("timeout", UNSET)
+ iam = SandboxIam.from_dict(_iam)
volume_mounts = []
_volume_mounts = d.pop("volumeMounts", UNSET)
@@ -191,16 +209,17 @@ class NewSandbox:
new_sandbox = cls(
template_id=template_id,
- allow_internet_access=allow_internet_access,
+ timeout=timeout,
auto_pause=auto_pause,
auto_pause_memory=auto_pause_memory,
auto_resume=auto_resume,
+ secure=secure,
+ allow_internet_access=allow_internet_access,
+ network=network,
+ metadata=metadata,
env_vars=env_vars,
mcp=mcp,
- metadata=metadata,
- network=network,
- secure=secure,
- timeout=timeout,
+ iam=iam,
volume_mounts=volume_mounts,
)
diff --git a/packages/python-sdk/e2b/api/client/models/node.py b/packages/python-sdk/e2b/api/client/models/node.py
index f7d2a47f6..dfae913b9 100644
--- a/packages/python-sdk/e2b/api/client/models/node.py
+++ b/packages/python-sdk/e2b/api/client/models/node.py
@@ -1,8 +1,10 @@
+import datetime
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
+from dateutil.parser import isoparse
from ..models.node_status import NodeStatus
@@ -18,78 +20,83 @@ T = TypeVar("T", bound="Node")
class Node:
"""
Attributes:
- cluster_id (str): Identifier of the cluster
+ version (str): Version of the orchestrator
commit (str): Commit of the orchestrator
- create_fails (int): Number of sandbox create fails
- create_successes (int): Number of sandbox create successes
id (str): Identifier of the node
- machine_info (MachineInfo):
- metrics (NodeMetrics): Node metrics
- sandbox_count (int): Number of sandboxes running on the node
- sandbox_starting_count (int): Number of starting Sandboxes
service_instance_id (str): Service instance identifier of the node
+ cluster_id (str): Identifier of the cluster
+ machine_info (MachineInfo):
status (NodeStatus): Status of the node.
- draining: the node is bound to be shut down. It will not accept new sandboxes and will stop once all existing
sandboxes are done.
- standby: the node is not actively used, but it can return to ready and continue serving traffic.
- version (str): Version of the orchestrator
+ status_changed_at (datetime.datetime): Time when the node status was last changed
+ sandbox_count (int): Number of sandboxes running on the node
+ metrics (NodeMetrics): Node metrics
+ create_successes (int): Number of sandbox create successes
+ create_fails (int): Number of sandbox create fails
+ sandbox_starting_count (int): Number of starting Sandboxes
"""
- cluster_id: str
+ version: str
commit: str
- create_fails: int
- create_successes: int
id: str
+ service_instance_id: str
+ cluster_id: str
machine_info: "MachineInfo"
- metrics: "NodeMetrics"
+ status: NodeStatus
+ status_changed_at: datetime.datetime
sandbox_count: int
+ metrics: "NodeMetrics"
+ create_successes: int
+ create_fails: int
sandbox_starting_count: int
- service_instance_id: str
- status: NodeStatus
- version: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- cluster_id = self.cluster_id
+ version = self.version
commit = self.commit
- create_fails = self.create_fails
+ id = self.id
- create_successes = self.create_successes
+ service_instance_id = self.service_instance_id
- id = self.id
+ cluster_id = self.cluster_id
machine_info = self.machine_info.to_dict()
- metrics = self.metrics.to_dict()
+ status = self.status.value
+
+ status_changed_at = self.status_changed_at.isoformat()
sandbox_count = self.sandbox_count
- sandbox_starting_count = self.sandbox_starting_count
+ metrics = self.metrics.to_dict()
- service_instance_id = self.service_instance_id
+ create_successes = self.create_successes
- status = self.status.value
+ create_fails = self.create_fails
- version = self.version
+ sandbox_starting_count = self.sandbox_starting_count
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "clusterID": cluster_id,
+ "version": version,
"commit": commit,
- "createFails": create_fails,
- "createSuccesses": create_successes,
"id": id,
+ "serviceInstanceID": service_instance_id,
+ "clusterID": cluster_id,
"machineInfo": machine_info,
- "metrics": metrics,
+ "status": status,
+ "statusChangedAt": status_changed_at,
"sandboxCount": sandbox_count,
+ "metrics": metrics,
+ "createSuccesses": create_successes,
+ "createFails": create_fails,
"sandboxStartingCount": sandbox_starting_count,
- "serviceInstanceID": service_instance_id,
- "status": status,
- "version": version,
}
)
@@ -101,43 +108,46 @@ class Node:
from ..models.node_metrics import NodeMetrics
d = dict(src_dict)
- cluster_id = d.pop("clusterID")
+ version = d.pop("version")
commit = d.pop("commit")
- create_fails = d.pop("createFails")
+ id = d.pop("id")
- create_successes = d.pop("createSuccesses")
+ service_instance_id = d.pop("serviceInstanceID")
- id = d.pop("id")
+ cluster_id = d.pop("clusterID")
machine_info = MachineInfo.from_dict(d.pop("machineInfo"))
- metrics = NodeMetrics.from_dict(d.pop("metrics"))
+ status = NodeStatus(d.pop("status"))
+
+ status_changed_at = isoparse(d.pop("statusChangedAt"))
sandbox_count = d.pop("sandboxCount")
- sandbox_starting_count = d.pop("sandboxStartingCount")
+ metrics = NodeMetrics.from_dict(d.pop("metrics"))
- service_instance_id = d.pop("serviceInstanceID")
+ create_successes = d.pop("createSuccesses")
- status = NodeStatus(d.pop("status"))
+ create_fails = d.pop("createFails")
- version = d.pop("version")
+ sandbox_starting_count = d.pop("sandboxStartingCount")
node = cls(
- cluster_id=cluster_id,
+ version=version,
commit=commit,
- create_fails=create_fails,
- create_successes=create_successes,
id=id,
+ service_instance_id=service_instance_id,
+ cluster_id=cluster_id,
machine_info=machine_info,
- metrics=metrics,
+ status=status,
+ status_changed_at=status_changed_at,
sandbox_count=sandbox_count,
+ metrics=metrics,
+ create_successes=create_successes,
+ create_fails=create_fails,
sandbox_starting_count=sandbox_starting_count,
- service_instance_id=service_instance_id,
- status=status,
- version=version,
)
node.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/node_detail.py b/packages/python-sdk/e2b/api/client/models/node_detail.py
index a5c1f61d3..9aabc2525 100644
--- a/packages/python-sdk/e2b/api/client/models/node_detail.py
+++ b/packages/python-sdk/e2b/api/client/models/node_detail.py
@@ -1,8 +1,10 @@
+import datetime
from collections.abc import Mapping
from typing import TYPE_CHECKING, Any, TypeVar, cast
from attrs import define as _attrs_define
from attrs import field as _attrs_field
+from dateutil.parser import isoparse
from ..models.node_status import NodeStatus
@@ -18,78 +20,83 @@ T = TypeVar("T", bound="NodeDetail")
class NodeDetail:
"""
Attributes:
- cached_builds (list[str]): List of cached builds id on the node
cluster_id (str): Identifier of the cluster
+ version (str): Version of the orchestrator
commit (str): Commit of the orchestrator
- create_fails (int): Number of sandbox create fails
- create_successes (int): Number of sandbox create successes
id (str): Identifier of the node
- machine_info (MachineInfo):
- metrics (NodeMetrics): Node metrics
- sandbox_count (int): Number of sandboxes running on the node
service_instance_id (str): Service instance identifier of the node
+ machine_info (MachineInfo):
status (NodeStatus): Status of the node.
- draining: the node is bound to be shut down. It will not accept new sandboxes and will stop once all existing
sandboxes are done.
- standby: the node is not actively used, but it can return to ready and continue serving traffic.
- version (str): Version of the orchestrator
+ status_changed_at (datetime.datetime): Time when the node status was last changed
+ sandbox_count (int): Number of sandboxes running on the node
+ metrics (NodeMetrics): Node metrics
+ cached_builds (list[str]): List of cached builds id on the node
+ create_successes (int): Number of sandbox create successes
+ create_fails (int): Number of sandbox create fails
"""
- cached_builds: list[str]
cluster_id: str
+ version: str
commit: str
- create_fails: int
- create_successes: int
id: str
- machine_info: "MachineInfo"
- metrics: "NodeMetrics"
- sandbox_count: int
service_instance_id: str
+ machine_info: "MachineInfo"
status: NodeStatus
- version: str
+ status_changed_at: datetime.datetime
+ sandbox_count: int
+ metrics: "NodeMetrics"
+ cached_builds: list[str]
+ create_successes: int
+ create_fails: int
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- cached_builds = self.cached_builds
-
cluster_id = self.cluster_id
- commit = self.commit
-
- create_fails = self.create_fails
+ version = self.version
- create_successes = self.create_successes
+ commit = self.commit
id = self.id
+ service_instance_id = self.service_instance_id
+
machine_info = self.machine_info.to_dict()
- metrics = self.metrics.to_dict()
+ status = self.status.value
+
+ status_changed_at = self.status_changed_at.isoformat()
sandbox_count = self.sandbox_count
- service_instance_id = self.service_instance_id
+ metrics = self.metrics.to_dict()
- status = self.status.value
+ cached_builds = self.cached_builds
- version = self.version
+ create_successes = self.create_successes
+
+ create_fails = self.create_fails
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "cachedBuilds": cached_builds,
"clusterID": cluster_id,
+ "version": version,
"commit": commit,
- "createFails": create_fails,
- "createSuccesses": create_successes,
"id": id,
- "machineInfo": machine_info,
- "metrics": metrics,
- "sandboxCount": sandbox_count,
"serviceInstanceID": service_instance_id,
+ "machineInfo": machine_info,
"status": status,
- "version": version,
+ "statusChangedAt": status_changed_at,
+ "sandboxCount": sandbox_count,
+ "metrics": metrics,
+ "cachedBuilds": cached_builds,
+ "createSuccesses": create_successes,
+ "createFails": create_fails,
}
)
@@ -101,43 +108,46 @@ class NodeDetail:
from ..models.node_metrics import NodeMetrics
d = dict(src_dict)
- cached_builds = cast(list[str], d.pop("cachedBuilds"))
-
cluster_id = d.pop("clusterID")
- commit = d.pop("commit")
-
- create_fails = d.pop("createFails")
+ version = d.pop("version")
- create_successes = d.pop("createSuccesses")
+ commit = d.pop("commit")
id = d.pop("id")
+ service_instance_id = d.pop("serviceInstanceID")
+
machine_info = MachineInfo.from_dict(d.pop("machineInfo"))
- metrics = NodeMetrics.from_dict(d.pop("metrics"))
+ status = NodeStatus(d.pop("status"))
+
+ status_changed_at = isoparse(d.pop("statusChangedAt"))
sandbox_count = d.pop("sandboxCount")
- service_instance_id = d.pop("serviceInstanceID")
+ metrics = NodeMetrics.from_dict(d.pop("metrics"))
- status = NodeStatus(d.pop("status"))
+ cached_builds = cast(list[str], d.pop("cachedBuilds"))
- version = d.pop("version")
+ create_successes = d.pop("createSuccesses")
+
+ create_fails = d.pop("createFails")
node_detail = cls(
- cached_builds=cached_builds,
cluster_id=cluster_id,
+ version=version,
commit=commit,
- create_fails=create_fails,
- create_successes=create_successes,
id=id,
- machine_info=machine_info,
- metrics=metrics,
- sandbox_count=sandbox_count,
service_instance_id=service_instance_id,
+ machine_info=machine_info,
status=status,
- version=version,
+ status_changed_at=status_changed_at,
+ sandbox_count=sandbox_count,
+ metrics=metrics,
+ cached_builds=cached_builds,
+ create_successes=create_successes,
+ create_fails=create_fails,
)
node_detail.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/node_metrics.py b/packages/python-sdk/e2b/api/client/models/node_metrics.py
index 129d74fc4..b53a5a1ef 100644
--- a/packages/python-sdk/e2b/api/client/models/node_metrics.py
+++ b/packages/python-sdk/e2b/api/client/models/node_metrics.py
@@ -17,52 +17,72 @@ class NodeMetrics:
Attributes:
allocated_cpu (int): Number of allocated CPU cores
- allocated_memory_bytes (int): Amount of allocated memory in bytes
- cpu_count (int): Total number of CPU cores on the node
cpu_percent (int): Node CPU usage percentage
- disks (list['DiskMetrics']): Detailed metrics for each disk/mount point
- memory_total_bytes (int): Total node memory in bytes
+ cpu_count (int): Total number of CPU cores on the node
+ allocated_memory_bytes (int): Amount of allocated memory in bytes
memory_used_bytes (int): Node memory used in bytes
+ memory_total_bytes (int): Total node memory in bytes
+ huge_pages_total (int): Total number of preallocated hugepages on the node
+ huge_pages_used (int): Number of hugepages in use (total - free)
+ huge_pages_reserved (int): Number of reserved hugepages (committed but not yet faulted)
+ huge_page_size_bytes (int): Size of a single hugepage in bytes
+ disks (list['DiskMetrics']): Detailed metrics for each disk/mount point
"""
allocated_cpu: int
- allocated_memory_bytes: int
- cpu_count: int
cpu_percent: int
- disks: list["DiskMetrics"]
- memory_total_bytes: int
+ cpu_count: int
+ allocated_memory_bytes: int
memory_used_bytes: int
+ memory_total_bytes: int
+ huge_pages_total: int
+ huge_pages_used: int
+ huge_pages_reserved: int
+ huge_page_size_bytes: int
+ disks: list["DiskMetrics"]
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
allocated_cpu = self.allocated_cpu
- allocated_memory_bytes = self.allocated_memory_bytes
+ cpu_percent = self.cpu_percent
cpu_count = self.cpu_count
- cpu_percent = self.cpu_percent
+ allocated_memory_bytes = self.allocated_memory_bytes
+
+ memory_used_bytes = self.memory_used_bytes
+
+ memory_total_bytes = self.memory_total_bytes
+
+ huge_pages_total = self.huge_pages_total
+
+ huge_pages_used = self.huge_pages_used
+
+ huge_pages_reserved = self.huge_pages_reserved
+
+ huge_page_size_bytes = self.huge_page_size_bytes
disks = []
for disks_item_data in self.disks:
disks_item = disks_item_data.to_dict()
disks.append(disks_item)
- memory_total_bytes = self.memory_total_bytes
-
- memory_used_bytes = self.memory_used_bytes
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"allocatedCPU": allocated_cpu,
- "allocatedMemoryBytes": allocated_memory_bytes,
- "cpuCount": cpu_count,
"cpuPercent": cpu_percent,
- "disks": disks,
- "memoryTotalBytes": memory_total_bytes,
+ "cpuCount": cpu_count,
+ "allocatedMemoryBytes": allocated_memory_bytes,
"memoryUsedBytes": memory_used_bytes,
+ "memoryTotalBytes": memory_total_bytes,
+ "hugePagesTotal": huge_pages_total,
+ "hugePagesUsed": huge_pages_used,
+ "hugePagesReserved": huge_pages_reserved,
+ "hugePageSizeBytes": huge_page_size_bytes,
+ "disks": disks,
}
)
@@ -75,11 +95,23 @@ class NodeMetrics:
d = dict(src_dict)
allocated_cpu = d.pop("allocatedCPU")
- allocated_memory_bytes = d.pop("allocatedMemoryBytes")
+ cpu_percent = d.pop("cpuPercent")
cpu_count = d.pop("cpuCount")
- cpu_percent = d.pop("cpuPercent")
+ allocated_memory_bytes = d.pop("allocatedMemoryBytes")
+
+ memory_used_bytes = d.pop("memoryUsedBytes")
+
+ memory_total_bytes = d.pop("memoryTotalBytes")
+
+ huge_pages_total = d.pop("hugePagesTotal")
+
+ huge_pages_used = d.pop("hugePagesUsed")
+
+ huge_pages_reserved = d.pop("hugePagesReserved")
+
+ huge_page_size_bytes = d.pop("hugePageSizeBytes")
disks = []
_disks = d.pop("disks")
@@ -88,18 +120,18 @@ class NodeMetrics:
disks.append(disks_item)
- memory_total_bytes = d.pop("memoryTotalBytes")
-
- memory_used_bytes = d.pop("memoryUsedBytes")
-
node_metrics = cls(
allocated_cpu=allocated_cpu,
- allocated_memory_bytes=allocated_memory_bytes,
- cpu_count=cpu_count,
cpu_percent=cpu_percent,
- disks=disks,
- memory_total_bytes=memory_total_bytes,
+ cpu_count=cpu_count,
+ allocated_memory_bytes=allocated_memory_bytes,
memory_used_bytes=memory_used_bytes,
+ memory_total_bytes=memory_total_bytes,
+ huge_pages_total=huge_pages_total,
+ huge_pages_used=huge_pages_used,
+ huge_pages_reserved=huge_pages_reserved,
+ huge_page_size_bytes=huge_page_size_bytes,
+ disks=disks,
)
node_metrics.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/resumed_sandbox.py b/packages/python-sdk/e2b/api/client/models/resumed_sandbox.py
index d990dc84f..915e6ab67 100644
--- a/packages/python-sdk/e2b/api/client/models/resumed_sandbox.py
+++ b/packages/python-sdk/e2b/api/client/models/resumed_sandbox.py
@@ -13,39 +13,39 @@ T = TypeVar("T", bound="ResumedSandbox")
class ResumedSandbox:
"""
Attributes:
- auto_pause (Union[Unset, bool]): Automatically pauses the sandbox after the timeout
timeout (Union[Unset, int]): Time to live for the sandbox in seconds. Default: 15.
+ auto_pause (Union[Unset, bool]): Automatically pauses the sandbox after the timeout
"""
- auto_pause: Union[Unset, bool] = UNSET
timeout: Union[Unset, int] = 15
+ auto_pause: Union[Unset, bool] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- auto_pause = self.auto_pause
-
timeout = self.timeout
+ auto_pause = self.auto_pause
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
- if auto_pause is not UNSET:
- field_dict["autoPause"] = auto_pause
if timeout is not UNSET:
field_dict["timeout"] = timeout
+ if auto_pause is not UNSET:
+ field_dict["autoPause"] = auto_pause
return field_dict
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- auto_pause = d.pop("autoPause", UNSET)
-
timeout = d.pop("timeout", UNSET)
+ auto_pause = d.pop("autoPause", UNSET)
+
resumed_sandbox = cls(
- auto_pause=auto_pause,
timeout=timeout,
+ auto_pause=auto_pause,
)
resumed_sandbox.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox.py b/packages/python-sdk/e2b/api/client/models/sandbox.py
index 2eddc5f55..651a13205 100644
--- a/packages/python-sdk/e2b/api/client/models/sandbox.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox.py
@@ -13,42 +13,36 @@ T = TypeVar("T", bound="Sandbox")
class Sandbox:
"""
Attributes:
+ template_id (str): Identifier of the template from which is the sandbox created
+ sandbox_id (str): Identifier of the sandbox
client_id (str): Identifier of the client
envd_version (str): Version of the envd running in the sandbox
- sandbox_id (str): Identifier of the sandbox
- template_id (str): Identifier of the template from which is the sandbox created
alias (Union[Unset, str]): Alias of the template
- domain (Union[None, Unset, str]): Base domain where the sandbox traffic is accessible
envd_access_token (Union[Unset, str]): Access token used for envd communication
traffic_access_token (Union[None, Unset, str]): Token required for accessing sandbox via proxy.
+ domain (Union[None, Unset, str]): Base domain where the sandbox traffic is accessible
"""
+ template_id: str
+ sandbox_id: str
client_id: str
envd_version: str
- sandbox_id: str
- template_id: str
alias: Union[Unset, str] = UNSET
- domain: Union[None, Unset, str] = UNSET
envd_access_token: Union[Unset, str] = UNSET
traffic_access_token: Union[None, Unset, str] = UNSET
+ domain: Union[None, Unset, str] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- client_id = self.client_id
-
- envd_version = self.envd_version
+ template_id = self.template_id
sandbox_id = self.sandbox_id
- template_id = self.template_id
+ client_id = self.client_id
- alias = self.alias
+ envd_version = self.envd_version
- domain: Union[None, Unset, str]
- if isinstance(self.domain, Unset):
- domain = UNSET
- else:
- domain = self.domain
+ alias = self.alias
envd_access_token = self.envd_access_token
@@ -58,71 +52,77 @@ class Sandbox:
else:
traffic_access_token = self.traffic_access_token
+ domain: Union[None, Unset, str]
+ if isinstance(self.domain, Unset):
+ domain = UNSET
+ else:
+ domain = self.domain
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
+ "templateID": template_id,
+ "sandboxID": sandbox_id,
"clientID": client_id,
"envdVersion": envd_version,
- "sandboxID": sandbox_id,
- "templateID": template_id,
}
)
if alias is not UNSET:
field_dict["alias"] = alias
- if domain is not UNSET:
- field_dict["domain"] = domain
if envd_access_token is not UNSET:
field_dict["envdAccessToken"] = envd_access_token
if traffic_access_token is not UNSET:
field_dict["trafficAccessToken"] = traffic_access_token
+ if domain is not UNSET:
+ field_dict["domain"] = domain
return field_dict
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- client_id = d.pop("clientID")
-
- envd_version = d.pop("envdVersion")
+ template_id = d.pop("templateID")
sandbox_id = d.pop("sandboxID")
- template_id = d.pop("templateID")
+ client_id = d.pop("clientID")
+
+ envd_version = d.pop("envdVersion")
alias = d.pop("alias", UNSET)
- def _parse_domain(data: object) -> Union[None, Unset, str]:
+ envd_access_token = d.pop("envdAccessToken", UNSET)
+
+ def _parse_traffic_access_token(data: object) -> Union[None, Unset, str]:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(Union[None, Unset, str], data)
- domain = _parse_domain(d.pop("domain", UNSET))
-
- envd_access_token = d.pop("envdAccessToken", UNSET)
+ traffic_access_token = _parse_traffic_access_token(
+ d.pop("trafficAccessToken", UNSET)
+ )
- def _parse_traffic_access_token(data: object) -> Union[None, Unset, str]:
+ def _parse_domain(data: object) -> Union[None, Unset, str]:
if data is None:
return data
if isinstance(data, Unset):
return data
return cast(Union[None, Unset, str], data)
- traffic_access_token = _parse_traffic_access_token(
- d.pop("trafficAccessToken", UNSET)
- )
+ domain = _parse_domain(d.pop("domain", UNSET))
sandbox = cls(
+ template_id=template_id,
+ sandbox_id=sandbox_id,
client_id=client_id,
envd_version=envd_version,
- sandbox_id=sandbox_id,
- template_id=template_id,
alias=alias,
- domain=domain,
envd_access_token=envd_access_token,
traffic_access_token=traffic_access_token,
+ domain=domain,
)
sandbox.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_detail.py b/packages/python-sdk/e2b/api/client/models/sandbox_detail.py
index 1078d2b7a..dfe232203 100644
--- a/packages/python-sdk/e2b/api/client/models/sandbox_detail.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_detail.py
@@ -22,70 +22,72 @@ T = TypeVar("T", bound="SandboxDetail")
class SandboxDetail:
"""
Attributes:
+ template_id (str): Identifier of the template from which is the sandbox created
+ sandbox_id (str): Identifier of the sandbox
client_id (str): Identifier of the client
- cpu_count (int): CPU cores for the sandbox
- disk_size_mb (int): Disk size for the sandbox in MiB
+ started_at (datetime.datetime): Time when the sandbox was started
end_at (datetime.datetime): Time when the sandbox will expire
envd_version (str): Version of the envd running in the sandbox
+ cpu_count (int): CPU cores for the sandbox
memory_mb (int): Memory for the sandbox in MiB
- sandbox_id (str): Identifier of the sandbox
- started_at (datetime.datetime): Time when the sandbox was started
+ disk_size_mb (int): Disk size for the sandbox in MiB
state (SandboxState): State of the sandbox
- template_id (str): Identifier of the template from which is the sandbox created
alias (Union[Unset, str]): Alias of the template
+ envd_access_token (Union[Unset, str]): Access token used for envd communication
allow_internet_access (Union[None, Unset, bool]): Whether internet access was explicitly enabled or disabled for
the sandbox. Null means it was not explicitly set.
domain (Union[None, Unset, str]): Base domain where the sandbox traffic is accessible
- envd_access_token (Union[Unset, str]): Access token used for envd communication
- lifecycle (Union[Unset, SandboxLifecycle]): Sandbox lifecycle policy returned by sandbox info.
metadata (Union[Unset, Any]):
network (Union[Unset, SandboxNetworkConfig]):
+ lifecycle (Union[Unset, SandboxLifecycle]): Sandbox lifecycle policy returned by sandbox info.
volume_mounts (Union[Unset, list['SandboxVolumeMount']]):
"""
+ template_id: str
+ sandbox_id: str
client_id: str
- cpu_count: int
- disk_size_mb: int
+ started_at: datetime.datetime
end_at: datetime.datetime
envd_version: str
+ cpu_count: int
memory_mb: int
- sandbox_id: str
- started_at: datetime.datetime
+ disk_size_mb: int
state: SandboxState
- template_id: str
alias: Union[Unset, str] = UNSET
+ envd_access_token: Union[Unset, str] = UNSET
allow_internet_access: Union[None, Unset, bool] = UNSET
domain: Union[None, Unset, str] = UNSET
- envd_access_token: Union[Unset, str] = UNSET
- lifecycle: Union[Unset, "SandboxLifecycle"] = UNSET
metadata: Union[Unset, Any] = UNSET
network: Union[Unset, "SandboxNetworkConfig"] = UNSET
+ lifecycle: Union[Unset, "SandboxLifecycle"] = UNSET
volume_mounts: Union[Unset, list["SandboxVolumeMount"]] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- client_id = self.client_id
+ template_id = self.template_id
- cpu_count = self.cpu_count
+ sandbox_id = self.sandbox_id
- disk_size_mb = self.disk_size_mb
+ client_id = self.client_id
+
+ started_at = self.started_at.isoformat()
end_at = self.end_at.isoformat()
envd_version = self.envd_version
- memory_mb = self.memory_mb
+ cpu_count = self.cpu_count
- sandbox_id = self.sandbox_id
+ memory_mb = self.memory_mb
- started_at = self.started_at.isoformat()
+ disk_size_mb = self.disk_size_mb
state = self.state.value
- template_id = self.template_id
-
alias = self.alias
+ envd_access_token = self.envd_access_token
+
allow_internet_access: Union[None, Unset, bool]
if isinstance(self.allow_internet_access, Unset):
allow_internet_access = UNSET
@@ -98,18 +100,16 @@ class SandboxDetail:
else:
domain = self.domain
- envd_access_token = self.envd_access_token
-
- lifecycle: Union[Unset, dict[str, Any]] = UNSET
- if not isinstance(self.lifecycle, Unset):
- lifecycle = self.lifecycle.to_dict()
-
metadata = self.metadata
network: Union[Unset, dict[str, Any]] = UNSET
if not isinstance(self.network, Unset):
network = self.network.to_dict()
+ lifecycle: Union[Unset, dict[str, Any]] = UNSET
+ if not isinstance(self.lifecycle, Unset):
+ lifecycle = self.lifecycle.to_dict()
+
volume_mounts: Union[Unset, list[dict[str, Any]]] = UNSET
if not isinstance(self.volume_mounts, Unset):
volume_mounts = []
@@ -121,32 +121,32 @@ class SandboxDetail:
field_dict.update(self.additional_properties)
field_dict.update(
{
+ "templateID": template_id,
+ "sandboxID": sandbox_id,
"clientID": client_id,
- "cpuCount": cpu_count,
- "diskSizeMB": disk_size_mb,
+ "startedAt": started_at,
"endAt": end_at,
"envdVersion": envd_version,
+ "cpuCount": cpu_count,
"memoryMB": memory_mb,
- "sandboxID": sandbox_id,
- "startedAt": started_at,
+ "diskSizeMB": disk_size_mb,
"state": state,
- "templateID": template_id,
}
)
if alias is not UNSET:
field_dict["alias"] = alias
+ if envd_access_token is not UNSET:
+ field_dict["envdAccessToken"] = envd_access_token
if allow_internet_access is not UNSET:
field_dict["allowInternetAccess"] = allow_internet_access
if domain is not UNSET:
field_dict["domain"] = domain
- if envd_access_token is not UNSET:
- field_dict["envdAccessToken"] = envd_access_token
- if lifecycle is not UNSET:
- field_dict["lifecycle"] = lifecycle
if metadata is not UNSET:
field_dict["metadata"] = metadata
if network is not UNSET:
field_dict["network"] = network
+ if lifecycle is not UNSET:
+ field_dict["lifecycle"] = lifecycle
if volume_mounts is not UNSET:
field_dict["volumeMounts"] = volume_mounts
@@ -159,28 +159,30 @@ class SandboxDetail:
from ..models.sandbox_volume_mount import SandboxVolumeMount
d = dict(src_dict)
- client_id = d.pop("clientID")
+ template_id = d.pop("templateID")
- cpu_count = d.pop("cpuCount")
+ sandbox_id = d.pop("sandboxID")
- disk_size_mb = d.pop("diskSizeMB")
+ client_id = d.pop("clientID")
+
+ started_at = isoparse(d.pop("startedAt"))
end_at = isoparse(d.pop("endAt"))
envd_version = d.pop("envdVersion")
- memory_mb = d.pop("memoryMB")
+ cpu_count = d.pop("cpuCount")
- sandbox_id = d.pop("sandboxID")
+ memory_mb = d.pop("memoryMB")
- started_at = isoparse(d.pop("startedAt"))
+ disk_size_mb = d.pop("diskSizeMB")
state = SandboxState(d.pop("state"))
- template_id = d.pop("templateID")
-
alias = d.pop("alias", UNSET)
+ envd_access_token = d.pop("envdAccessToken", UNSET)
+
def _parse_allow_internet_access(data: object) -> Union[None, Unset, bool]:
if data is None:
return data
@@ -201,15 +203,6 @@ class SandboxDetail:
domain = _parse_domain(d.pop("domain", UNSET))
- envd_access_token = d.pop("envdAccessToken", UNSET)
-
- _lifecycle = d.pop("lifecycle", UNSET)
- lifecycle: Union[Unset, SandboxLifecycle]
- if isinstance(_lifecycle, Unset):
- lifecycle = UNSET
- else:
- lifecycle = SandboxLifecycle.from_dict(_lifecycle)
-
metadata = d.pop("metadata", UNSET)
_network = d.pop("network", UNSET)
@@ -219,6 +212,13 @@ class SandboxDetail:
else:
network = SandboxNetworkConfig.from_dict(_network)
+ _lifecycle = d.pop("lifecycle", UNSET)
+ lifecycle: Union[Unset, SandboxLifecycle]
+ if isinstance(_lifecycle, Unset):
+ lifecycle = UNSET
+ else:
+ lifecycle = SandboxLifecycle.from_dict(_lifecycle)
+
volume_mounts = []
_volume_mounts = d.pop("volumeMounts", UNSET)
for volume_mounts_item_data in _volume_mounts or []:
@@ -227,23 +227,23 @@ class SandboxDetail:
volume_mounts.append(volume_mounts_item)
sandbox_detail = cls(
+ template_id=template_id,
+ sandbox_id=sandbox_id,
client_id=client_id,
- cpu_count=cpu_count,
- disk_size_mb=disk_size_mb,
+ started_at=started_at,
end_at=end_at,
envd_version=envd_version,
+ cpu_count=cpu_count,
memory_mb=memory_mb,
- sandbox_id=sandbox_id,
- started_at=started_at,
+ disk_size_mb=disk_size_mb,
state=state,
- template_id=template_id,
alias=alias,
+ envd_access_token=envd_access_token,
allow_internet_access=allow_internet_access,
domain=domain,
- envd_access_token=envd_access_token,
- lifecycle=lifecycle,
metadata=metadata,
network=network,
+ lifecycle=lifecycle,
volume_mounts=volume_mounts,
)
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_fork_request.py b/packages/python-sdk/e2b/api/client/models/sandbox_fork_request.py
index 3af8d6781..89a5dc470 100644
--- a/packages/python-sdk/e2b/api/client/models/sandbox_fork_request.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_fork_request.py
@@ -13,41 +13,41 @@ T = TypeVar("T", bound="SandboxForkRequest")
class SandboxForkRequest:
"""
Attributes:
+ timeout (Union[Unset, int]): Time to live for the new forked sandboxes in seconds. Default: 15.
count (Union[Unset, int]): Number of forked sandboxes to create. All forks boot from the same snapshot, so the
snapshot is captured once regardless of count. Each fork succeeds or fails independently; the outcome of each is
reported in its entry of the response list. Default: 1.
- timeout (Union[Unset, int]): Time to live for the new forked sandboxes in seconds. Default: 15.
"""
- count: Union[Unset, int] = 1
timeout: Union[Unset, int] = 15
+ count: Union[Unset, int] = 1
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- count = self.count
-
timeout = self.timeout
+ count = self.count
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
- if count is not UNSET:
- field_dict["count"] = count
if timeout is not UNSET:
field_dict["timeout"] = timeout
+ if count is not UNSET:
+ field_dict["count"] = count
return field_dict
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- count = d.pop("count", UNSET)
-
timeout = d.pop("timeout", UNSET)
+ count = d.pop("count", UNSET)
+
sandbox_fork_request = cls(
- count=count,
timeout=timeout,
+ count=count,
)
sandbox_fork_request.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_fork_result.py b/packages/python-sdk/e2b/api/client/models/sandbox_fork_result.py
index 532f38c38..6e0589404 100644
--- a/packages/python-sdk/e2b/api/client/models/sandbox_fork_result.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_fork_result.py
@@ -20,30 +20,30 @@ class SandboxForkResult:
error when it failed to start.
Attributes:
- error (Union[Unset, Error]):
sandbox (Union[Unset, Sandbox]):
+ error (Union[Unset, Error]):
"""
- error: Union[Unset, "Error"] = UNSET
sandbox: Union[Unset, "Sandbox"] = UNSET
+ error: Union[Unset, "Error"] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- error: Union[Unset, dict[str, Any]] = UNSET
- if not isinstance(self.error, Unset):
- error = self.error.to_dict()
-
sandbox: Union[Unset, dict[str, Any]] = UNSET
if not isinstance(self.sandbox, Unset):
sandbox = self.sandbox.to_dict()
+ error: Union[Unset, dict[str, Any]] = UNSET
+ if not isinstance(self.error, Unset):
+ error = self.error.to_dict()
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
- if error is not UNSET:
- field_dict["error"] = error
if sandbox is not UNSET:
field_dict["sandbox"] = sandbox
+ if error is not UNSET:
+ field_dict["error"] = error
return field_dict
@@ -53,13 +53,6 @@ class SandboxForkResult:
from ..models.sandbox import Sandbox
d = dict(src_dict)
- _error = d.pop("error", UNSET)
- error: Union[Unset, Error]
- if isinstance(_error, Unset):
- error = UNSET
- else:
- error = Error.from_dict(_error)
-
_sandbox = d.pop("sandbox", UNSET)
sandbox: Union[Unset, Sandbox]
if isinstance(_sandbox, Unset):
@@ -67,9 +60,16 @@ class SandboxForkResult:
else:
sandbox = Sandbox.from_dict(_sandbox)
+ _error = d.pop("error", UNSET)
+ error: Union[Unset, Error]
+ if isinstance(_error, Unset):
+ error = UNSET
+ else:
+ error = Error.from_dict(_error)
+
sandbox_fork_result = cls(
- error=error,
sandbox=sandbox,
+ error=error,
)
sandbox_fork_result.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_iam.py b/packages/python-sdk/e2b/api/client/models/sandbox_iam.py
new file mode 100644
index 000000000..e0be3dd2c
--- /dev/null
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_iam.py
@@ -0,0 +1,73 @@
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar, Union
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+from ..types import UNSET, Unset
+
+if TYPE_CHECKING:
+ from ..models.sandbox_iam_tokens import SandboxIamTokens
+
+
+T = TypeVar("T", bound="SandboxIam")
+
+
+@_attrs_define
+class SandboxIam:
+ """Sandbox workload identity configuration. A non-empty, valid tokens map enables workload identity for the sandbox.
+
+ Attributes:
+ tokens (Union[Unset, SandboxIamTokens]): Named workload-token definitions, keyed by a caller-chosen token name.
+ """
+
+ tokens: Union[Unset, "SandboxIamTokens"] = UNSET
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ tokens: Union[Unset, dict[str, Any]] = UNSET
+ if not isinstance(self.tokens, Unset):
+ tokens = self.tokens.to_dict()
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update({})
+ if tokens is not UNSET:
+ field_dict["tokens"] = tokens
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.sandbox_iam_tokens import SandboxIamTokens
+
+ d = dict(src_dict)
+ _tokens = d.pop("tokens", UNSET)
+ tokens: Union[Unset, SandboxIamTokens]
+ if isinstance(_tokens, Unset):
+ tokens = UNSET
+ else:
+ tokens = SandboxIamTokens.from_dict(_tokens)
+
+ sandbox_iam = cls(
+ tokens=tokens,
+ )
+
+ sandbox_iam.additional_properties = d
+ return sandbox_iam
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_iam_token.py b/packages/python-sdk/e2b/api/client/models/sandbox_iam_token.py
new file mode 100644
index 000000000..ce5c0efe0
--- /dev/null
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_iam_token.py
@@ -0,0 +1,67 @@
+from collections.abc import Mapping
+from typing import Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+T = TypeVar("T", bound="SandboxIamToken")
+
+
+@_attrs_define
+class SandboxIamToken:
+ """
+ Attributes:
+ audience (str): Audience of the workload token, stored exactly as provided.
+ token_type (str): Workload token type.
+ """
+
+ audience: str
+ token_type: str
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+ def to_dict(self) -> dict[str, Any]:
+ audience = self.audience
+
+ token_type = self.token_type
+
+ field_dict: dict[str, Any] = {}
+ field_dict.update(self.additional_properties)
+ field_dict.update(
+ {
+ "audience": audience,
+ "tokenType": token_type,
+ }
+ )
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ d = dict(src_dict)
+ audience = d.pop("audience")
+
+ token_type = d.pop("tokenType")
+
+ sandbox_iam_token = cls(
+ audience=audience,
+ token_type=token_type,
+ )
+
+ sandbox_iam_token.additional_properties = d
+ return sandbox_iam_token
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> Any:
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: Any) -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_iam_tokens.py b/packages/python-sdk/e2b/api/client/models/sandbox_iam_tokens.py
new file mode 100644
index 000000000..b2137c8be
--- /dev/null
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_iam_tokens.py
@@ -0,0 +1,59 @@
+from collections.abc import Mapping
+from typing import TYPE_CHECKING, Any, TypeVar
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+if TYPE_CHECKING:
+ from ..models.sandbox_iam_token import SandboxIamToken
+
+
+T = TypeVar("T", bound="SandboxIamTokens")
+
+
+@_attrs_define
+class SandboxIamTokens:
+ """Named workload-token definitions, keyed by a caller-chosen token name."""
+
+ additional_properties: dict[str, "SandboxIamToken"] = _attrs_field(
+ init=False, factory=dict
+ )
+
+ def to_dict(self) -> dict[str, Any]:
+ field_dict: dict[str, Any] = {}
+ for prop_name, prop in self.additional_properties.items():
+ field_dict[prop_name] = prop.to_dict()
+
+ return field_dict
+
+ @classmethod
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
+ from ..models.sandbox_iam_token import SandboxIamToken
+
+ d = dict(src_dict)
+ sandbox_iam_tokens = cls()
+
+ additional_properties = {}
+ for prop_name, prop_dict in d.items():
+ additional_property = SandboxIamToken.from_dict(prop_dict)
+
+ additional_properties[prop_name] = additional_property
+
+ sandbox_iam_tokens.additional_properties = additional_properties
+ return sandbox_iam_tokens
+
+ @property
+ def additional_keys(self) -> list[str]:
+ return list(self.additional_properties.keys())
+
+ def __getitem__(self, key: str) -> "SandboxIamToken":
+ return self.additional_properties[key]
+
+ def __setitem__(self, key: str, value: "SandboxIamToken") -> None:
+ self.additional_properties[key] = value
+
+ def __delitem__(self, key: str) -> None:
+ del self.additional_properties[key]
+
+ def __contains__(self, key: str) -> bool:
+ return key in self.additional_properties
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_log.py b/packages/python-sdk/e2b/api/client/models/sandbox_log.py
index 65b9144ef..62c6015e5 100644
--- a/packages/python-sdk/e2b/api/client/models/sandbox_log.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_log.py
@@ -14,25 +14,25 @@ class SandboxLog:
"""Log entry with timestamp and line
Attributes:
- line (str): Log line content
timestamp (datetime.datetime): Timestamp of the log entry
+ line (str): Log line content
"""
- line: str
timestamp: datetime.datetime
+ line: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- line = self.line
-
timestamp = self.timestamp.isoformat()
+ line = self.line
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "line": line,
"timestamp": timestamp,
+ "line": line,
}
)
@@ -41,13 +41,13 @@ class SandboxLog:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- line = d.pop("line")
-
timestamp = isoparse(d.pop("timestamp"))
+ line = d.pop("line")
+
sandbox_log = cls(
- line=line,
timestamp=timestamp,
+ line=line,
)
sandbox_log.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_log_entry.py b/packages/python-sdk/e2b/api/client/models/sandbox_log_entry.py
index bcbbe7d3e..e12af708a 100644
--- a/packages/python-sdk/e2b/api/client/models/sandbox_log_entry.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_log_entry.py
@@ -19,35 +19,35 @@ T = TypeVar("T", bound="SandboxLogEntry")
class SandboxLogEntry:
"""
Attributes:
- fields (SandboxLogEntryFields):
- level (LogLevel): State of the sandbox
- message (str): Log message content
timestamp (datetime.datetime): Timestamp of the log entry
+ message (str): Log message content
+ level (LogLevel): State of the sandbox
+ fields (SandboxLogEntryFields):
"""
- fields: "SandboxLogEntryFields"
- level: LogLevel
- message: str
timestamp: datetime.datetime
+ message: str
+ level: LogLevel
+ fields: "SandboxLogEntryFields"
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- fields = self.fields.to_dict()
-
- level = self.level.value
+ timestamp = self.timestamp.isoformat()
message = self.message
- timestamp = self.timestamp.isoformat()
+ level = self.level.value
+
+ fields = self.fields.to_dict()
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "fields": fields,
- "level": level,
- "message": message,
"timestamp": timestamp,
+ "message": message,
+ "level": level,
+ "fields": fields,
}
)
@@ -58,19 +58,19 @@ class SandboxLogEntry:
from ..models.sandbox_log_entry_fields import SandboxLogEntryFields
d = dict(src_dict)
- fields = SandboxLogEntryFields.from_dict(d.pop("fields"))
-
- level = LogLevel(d.pop("level"))
+ timestamp = isoparse(d.pop("timestamp"))
message = d.pop("message")
- timestamp = isoparse(d.pop("timestamp"))
+ level = LogLevel(d.pop("level"))
+
+ fields = SandboxLogEntryFields.from_dict(d.pop("fields"))
sandbox_log_entry = cls(
- fields=fields,
- level=level,
- message=message,
timestamp=timestamp,
+ message=message,
+ level=level,
+ fields=fields,
)
sandbox_log_entry.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_logs.py b/packages/python-sdk/e2b/api/client/models/sandbox_logs.py
index 39a1eb500..7cff65bd1 100644
--- a/packages/python-sdk/e2b/api/client/models/sandbox_logs.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_logs.py
@@ -16,31 +16,31 @@ T = TypeVar("T", bound="SandboxLogs")
class SandboxLogs:
"""
Attributes:
- log_entries (list['SandboxLogEntry']): Structured logs of the sandbox
logs (list['SandboxLog']): Logs of the sandbox
+ log_entries (list['SandboxLogEntry']): Structured logs of the sandbox
"""
- log_entries: list["SandboxLogEntry"]
logs: list["SandboxLog"]
+ log_entries: list["SandboxLogEntry"]
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- log_entries = []
- for log_entries_item_data in self.log_entries:
- log_entries_item = log_entries_item_data.to_dict()
- log_entries.append(log_entries_item)
-
logs = []
for logs_item_data in self.logs:
logs_item = logs_item_data.to_dict()
logs.append(logs_item)
+ log_entries = []
+ for log_entries_item_data in self.log_entries:
+ log_entries_item = log_entries_item_data.to_dict()
+ log_entries.append(log_entries_item)
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "logEntries": log_entries,
"logs": logs,
+ "logEntries": log_entries,
}
)
@@ -52,13 +52,6 @@ class SandboxLogs:
from ..models.sandbox_log_entry import SandboxLogEntry
d = dict(src_dict)
- log_entries = []
- _log_entries = d.pop("logEntries")
- for log_entries_item_data in _log_entries:
- log_entries_item = SandboxLogEntry.from_dict(log_entries_item_data)
-
- log_entries.append(log_entries_item)
-
logs = []
_logs = d.pop("logs")
for logs_item_data in _logs:
@@ -66,9 +59,16 @@ class SandboxLogs:
logs.append(logs_item)
+ log_entries = []
+ _log_entries = d.pop("logEntries")
+ for log_entries_item_data in _log_entries:
+ log_entries_item = SandboxLogEntry.from_dict(log_entries_item_data)
+
+ log_entries.append(log_entries_item)
+
sandbox_logs = cls(
- log_entries=log_entries,
logs=logs,
+ log_entries=log_entries,
)
sandbox_logs.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_metric.py b/packages/python-sdk/e2b/api/client/models/sandbox_metric.py
index cbfb9eeb7..8f358b3bc 100644
--- a/packages/python-sdk/e2b/api/client/models/sandbox_metric.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_metric.py
@@ -14,60 +14,60 @@ class SandboxMetric:
"""Metric entry with timestamp and line
Attributes:
+ timestamp (datetime.datetime): Timestamp of the metric entry
+ timestamp_unix (int): Timestamp of the metric entry in Unix time (seconds since epoch)
cpu_count (int): Number of CPU cores
cpu_used_pct (float): CPU usage percentage
- disk_total (int): Total disk space in bytes
- disk_used (int): Disk used in bytes
- mem_cache (int): Cached memory (page cache) in bytes
- mem_total (int): Total memory in bytes
mem_used (int): Memory used in bytes
- timestamp (datetime.datetime): Timestamp of the metric entry
- timestamp_unix (int): Timestamp of the metric entry in Unix time (seconds since epoch)
+ mem_total (int): Total memory in bytes
+ mem_cache (int): Cached memory (page cache) in bytes
+ disk_used (int): Disk used in bytes
+ disk_total (int): Total disk space in bytes
"""
+ timestamp: datetime.datetime
+ timestamp_unix: int
cpu_count: int
cpu_used_pct: float
- disk_total: int
- disk_used: int
- mem_cache: int
- mem_total: int
mem_used: int
- timestamp: datetime.datetime
- timestamp_unix: int
+ mem_total: int
+ mem_cache: int
+ disk_used: int
+ disk_total: int
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- cpu_count = self.cpu_count
+ timestamp = self.timestamp.isoformat()
- cpu_used_pct = self.cpu_used_pct
+ timestamp_unix = self.timestamp_unix
- disk_total = self.disk_total
+ cpu_count = self.cpu_count
- disk_used = self.disk_used
+ cpu_used_pct = self.cpu_used_pct
- mem_cache = self.mem_cache
+ mem_used = self.mem_used
mem_total = self.mem_total
- mem_used = self.mem_used
+ mem_cache = self.mem_cache
- timestamp = self.timestamp.isoformat()
+ disk_used = self.disk_used
- timestamp_unix = self.timestamp_unix
+ disk_total = self.disk_total
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
+ "timestamp": timestamp,
+ "timestampUnix": timestamp_unix,
"cpuCount": cpu_count,
"cpuUsedPct": cpu_used_pct,
- "diskTotal": disk_total,
- "diskUsed": disk_used,
- "memCache": mem_cache,
- "memTotal": mem_total,
"memUsed": mem_used,
- "timestamp": timestamp,
- "timestampUnix": timestamp_unix,
+ "memTotal": mem_total,
+ "memCache": mem_cache,
+ "diskUsed": disk_used,
+ "diskTotal": disk_total,
}
)
@@ -76,34 +76,34 @@ class SandboxMetric:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- cpu_count = d.pop("cpuCount")
+ timestamp = isoparse(d.pop("timestamp"))
- cpu_used_pct = d.pop("cpuUsedPct")
+ timestamp_unix = d.pop("timestampUnix")
- disk_total = d.pop("diskTotal")
+ cpu_count = d.pop("cpuCount")
- disk_used = d.pop("diskUsed")
+ cpu_used_pct = d.pop("cpuUsedPct")
- mem_cache = d.pop("memCache")
+ mem_used = d.pop("memUsed")
mem_total = d.pop("memTotal")
- mem_used = d.pop("memUsed")
+ mem_cache = d.pop("memCache")
- timestamp = isoparse(d.pop("timestamp"))
+ disk_used = d.pop("diskUsed")
- timestamp_unix = d.pop("timestampUnix")
+ disk_total = d.pop("diskTotal")
sandbox_metric = cls(
+ timestamp=timestamp,
+ timestamp_unix=timestamp_unix,
cpu_count=cpu_count,
cpu_used_pct=cpu_used_pct,
- disk_total=disk_total,
- disk_used=disk_used,
- mem_cache=mem_cache,
- mem_total=mem_total,
mem_used=mem_used,
- timestamp=timestamp,
- timestamp_unix=timestamp_unix,
+ mem_total=mem_total,
+ mem_cache=mem_cache,
+ disk_used=disk_used,
+ disk_total=disk_total,
)
sandbox_metric.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_network_config.py b/packages/python-sdk/e2b/api/client/models/sandbox_network_config.py
index c7a99c127..e5626276a 100644
--- a/packages/python-sdk/e2b/api/client/models/sandbox_network_config.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_network_config.py
@@ -17,11 +17,11 @@ T = TypeVar("T", bound="SandboxNetworkConfig")
class SandboxNetworkConfig:
"""
Attributes:
+ allow_public_traffic (Union[Unset, bool]): Specify if the sandbox URLs should be accessible only with
+ authentication. Default: True.
allow_out (Union[Unset, list[str]]): List of allowed destinations for egress traffic. Each entry can be a CIDR
block (e.g. "8.8.8.8/32"), a bare IP address (e.g. "8.8.8.8"), or a domain name (e.g. "example.com",
"*.example.com"). Allowed entries always take precedence over denied entries.
- allow_public_traffic (Union[Unset, bool]): Specify if the sandbox URLs should be accessible only with
- authentication. Default: True.
deny_out (Union[Unset, list[str]]): List of denied CIDR blocks or IP addresses for egress traffic. Domain names
are not supported for deny rules.
mask_request_host (Union[Unset, str]): Specify host mask which will be used for all sandbox requests
@@ -30,20 +30,20 @@ class SandboxNetworkConfig:
automatically allowed - use allowOut to permit the traffic.
"""
- allow_out: Union[Unset, list[str]] = UNSET
allow_public_traffic: Union[Unset, bool] = True
+ allow_out: Union[Unset, list[str]] = UNSET
deny_out: Union[Unset, list[str]] = UNSET
mask_request_host: Union[Unset, str] = UNSET
rules: Union[Unset, "SandboxNetworkConfigRules"] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
+ allow_public_traffic = self.allow_public_traffic
+
allow_out: Union[Unset, list[str]] = UNSET
if not isinstance(self.allow_out, Unset):
allow_out = self.allow_out
- allow_public_traffic = self.allow_public_traffic
-
deny_out: Union[Unset, list[str]] = UNSET
if not isinstance(self.deny_out, Unset):
deny_out = self.deny_out
@@ -57,10 +57,10 @@ class SandboxNetworkConfig:
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
- if allow_out is not UNSET:
- field_dict["allowOut"] = allow_out
if allow_public_traffic is not UNSET:
field_dict["allowPublicTraffic"] = allow_public_traffic
+ if allow_out is not UNSET:
+ field_dict["allowOut"] = allow_out
if deny_out is not UNSET:
field_dict["denyOut"] = deny_out
if mask_request_host is not UNSET:
@@ -75,10 +75,10 @@ class SandboxNetworkConfig:
from ..models.sandbox_network_config_rules import SandboxNetworkConfigRules
d = dict(src_dict)
- allow_out = cast(list[str], d.pop("allowOut", UNSET))
-
allow_public_traffic = d.pop("allowPublicTraffic", UNSET)
+ allow_out = cast(list[str], d.pop("allowOut", UNSET))
+
deny_out = cast(list[str], d.pop("denyOut", UNSET))
mask_request_host = d.pop("maskRequestHost", UNSET)
@@ -91,8 +91,8 @@ class SandboxNetworkConfig:
rules = SandboxNetworkConfigRules.from_dict(_rules)
sandbox_network_config = cls(
- allow_out=allow_out,
allow_public_traffic=allow_public_traffic,
+ allow_out=allow_out,
deny_out=deny_out,
mask_request_host=mask_request_host,
rules=rules,
diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_network_update_config.py b/packages/python-sdk/e2b/api/client/models/sandbox_network_update_config.py
index a4c5e8fc4..8df263214 100644
--- a/packages/python-sdk/e2b/api/client/models/sandbox_network_update_config.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_network_update_config.py
@@ -24,18 +24,18 @@ class SandboxNetworkUpdateConfig:
allow_out (Union[Unset, list[str]]): List of allowed destinations for egress traffic. Each entry can be a CIDR
block (e.g. "8.8.8.8/32"), a bare IP address (e.g. "8.8.8.8"), or a domain name (e.g. "example.com",
"*.example.com"). Allowed entries always take precedence over denied entries.
- allow_internet_access (Union[Unset, bool]): Allow sandbox to access the internet. When set to false, it behaves
- the same as specifying denyOut to 0.0.0.0/0 in the network config.
deny_out (Union[Unset, list[str]]): List of denied CIDR blocks or IP addresses for egress traffic. Domain names
are not supported for deny rules.
rules (Union[Unset, SandboxNetworkUpdateConfigRules]): Per-domain transform rules. Replaces all existing rules
when provided.
+ allow_internet_access (Union[Unset, bool]): Allow sandbox to access the internet. When set to false, it behaves
+ the same as specifying denyOut to 0.0.0.0/0 in the network config.
"""
allow_out: Union[Unset, list[str]] = UNSET
- allow_internet_access: Union[Unset, bool] = UNSET
deny_out: Union[Unset, list[str]] = UNSET
rules: Union[Unset, "SandboxNetworkUpdateConfigRules"] = UNSET
+ allow_internet_access: Union[Unset, bool] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
@@ -43,8 +43,6 @@ class SandboxNetworkUpdateConfig:
if not isinstance(self.allow_out, Unset):
allow_out = self.allow_out
- allow_internet_access = self.allow_internet_access
-
deny_out: Union[Unset, list[str]] = UNSET
if not isinstance(self.deny_out, Unset):
deny_out = self.deny_out
@@ -53,17 +51,19 @@ class SandboxNetworkUpdateConfig:
if not isinstance(self.rules, Unset):
rules = self.rules.to_dict()
+ allow_internet_access = self.allow_internet_access
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if allow_out is not UNSET:
field_dict["allowOut"] = allow_out
- if allow_internet_access is not UNSET:
- field_dict["allow_internet_access"] = allow_internet_access
if deny_out is not UNSET:
field_dict["denyOut"] = deny_out
if rules is not UNSET:
field_dict["rules"] = rules
+ if allow_internet_access is not UNSET:
+ field_dict["allow_internet_access"] = allow_internet_access
return field_dict
@@ -76,8 +76,6 @@ class SandboxNetworkUpdateConfig:
d = dict(src_dict)
allow_out = cast(list[str], d.pop("allowOut", UNSET))
- allow_internet_access = d.pop("allow_internet_access", UNSET)
-
deny_out = cast(list[str], d.pop("denyOut", UNSET))
_rules = d.pop("rules", UNSET)
@@ -87,11 +85,13 @@ class SandboxNetworkUpdateConfig:
else:
rules = SandboxNetworkUpdateConfigRules.from_dict(_rules)
+ allow_internet_access = d.pop("allow_internet_access", UNSET)
+
sandbox_network_update_config = cls(
allow_out=allow_out,
- allow_internet_access=allow_internet_access,
deny_out=deny_out,
rules=rules,
+ allow_internet_access=allow_internet_access,
)
sandbox_network_update_config.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/post_sandboxes_sandbox_id_refreshes_body.py b/packages/python-sdk/e2b/api/client/models/sandbox_refresh_request.py
similarity index 83%
rename from packages/python-sdk/e2b/api/client/models/post_sandboxes_sandbox_id_refreshes_body.py
rename to packages/python-sdk/e2b/api/client/models/sandbox_refresh_request.py
index 5a35d2612..3e118bee8 100644
--- a/packages/python-sdk/e2b/api/client/models/post_sandboxes_sandbox_id_refreshes_body.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_refresh_request.py
@@ -6,11 +6,11 @@ from attrs import field as _attrs_field
from ..types import UNSET, Unset
-T = TypeVar("T", bound="PostSandboxesSandboxIDRefreshesBody")
+T = TypeVar("T", bound="SandboxRefreshRequest")
@_attrs_define
-class PostSandboxesSandboxIDRefreshesBody:
+class SandboxRefreshRequest:
"""
Attributes:
duration (Union[Unset, int]): Duration for which the sandbox should be kept alive in seconds
@@ -35,12 +35,12 @@ class PostSandboxesSandboxIDRefreshesBody:
d = dict(src_dict)
duration = d.pop("duration", UNSET)
- post_sandboxes_sandbox_id_refreshes_body = cls(
+ sandbox_refresh_request = cls(
duration=duration,
)
- post_sandboxes_sandbox_id_refreshes_body.additional_properties = d
- return post_sandboxes_sandbox_id_refreshes_body
+ sandbox_refresh_request.additional_properties = d
+ return sandbox_refresh_request
@property
def additional_keys(self) -> list[str]:
diff --git a/packages/python-sdk/e2b/api/client/models/post_sandboxes_sandbox_id_snapshots_body.py b/packages/python-sdk/e2b/api/client/models/sandbox_snapshot_request.py
similarity index 84%
rename from packages/python-sdk/e2b/api/client/models/post_sandboxes_sandbox_id_snapshots_body.py
rename to packages/python-sdk/e2b/api/client/models/sandbox_snapshot_request.py
index 680f5b5ec..7088c0a81 100644
--- a/packages/python-sdk/e2b/api/client/models/post_sandboxes_sandbox_id_snapshots_body.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_snapshot_request.py
@@ -6,11 +6,11 @@ from attrs import field as _attrs_field
from ..types import UNSET, Unset
-T = TypeVar("T", bound="PostSandboxesSandboxIDSnapshotsBody")
+T = TypeVar("T", bound="SandboxSnapshotRequest")
@_attrs_define
-class PostSandboxesSandboxIDSnapshotsBody:
+class SandboxSnapshotRequest:
"""
Attributes:
name (Union[Unset, str]): Optional name for the snapshot template. If a snapshot template with this name already
@@ -36,12 +36,12 @@ class PostSandboxesSandboxIDSnapshotsBody:
d = dict(src_dict)
name = d.pop("name", UNSET)
- post_sandboxes_sandbox_id_snapshots_body = cls(
+ sandbox_snapshot_request = cls(
name=name,
)
- post_sandboxes_sandbox_id_snapshots_body.additional_properties = d
- return post_sandboxes_sandbox_id_snapshots_body
+ sandbox_snapshot_request.additional_properties = d
+ return sandbox_snapshot_request
@property
def additional_keys(self) -> list[str]:
diff --git a/packages/python-sdk/e2b/api/client/models/post_sandboxes_sandbox_id_timeout_body.py b/packages/python-sdk/e2b/api/client/models/sandbox_timeout_request.py
similarity index 83%
rename from packages/python-sdk/e2b/api/client/models/post_sandboxes_sandbox_id_timeout_body.py
rename to packages/python-sdk/e2b/api/client/models/sandbox_timeout_request.py
index 4d06c65f6..502854bef 100644
--- a/packages/python-sdk/e2b/api/client/models/post_sandboxes_sandbox_id_timeout_body.py
+++ b/packages/python-sdk/e2b/api/client/models/sandbox_timeout_request.py
@@ -4,11 +4,11 @@ from typing import Any, TypeVar
from attrs import define as _attrs_define
from attrs import field as _attrs_field
-T = TypeVar("T", bound="PostSandboxesSandboxIDTimeoutBody")
+T = TypeVar("T", bound="SandboxTimeoutRequest")
@_attrs_define
-class PostSandboxesSandboxIDTimeoutBody:
+class SandboxTimeoutRequest:
"""
Attributes:
timeout (int): Timeout in seconds from the current time after which the sandbox should expire
@@ -35,12 +35,12 @@ class PostSandboxesSandboxIDTimeoutBody:
d = dict(src_dict)
timeout = d.pop("timeout")
- post_sandboxes_sandbox_id_timeout_body = cls(
+ sandbox_timeout_request = cls(
timeout=timeout,
)
- post_sandboxes_sandbox_id_timeout_body.additional_properties = d
- return post_sandboxes_sandbox_id_timeout_body
+ sandbox_timeout_request.additional_properties = d
+ return sandbox_timeout_request
@property
def additional_keys(self) -> list[str]:
diff --git a/packages/python-sdk/e2b/api/client/models/snapshot_info.py b/packages/python-sdk/e2b/api/client/models/snapshot_info.py
index 82b47269d..57f33bd40 100644
--- a/packages/python-sdk/e2b/api/client/models/snapshot_info.py
+++ b/packages/python-sdk/e2b/api/client/models/snapshot_info.py
@@ -11,28 +11,28 @@ T = TypeVar("T", bound="SnapshotInfo")
class SnapshotInfo:
"""
Attributes:
- names (list[str]): Full names of the snapshot template including team namespace and tag (e.g. team-slug/my-
- snapshot:v2)
snapshot_id (str): Identifier of the snapshot template including the tag. Uses namespace/alias when a name was
provided (e.g. team-slug/my-snapshot:default), otherwise falls back to the raw template ID (e.g.
abc123:default).
+ names (list[str]): Full names of the snapshot template including team namespace and tag (e.g. team-slug/my-
+ snapshot:v2)
"""
- names: list[str]
snapshot_id: str
+ names: list[str]
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- names = self.names
-
snapshot_id = self.snapshot_id
+ names = self.names
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "names": names,
"snapshotID": snapshot_id,
+ "names": names,
}
)
@@ -41,13 +41,13 @@ class SnapshotInfo:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- names = cast(list[str], d.pop("names"))
-
snapshot_id = d.pop("snapshotID")
+ names = cast(list[str], d.pop("names"))
+
snapshot_info = cls(
- names=names,
snapshot_id=snapshot_id,
+ names=names,
)
snapshot_info.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/team.py b/packages/python-sdk/e2b/api/client/models/team.py
index 81a434c14..2568fdacc 100644
--- a/packages/python-sdk/e2b/api/client/models/team.py
+++ b/packages/python-sdk/e2b/api/client/models/team.py
@@ -11,35 +11,35 @@ T = TypeVar("T", bound="Team")
class Team:
"""
Attributes:
+ team_id (str): Identifier of the team
+ name (str): Name of the team
api_key (str): API key for the team
is_default (bool): Whether the team is the default team
- name (str): Name of the team
- team_id (str): Identifier of the team
"""
+ team_id: str
+ name: str
api_key: str
is_default: bool
- name: str
- team_id: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- api_key = self.api_key
-
- is_default = self.is_default
+ team_id = self.team_id
name = self.name
- team_id = self.team_id
+ api_key = self.api_key
+
+ is_default = self.is_default
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
+ "teamID": team_id,
+ "name": name,
"apiKey": api_key,
"isDefault": is_default,
- "name": name,
- "teamID": team_id,
}
)
@@ -48,19 +48,19 @@ class Team:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- api_key = d.pop("apiKey")
-
- is_default = d.pop("isDefault")
+ team_id = d.pop("teamID")
name = d.pop("name")
- team_id = d.pop("teamID")
+ api_key = d.pop("apiKey")
+
+ is_default = d.pop("isDefault")
team = cls(
+ team_id=team_id,
+ name=name,
api_key=api_key,
is_default=is_default,
- name=name,
- team_id=team_id,
)
team.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/team_api_key.py b/packages/python-sdk/e2b/api/client/models/team_api_key.py
index 7edbbc1e4..e115fdd4c 100644
--- a/packages/python-sdk/e2b/api/client/models/team_api_key.py
+++ b/packages/python-sdk/e2b/api/client/models/team_api_key.py
@@ -21,18 +21,18 @@ T = TypeVar("T", bound="TeamAPIKey")
class TeamAPIKey:
"""
Attributes:
- created_at (datetime.datetime): Timestamp of API key creation
id (UUID): Identifier of the API key
- mask (IdentifierMaskingDetails):
name (str): Name of the API key
+ mask (IdentifierMaskingDetails):
+ created_at (datetime.datetime): Timestamp of API key creation
created_by (Union['TeamUser', None, Unset]):
last_used (Union[None, Unset, datetime.datetime]): Last time this API key was used
"""
- created_at: datetime.datetime
id: UUID
- mask: "IdentifierMaskingDetails"
name: str
+ mask: "IdentifierMaskingDetails"
+ created_at: datetime.datetime
created_by: Union["TeamUser", None, Unset] = UNSET
last_used: Union[None, Unset, datetime.datetime] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -40,13 +40,13 @@ class TeamAPIKey:
def to_dict(self) -> dict[str, Any]:
from ..models.team_user import TeamUser
- created_at = self.created_at.isoformat()
-
id = str(self.id)
+ name = self.name
+
mask = self.mask.to_dict()
- name = self.name
+ created_at = self.created_at.isoformat()
created_by: Union[None, Unset, dict[str, Any]]
if isinstance(self.created_by, Unset):
@@ -68,10 +68,10 @@ class TeamAPIKey:
field_dict.update(self.additional_properties)
field_dict.update(
{
- "createdAt": created_at,
"id": id,
- "mask": mask,
"name": name,
+ "mask": mask,
+ "createdAt": created_at,
}
)
if created_by is not UNSET:
@@ -87,13 +87,13 @@ class TeamAPIKey:
from ..models.team_user import TeamUser
d = dict(src_dict)
- created_at = isoparse(d.pop("createdAt"))
-
id = UUID(d.pop("id"))
+ name = d.pop("name")
+
mask = IdentifierMaskingDetails.from_dict(d.pop("mask"))
- name = d.pop("name")
+ created_at = isoparse(d.pop("createdAt"))
def _parse_created_by(data: object) -> Union["TeamUser", None, Unset]:
if data is None:
@@ -130,10 +130,10 @@ class TeamAPIKey:
last_used = _parse_last_used(d.pop("lastUsed", UNSET))
team_api_key = cls(
- created_at=created_at,
id=id,
- mask=mask,
name=name,
+ mask=mask,
+ created_at=created_at,
created_by=created_by,
last_used=last_used,
)
diff --git a/packages/python-sdk/e2b/api/client/models/team_metric.py b/packages/python-sdk/e2b/api/client/models/team_metric.py
index 97d30d751..ee462568f 100644
--- a/packages/python-sdk/e2b/api/client/models/team_metric.py
+++ b/packages/python-sdk/e2b/api/client/models/team_metric.py
@@ -14,35 +14,35 @@ class TeamMetric:
"""Team metric with timestamp
Attributes:
- concurrent_sandboxes (int): The number of concurrent sandboxes for the team
- sandbox_start_rate (float): Number of sandboxes started per second
timestamp (datetime.datetime): Timestamp of the metric entry
timestamp_unix (int): Timestamp of the metric entry in Unix time (seconds since epoch)
+ concurrent_sandboxes (int): The number of concurrent sandboxes for the team
+ sandbox_start_rate (float): Number of sandboxes started per second
"""
- concurrent_sandboxes: int
- sandbox_start_rate: float
timestamp: datetime.datetime
timestamp_unix: int
+ concurrent_sandboxes: int
+ sandbox_start_rate: float
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- concurrent_sandboxes = self.concurrent_sandboxes
-
- sandbox_start_rate = self.sandbox_start_rate
-
timestamp = self.timestamp.isoformat()
timestamp_unix = self.timestamp_unix
+ concurrent_sandboxes = self.concurrent_sandboxes
+
+ sandbox_start_rate = self.sandbox_start_rate
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "concurrentSandboxes": concurrent_sandboxes,
- "sandboxStartRate": sandbox_start_rate,
"timestamp": timestamp,
"timestampUnix": timestamp_unix,
+ "concurrentSandboxes": concurrent_sandboxes,
+ "sandboxStartRate": sandbox_start_rate,
}
)
@@ -51,19 +51,19 @@ class TeamMetric:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- concurrent_sandboxes = d.pop("concurrentSandboxes")
-
- sandbox_start_rate = d.pop("sandboxStartRate")
-
timestamp = isoparse(d.pop("timestamp"))
timestamp_unix = d.pop("timestampUnix")
+ concurrent_sandboxes = d.pop("concurrentSandboxes")
+
+ sandbox_start_rate = d.pop("sandboxStartRate")
+
team_metric = cls(
- concurrent_sandboxes=concurrent_sandboxes,
- sandbox_start_rate=sandbox_start_rate,
timestamp=timestamp,
timestamp_unix=timestamp_unix,
+ concurrent_sandboxes=concurrent_sandboxes,
+ sandbox_start_rate=sandbox_start_rate,
)
team_metric.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/team_user.py b/packages/python-sdk/e2b/api/client/models/team_user.py
index 26491f7b8..567b07e4f 100644
--- a/packages/python-sdk/e2b/api/client/models/team_user.py
+++ b/packages/python-sdk/e2b/api/client/models/team_user.py
@@ -12,26 +12,26 @@ T = TypeVar("T", bound="TeamUser")
class TeamUser:
"""
Attributes:
- email (Union[None, str]): Email of the user
id (UUID): Identifier of the user
+ email (Union[None, str]): Email of the user
"""
- email: Union[None, str]
id: UUID
+ email: Union[None, str]
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
+ id = str(self.id)
+
email: Union[None, str]
email = self.email
- id = str(self.id)
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "email": email,
"id": id,
+ "email": email,
}
)
@@ -40,6 +40,7 @@ class TeamUser:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
+ id = UUID(d.pop("id"))
def _parse_email(data: object) -> Union[None, str]:
if data is None:
@@ -48,11 +49,9 @@ class TeamUser:
email = _parse_email(d.pop("email"))
- id = UUID(d.pop("id"))
-
team_user = cls(
- email=email,
id=id,
+ email=email,
)
team_user.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/template.py b/packages/python-sdk/e2b/api/client/models/template.py
index c75d4d8e0..82bdd2804 100644
--- a/packages/python-sdk/e2b/api/client/models/template.py
+++ b/packages/python-sdk/e2b/api/client/models/template.py
@@ -19,105 +19,105 @@ T = TypeVar("T", bound="Template")
class Template:
"""
Attributes:
- aliases (list[str]): Aliases of the template
- build_count (int): Number of times the template was built
+ template_id (str): Identifier of the template
build_id (str): Identifier of the last successful build for given template
- build_status (TemplateBuildStatus): Status of the template build
cpu_count (int): CPU cores for the sandbox
+ memory_mb (int): Memory for the sandbox in MiB
+ disk_size_mb (int): Disk size for the sandbox in MiB
+ public (bool): Whether the template is public or only accessible by the team
+ aliases (list[str]): Aliases of the template
+ names (list[str]): Names of the template (namespace/alias format when namespaced)
created_at (datetime.datetime): Time when the template was created
+ updated_at (datetime.datetime): Time when the template was last updated
created_by (Union['TeamUser', None]):
- disk_size_mb (int): Disk size for the sandbox in MiB
- envd_version (str): Version of the envd running in the sandbox
last_spawned_at (Union[None, datetime.datetime]): Time when the template was last used
- memory_mb (int): Memory for the sandbox in MiB
- names (list[str]): Names of the template (namespace/alias format when namespaced)
- public (bool): Whether the template is public or only accessible by the team
spawn_count (int): Number of times the template was used
- template_id (str): Identifier of the template
- updated_at (datetime.datetime): Time when the template was last updated
+ build_count (int): Number of times the template was built
+ envd_version (str): Version of the envd running in the sandbox
+ build_status (TemplateBuildStatus): Status of the template build
"""
- aliases: list[str]
- build_count: int
+ template_id: str
build_id: str
- build_status: TemplateBuildStatus
cpu_count: int
+ memory_mb: int
+ disk_size_mb: int
+ public: bool
+ aliases: list[str]
+ names: list[str]
created_at: datetime.datetime
+ updated_at: datetime.datetime
created_by: Union["TeamUser", None]
- disk_size_mb: int
- envd_version: str
last_spawned_at: Union[None, datetime.datetime]
- memory_mb: int
- names: list[str]
- public: bool
spawn_count: int
- template_id: str
- updated_at: datetime.datetime
+ build_count: int
+ envd_version: str
+ build_status: TemplateBuildStatus
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
from ..models.team_user import TeamUser
- aliases = self.aliases
-
- build_count = self.build_count
+ template_id = self.template_id
build_id = self.build_id
- build_status = self.build_status.value
-
cpu_count = self.cpu_count
+ memory_mb = self.memory_mb
+
+ disk_size_mb = self.disk_size_mb
+
+ public = self.public
+
+ aliases = self.aliases
+
+ names = self.names
+
created_at = self.created_at.isoformat()
+ updated_at = self.updated_at.isoformat()
+
created_by: Union[None, dict[str, Any]]
if isinstance(self.created_by, TeamUser):
created_by = self.created_by.to_dict()
else:
created_by = self.created_by
- disk_size_mb = self.disk_size_mb
-
- envd_version = self.envd_version
-
last_spawned_at: Union[None, str]
if isinstance(self.last_spawned_at, datetime.datetime):
last_spawned_at = self.last_spawned_at.isoformat()
else:
last_spawned_at = self.last_spawned_at
- memory_mb = self.memory_mb
-
- names = self.names
-
- public = self.public
-
spawn_count = self.spawn_count
- template_id = self.template_id
+ build_count = self.build_count
- updated_at = self.updated_at.isoformat()
+ envd_version = self.envd_version
+
+ build_status = self.build_status.value
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "aliases": aliases,
- "buildCount": build_count,
+ "templateID": template_id,
"buildID": build_id,
- "buildStatus": build_status,
"cpuCount": cpu_count,
+ "memoryMB": memory_mb,
+ "diskSizeMB": disk_size_mb,
+ "public": public,
+ "aliases": aliases,
+ "names": names,
"createdAt": created_at,
+ "updatedAt": updated_at,
"createdBy": created_by,
- "diskSizeMB": disk_size_mb,
- "envdVersion": envd_version,
"lastSpawnedAt": last_spawned_at,
- "memoryMB": memory_mb,
- "names": names,
- "public": public,
"spawnCount": spawn_count,
- "templateID": template_id,
- "updatedAt": updated_at,
+ "buildCount": build_count,
+ "envdVersion": envd_version,
+ "buildStatus": build_status,
}
)
@@ -128,18 +128,26 @@ class Template:
from ..models.team_user import TeamUser
d = dict(src_dict)
- aliases = cast(list[str], d.pop("aliases"))
-
- build_count = d.pop("buildCount")
+ template_id = d.pop("templateID")
build_id = d.pop("buildID")
- build_status = TemplateBuildStatus(d.pop("buildStatus"))
-
cpu_count = d.pop("cpuCount")
+ memory_mb = d.pop("memoryMB")
+
+ disk_size_mb = d.pop("diskSizeMB")
+
+ public = d.pop("public")
+
+ aliases = cast(list[str], d.pop("aliases"))
+
+ names = cast(list[str], d.pop("names"))
+
created_at = isoparse(d.pop("createdAt"))
+ updated_at = isoparse(d.pop("updatedAt"))
+
def _parse_created_by(data: object) -> Union["TeamUser", None]:
if data is None:
return data
@@ -155,10 +163,6 @@ class Template:
created_by = _parse_created_by(d.pop("createdBy"))
- disk_size_mb = d.pop("diskSizeMB")
-
- envd_version = d.pop("envdVersion")
-
def _parse_last_spawned_at(data: object) -> Union[None, datetime.datetime]:
if data is None:
return data
@@ -174,35 +178,31 @@ class Template:
last_spawned_at = _parse_last_spawned_at(d.pop("lastSpawnedAt"))
- memory_mb = d.pop("memoryMB")
-
- names = cast(list[str], d.pop("names"))
-
- public = d.pop("public")
-
spawn_count = d.pop("spawnCount")
- template_id = d.pop("templateID")
+ build_count = d.pop("buildCount")
- updated_at = isoparse(d.pop("updatedAt"))
+ envd_version = d.pop("envdVersion")
+
+ build_status = TemplateBuildStatus(d.pop("buildStatus"))
template = cls(
- aliases=aliases,
- build_count=build_count,
+ template_id=template_id,
build_id=build_id,
- build_status=build_status,
cpu_count=cpu_count,
+ memory_mb=memory_mb,
+ disk_size_mb=disk_size_mb,
+ public=public,
+ aliases=aliases,
+ names=names,
created_at=created_at,
+ updated_at=updated_at,
created_by=created_by,
- disk_size_mb=disk_size_mb,
- envd_version=envd_version,
last_spawned_at=last_spawned_at,
- memory_mb=memory_mb,
- names=names,
- public=public,
spawn_count=spawn_count,
- template_id=template_id,
- updated_at=updated_at,
+ build_count=build_count,
+ envd_version=envd_version,
+ build_status=build_status,
)
template.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/template_alias_response.py b/packages/python-sdk/e2b/api/client/models/template_alias_response.py
index 7c9106197..f76f85a14 100644
--- a/packages/python-sdk/e2b/api/client/models/template_alias_response.py
+++ b/packages/python-sdk/e2b/api/client/models/template_alias_response.py
@@ -11,25 +11,25 @@ T = TypeVar("T", bound="TemplateAliasResponse")
class TemplateAliasResponse:
"""
Attributes:
- public (bool): Whether the template is public or only accessible by the team
template_id (str): Identifier of the template
+ public (bool): Whether the template is public or only accessible by the team
"""
- public: bool
template_id: str
+ public: bool
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- public = self.public
-
template_id = self.template_id
+ public = self.public
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "public": public,
"templateID": template_id,
+ "public": public,
}
)
@@ -38,13 +38,13 @@ class TemplateAliasResponse:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- public = d.pop("public")
-
template_id = d.pop("templateID")
+ public = d.pop("public")
+
template_alias_response = cls(
- public=public,
template_id=template_id,
+ public=public,
)
template_alias_response.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/template_build.py b/packages/python-sdk/e2b/api/client/models/template_build.py
index f42a3f6fe..2e476e01f 100644
--- a/packages/python-sdk/e2b/api/client/models/template_build.py
+++ b/packages/python-sdk/e2b/api/client/models/template_build.py
@@ -18,66 +18,66 @@ class TemplateBuild:
"""
Attributes:
build_id (UUID): Identifier of the build
- cpu_count (int): CPU cores for the sandbox
- created_at (datetime.datetime): Time when the build was created
- memory_mb (int): Memory for the sandbox in MiB
status (TemplateBuildStatus): Status of the template build
+ created_at (datetime.datetime): Time when the build was created
updated_at (datetime.datetime): Time when the build was last updated
+ cpu_count (int): CPU cores for the sandbox
+ memory_mb (int): Memory for the sandbox in MiB
+ finished_at (Union[Unset, datetime.datetime]): Time when the build was finished
disk_size_mb (Union[Unset, int]): Disk size for the sandbox in MiB
envd_version (Union[Unset, str]): Version of the envd running in the sandbox
- finished_at (Union[Unset, datetime.datetime]): Time when the build was finished
"""
build_id: UUID
- cpu_count: int
- created_at: datetime.datetime
- memory_mb: int
status: TemplateBuildStatus
+ created_at: datetime.datetime
updated_at: datetime.datetime
+ cpu_count: int
+ memory_mb: int
+ finished_at: Union[Unset, datetime.datetime] = UNSET
disk_size_mb: Union[Unset, int] = UNSET
envd_version: Union[Unset, str] = UNSET
- finished_at: Union[Unset, datetime.datetime] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
build_id = str(self.build_id)
- cpu_count = self.cpu_count
+ status = self.status.value
created_at = self.created_at.isoformat()
- memory_mb = self.memory_mb
-
- status = self.status.value
-
updated_at = self.updated_at.isoformat()
- disk_size_mb = self.disk_size_mb
+ cpu_count = self.cpu_count
- envd_version = self.envd_version
+ memory_mb = self.memory_mb
finished_at: Union[Unset, str] = UNSET
if not isinstance(self.finished_at, Unset):
finished_at = self.finished_at.isoformat()
+ disk_size_mb = self.disk_size_mb
+
+ envd_version = self.envd_version
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"buildID": build_id,
- "cpuCount": cpu_count,
- "createdAt": created_at,
- "memoryMB": memory_mb,
"status": status,
+ "createdAt": created_at,
"updatedAt": updated_at,
+ "cpuCount": cpu_count,
+ "memoryMB": memory_mb,
}
)
+ if finished_at is not UNSET:
+ field_dict["finishedAt"] = finished_at
if disk_size_mb is not UNSET:
field_dict["diskSizeMB"] = disk_size_mb
if envd_version is not UNSET:
field_dict["envdVersion"] = envd_version
- if finished_at is not UNSET:
- field_dict["finishedAt"] = finished_at
return field_dict
@@ -86,19 +86,15 @@ class TemplateBuild:
d = dict(src_dict)
build_id = UUID(d.pop("buildID"))
- cpu_count = d.pop("cpuCount")
+ status = TemplateBuildStatus(d.pop("status"))
created_at = isoparse(d.pop("createdAt"))
- memory_mb = d.pop("memoryMB")
-
- status = TemplateBuildStatus(d.pop("status"))
-
updated_at = isoparse(d.pop("updatedAt"))
- disk_size_mb = d.pop("diskSizeMB", UNSET)
+ cpu_count = d.pop("cpuCount")
- envd_version = d.pop("envdVersion", UNSET)
+ memory_mb = d.pop("memoryMB")
_finished_at = d.pop("finishedAt", UNSET)
finished_at: Union[Unset, datetime.datetime]
@@ -107,16 +103,20 @@ class TemplateBuild:
else:
finished_at = isoparse(_finished_at)
+ disk_size_mb = d.pop("diskSizeMB", UNSET)
+
+ envd_version = d.pop("envdVersion", UNSET)
+
template_build = cls(
build_id=build_id,
- cpu_count=cpu_count,
- created_at=created_at,
- memory_mb=memory_mb,
status=status,
+ created_at=created_at,
updated_at=updated_at,
+ cpu_count=cpu_count,
+ memory_mb=memory_mb,
+ finished_at=finished_at,
disk_size_mb=disk_size_mb,
envd_version=envd_version,
- finished_at=finished_at,
)
template_build.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/template_build_info.py b/packages/python-sdk/e2b/api/client/models/template_build_info.py
index 90b670c24..91e1d3fbd 100644
--- a/packages/python-sdk/e2b/api/client/models/template_build_info.py
+++ b/packages/python-sdk/e2b/api/client/models/template_build_info.py
@@ -19,35 +19,35 @@ T = TypeVar("T", bound="TemplateBuildInfo")
class TemplateBuildInfo:
"""
Attributes:
- build_id (str): Identifier of the build
- log_entries (list['BuildLogEntry']): Build logs structured
logs (list[str]): Build logs
- status (TemplateBuildStatus): Status of the template build
+ log_entries (list['BuildLogEntry']): Build logs structured
template_id (str): Identifier of the template
+ build_id (str): Identifier of the build
+ status (TemplateBuildStatus): Status of the template build
reason (Union[Unset, BuildStatusReason]):
"""
- build_id: str
- log_entries: list["BuildLogEntry"]
logs: list[str]
- status: TemplateBuildStatus
+ log_entries: list["BuildLogEntry"]
template_id: str
+ build_id: str
+ status: TemplateBuildStatus
reason: Union[Unset, "BuildStatusReason"] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- build_id = self.build_id
+ logs = self.logs
log_entries = []
for log_entries_item_data in self.log_entries:
log_entries_item = log_entries_item_data.to_dict()
log_entries.append(log_entries_item)
- logs = self.logs
+ template_id = self.template_id
- status = self.status.value
+ build_id = self.build_id
- template_id = self.template_id
+ status = self.status.value
reason: Union[Unset, dict[str, Any]] = UNSET
if not isinstance(self.reason, Unset):
@@ -57,11 +57,11 @@ class TemplateBuildInfo:
field_dict.update(self.additional_properties)
field_dict.update(
{
- "buildID": build_id,
- "logEntries": log_entries,
"logs": logs,
- "status": status,
+ "logEntries": log_entries,
"templateID": template_id,
+ "buildID": build_id,
+ "status": status,
}
)
if reason is not UNSET:
@@ -75,7 +75,7 @@ class TemplateBuildInfo:
from ..models.build_status_reason import BuildStatusReason
d = dict(src_dict)
- build_id = d.pop("buildID")
+ logs = cast(list[str], d.pop("logs"))
log_entries = []
_log_entries = d.pop("logEntries")
@@ -84,11 +84,11 @@ class TemplateBuildInfo:
log_entries.append(log_entries_item)
- logs = cast(list[str], d.pop("logs"))
+ template_id = d.pop("templateID")
- status = TemplateBuildStatus(d.pop("status"))
+ build_id = d.pop("buildID")
- template_id = d.pop("templateID")
+ status = TemplateBuildStatus(d.pop("status"))
_reason = d.pop("reason", UNSET)
reason: Union[Unset, BuildStatusReason]
@@ -98,11 +98,11 @@ class TemplateBuildInfo:
reason = BuildStatusReason.from_dict(_reason)
template_build_info = cls(
- build_id=build_id,
- log_entries=log_entries,
logs=logs,
- status=status,
+ log_entries=log_entries,
template_id=template_id,
+ build_id=build_id,
+ status=status,
reason=reason,
)
diff --git a/packages/python-sdk/e2b/api/client/models/template_build_request.py b/packages/python-sdk/e2b/api/client/models/template_build_request.py
index b41e1d0cd..b24df8446 100644
--- a/packages/python-sdk/e2b/api/client/models/template_build_request.py
+++ b/packages/python-sdk/e2b/api/client/models/template_build_request.py
@@ -15,20 +15,20 @@ class TemplateBuildRequest:
Attributes:
dockerfile (str): Dockerfile for the template
alias (Union[Unset, str]): Alias of the template
+ team_id (Union[Unset, str]): Identifier of the team
+ start_cmd (Union[Unset, str]): Start command to execute in the template after the build
+ ready_cmd (Union[Unset, str]): Ready check command to execute in the template after the build
cpu_count (Union[Unset, int]): CPU cores for the sandbox
memory_mb (Union[Unset, int]): Memory for the sandbox in MiB
- ready_cmd (Union[Unset, str]): Ready check command to execute in the template after the build
- start_cmd (Union[Unset, str]): Start command to execute in the template after the build
- team_id (Union[Unset, str]): Identifier of the team
"""
dockerfile: str
alias: Union[Unset, str] = UNSET
+ team_id: Union[Unset, str] = UNSET
+ start_cmd: Union[Unset, str] = UNSET
+ ready_cmd: Union[Unset, str] = UNSET
cpu_count: Union[Unset, int] = UNSET
memory_mb: Union[Unset, int] = UNSET
- ready_cmd: Union[Unset, str] = UNSET
- start_cmd: Union[Unset, str] = UNSET
- team_id: Union[Unset, str] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
@@ -36,15 +36,15 @@ class TemplateBuildRequest:
alias = self.alias
- cpu_count = self.cpu_count
+ team_id = self.team_id
- memory_mb = self.memory_mb
+ start_cmd = self.start_cmd
ready_cmd = self.ready_cmd
- start_cmd = self.start_cmd
+ cpu_count = self.cpu_count
- team_id = self.team_id
+ memory_mb = self.memory_mb
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
@@ -55,16 +55,16 @@ class TemplateBuildRequest:
)
if alias is not UNSET:
field_dict["alias"] = alias
+ if team_id is not UNSET:
+ field_dict["teamID"] = team_id
+ if start_cmd is not UNSET:
+ field_dict["startCmd"] = start_cmd
+ if ready_cmd is not UNSET:
+ field_dict["readyCmd"] = ready_cmd
if cpu_count is not UNSET:
field_dict["cpuCount"] = cpu_count
if memory_mb is not UNSET:
field_dict["memoryMB"] = memory_mb
- if ready_cmd is not UNSET:
- field_dict["readyCmd"] = ready_cmd
- if start_cmd is not UNSET:
- field_dict["startCmd"] = start_cmd
- if team_id is not UNSET:
- field_dict["teamID"] = team_id
return field_dict
@@ -75,24 +75,24 @@ class TemplateBuildRequest:
alias = d.pop("alias", UNSET)
- cpu_count = d.pop("cpuCount", UNSET)
+ team_id = d.pop("teamID", UNSET)
- memory_mb = d.pop("memoryMB", UNSET)
+ start_cmd = d.pop("startCmd", UNSET)
ready_cmd = d.pop("readyCmd", UNSET)
- start_cmd = d.pop("startCmd", UNSET)
+ cpu_count = d.pop("cpuCount", UNSET)
- team_id = d.pop("teamID", UNSET)
+ memory_mb = d.pop("memoryMB", UNSET)
template_build_request = cls(
dockerfile=dockerfile,
alias=alias,
+ team_id=team_id,
+ start_cmd=start_cmd,
+ ready_cmd=ready_cmd,
cpu_count=cpu_count,
memory_mb=memory_mb,
- ready_cmd=ready_cmd,
- start_cmd=start_cmd,
- team_id=team_id,
)
template_build_request.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/template_build_request_v2.py b/packages/python-sdk/e2b/api/client/models/template_build_request_v2.py
index 1473424e0..1194f49c0 100644
--- a/packages/python-sdk/e2b/api/client/models/template_build_request_v2.py
+++ b/packages/python-sdk/e2b/api/client/models/template_build_request_v2.py
@@ -14,26 +14,26 @@ class TemplateBuildRequestV2:
"""
Attributes:
alias (str): Alias of the template
+ team_id (Union[Unset, str]): Identifier of the team
cpu_count (Union[Unset, int]): CPU cores for the sandbox
memory_mb (Union[Unset, int]): Memory for the sandbox in MiB
- team_id (Union[Unset, str]): Identifier of the team
"""
alias: str
+ team_id: Union[Unset, str] = UNSET
cpu_count: Union[Unset, int] = UNSET
memory_mb: Union[Unset, int] = UNSET
- team_id: Union[Unset, str] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
alias = self.alias
+ team_id = self.team_id
+
cpu_count = self.cpu_count
memory_mb = self.memory_mb
- team_id = self.team_id
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
@@ -41,12 +41,12 @@ class TemplateBuildRequestV2:
"alias": alias,
}
)
+ if team_id is not UNSET:
+ field_dict["teamID"] = team_id
if cpu_count is not UNSET:
field_dict["cpuCount"] = cpu_count
if memory_mb is not UNSET:
field_dict["memoryMB"] = memory_mb
- if team_id is not UNSET:
- field_dict["teamID"] = team_id
return field_dict
@@ -55,17 +55,17 @@ class TemplateBuildRequestV2:
d = dict(src_dict)
alias = d.pop("alias")
+ team_id = d.pop("teamID", UNSET)
+
cpu_count = d.pop("cpuCount", UNSET)
memory_mb = d.pop("memoryMB", UNSET)
- team_id = d.pop("teamID", UNSET)
-
template_build_request_v2 = cls(
alias=alias,
+ team_id=team_id,
cpu_count=cpu_count,
memory_mb=memory_mb,
- team_id=team_id,
)
template_build_request_v2.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/template_build_request_v3.py b/packages/python-sdk/e2b/api/client/models/template_build_request_v3.py
index dda90f01f..dd5d42e73 100644
--- a/packages/python-sdk/e2b/api/client/models/template_build_request_v3.py
+++ b/packages/python-sdk/e2b/api/client/models/template_build_request_v3.py
@@ -13,78 +13,78 @@ T = TypeVar("T", bound="TemplateBuildRequestV3")
class TemplateBuildRequestV3:
"""
Attributes:
- alias (Union[Unset, str]): Alias of the template. Deprecated, use name instead.
- cpu_count (Union[Unset, int]): CPU cores for the sandbox
- memory_mb (Union[Unset, int]): Memory for the sandbox in MiB
name (Union[Unset, str]): Name of the template. Can include a tag with colon separator (e.g. "my-template" or
"my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array.
tags (Union[Unset, list[str]]): Tags to assign to the template build
+ alias (Union[Unset, str]): Alias of the template. Deprecated, use name instead.
team_id (Union[Unset, str]): Identifier of the team
+ cpu_count (Union[Unset, int]): CPU cores for the sandbox
+ memory_mb (Union[Unset, int]): Memory for the sandbox in MiB
"""
- alias: Union[Unset, str] = UNSET
- cpu_count: Union[Unset, int] = UNSET
- memory_mb: Union[Unset, int] = UNSET
name: Union[Unset, str] = UNSET
tags: Union[Unset, list[str]] = UNSET
+ alias: Union[Unset, str] = UNSET
team_id: Union[Unset, str] = UNSET
+ cpu_count: Union[Unset, int] = UNSET
+ memory_mb: Union[Unset, int] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- alias = self.alias
-
- cpu_count = self.cpu_count
-
- memory_mb = self.memory_mb
-
name = self.name
tags: Union[Unset, list[str]] = UNSET
if not isinstance(self.tags, Unset):
tags = self.tags
+ alias = self.alias
+
team_id = self.team_id
+ cpu_count = self.cpu_count
+
+ memory_mb = self.memory_mb
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
- if alias is not UNSET:
- field_dict["alias"] = alias
- if cpu_count is not UNSET:
- field_dict["cpuCount"] = cpu_count
- if memory_mb is not UNSET:
- field_dict["memoryMB"] = memory_mb
if name is not UNSET:
field_dict["name"] = name
if tags is not UNSET:
field_dict["tags"] = tags
+ if alias is not UNSET:
+ field_dict["alias"] = alias
if team_id is not UNSET:
field_dict["teamID"] = team_id
+ if cpu_count is not UNSET:
+ field_dict["cpuCount"] = cpu_count
+ if memory_mb is not UNSET:
+ field_dict["memoryMB"] = memory_mb
return field_dict
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- alias = d.pop("alias", UNSET)
-
- cpu_count = d.pop("cpuCount", UNSET)
-
- memory_mb = d.pop("memoryMB", UNSET)
-
name = d.pop("name", UNSET)
tags = cast(list[str], d.pop("tags", UNSET))
+ alias = d.pop("alias", UNSET)
+
team_id = d.pop("teamID", UNSET)
+ cpu_count = d.pop("cpuCount", UNSET)
+
+ memory_mb = d.pop("memoryMB", UNSET)
+
template_build_request_v3 = cls(
- alias=alias,
- cpu_count=cpu_count,
- memory_mb=memory_mb,
name=name,
tags=tags,
+ alias=alias,
team_id=team_id,
+ cpu_count=cpu_count,
+ memory_mb=memory_mb,
)
template_build_request_v3.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/template_build_start_v2.py b/packages/python-sdk/e2b/api/client/models/template_build_start_v2.py
index 32adf844e..d2bbaac1c 100644
--- a/packages/python-sdk/e2b/api/client/models/template_build_start_v2.py
+++ b/packages/python-sdk/e2b/api/client/models/template_build_start_v2.py
@@ -20,35 +20,35 @@ T = TypeVar("T", bound="TemplateBuildStartV2")
class TemplateBuildStartV2:
"""
Attributes:
- force (Union[Unset, bool]): Whether the whole build should be forced to run regardless of the cache Default:
- False.
from_image (Union[Unset, str]): Image to use as a base for the template build
- from_image_registry (Union['AWSRegistry', 'GCPRegistry', 'GeneralRegistry', Unset]):
from_template (Union[Unset, str]): Template to use as a base for the template build
- ready_cmd (Union[Unset, str]): Ready check command to execute in the template after the build
- start_cmd (Union[Unset, str]): Start command to execute in the template after the build
+ from_image_registry (Union['AWSRegistry', 'GCPRegistry', 'GeneralRegistry', Unset]):
+ force (Union[Unset, bool]): Whether the whole build should be forced to run regardless of the cache Default:
+ False.
steps (Union[Unset, list['TemplateStep']]): List of steps to execute in the template build
+ start_cmd (Union[Unset, str]): Start command to execute in the template after the build
+ ready_cmd (Union[Unset, str]): Ready check command to execute in the template after the build
"""
- force: Union[Unset, bool] = False
from_image: Union[Unset, str] = UNSET
+ from_template: Union[Unset, str] = UNSET
from_image_registry: Union[
"AWSRegistry", "GCPRegistry", "GeneralRegistry", Unset
] = UNSET
- from_template: Union[Unset, str] = UNSET
- ready_cmd: Union[Unset, str] = UNSET
- start_cmd: Union[Unset, str] = UNSET
+ force: Union[Unset, bool] = False
steps: Union[Unset, list["TemplateStep"]] = UNSET
+ start_cmd: Union[Unset, str] = UNSET
+ ready_cmd: Union[Unset, str] = UNSET
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
from ..models.aws_registry import AWSRegistry
from ..models.gcp_registry import GCPRegistry
- force = self.force
-
from_image = self.from_image
+ from_template = self.from_template
+
from_image_registry: Union[Unset, dict[str, Any]]
if isinstance(self.from_image_registry, Unset):
from_image_registry = UNSET
@@ -59,11 +59,7 @@ class TemplateBuildStartV2:
else:
from_image_registry = self.from_image_registry.to_dict()
- from_template = self.from_template
-
- ready_cmd = self.ready_cmd
-
- start_cmd = self.start_cmd
+ force = self.force
steps: Union[Unset, list[dict[str, Any]]] = UNSET
if not isinstance(self.steps, Unset):
@@ -72,23 +68,27 @@ class TemplateBuildStartV2:
steps_item = steps_item_data.to_dict()
steps.append(steps_item)
+ start_cmd = self.start_cmd
+
+ ready_cmd = self.ready_cmd
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
- if force is not UNSET:
- field_dict["force"] = force
if from_image is not UNSET:
field_dict["fromImage"] = from_image
- if from_image_registry is not UNSET:
- field_dict["fromImageRegistry"] = from_image_registry
if from_template is not UNSET:
field_dict["fromTemplate"] = from_template
- if ready_cmd is not UNSET:
- field_dict["readyCmd"] = ready_cmd
- if start_cmd is not UNSET:
- field_dict["startCmd"] = start_cmd
+ if from_image_registry is not UNSET:
+ field_dict["fromImageRegistry"] = from_image_registry
+ if force is not UNSET:
+ field_dict["force"] = force
if steps is not UNSET:
field_dict["steps"] = steps
+ if start_cmd is not UNSET:
+ field_dict["startCmd"] = start_cmd
+ if ready_cmd is not UNSET:
+ field_dict["readyCmd"] = ready_cmd
return field_dict
@@ -100,10 +100,10 @@ class TemplateBuildStartV2:
from ..models.template_step import TemplateStep
d = dict(src_dict)
- force = d.pop("force", UNSET)
-
from_image = d.pop("fromImage", UNSET)
+ from_template = d.pop("fromTemplate", UNSET)
+
def _parse_from_image_registry(
data: object,
) -> Union["AWSRegistry", "GCPRegistry", "GeneralRegistry", Unset]:
@@ -141,11 +141,7 @@ class TemplateBuildStartV2:
d.pop("fromImageRegistry", UNSET)
)
- from_template = d.pop("fromTemplate", UNSET)
-
- ready_cmd = d.pop("readyCmd", UNSET)
-
- start_cmd = d.pop("startCmd", UNSET)
+ force = d.pop("force", UNSET)
steps = []
_steps = d.pop("steps", UNSET)
@@ -154,14 +150,18 @@ class TemplateBuildStartV2:
steps.append(steps_item)
+ start_cmd = d.pop("startCmd", UNSET)
+
+ ready_cmd = d.pop("readyCmd", UNSET)
+
template_build_start_v2 = cls(
- force=force,
from_image=from_image,
- from_image_registry=from_image_registry,
from_template=from_template,
- ready_cmd=ready_cmd,
- start_cmd=start_cmd,
+ from_image_registry=from_image_registry,
+ force=force,
steps=steps,
+ start_cmd=start_cmd,
+ ready_cmd=ready_cmd,
)
template_build_start_v2.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/template_legacy.py b/packages/python-sdk/e2b/api/client/models/template_legacy.py
index 69501e565..e78f50748 100644
--- a/packages/python-sdk/e2b/api/client/models/template_legacy.py
+++ b/packages/python-sdk/e2b/api/client/models/template_legacy.py
@@ -17,95 +17,95 @@ T = TypeVar("T", bound="TemplateLegacy")
class TemplateLegacy:
"""
Attributes:
- aliases (list[str]): Aliases of the template
- build_count (int): Number of times the template was built
+ template_id (str): Identifier of the template
build_id (str): Identifier of the last successful build for given template
cpu_count (int): CPU cores for the sandbox
+ memory_mb (int): Memory for the sandbox in MiB
+ disk_size_mb (int): Disk size for the sandbox in MiB
+ public (bool): Whether the template is public or only accessible by the team
+ aliases (list[str]): Aliases of the template
created_at (datetime.datetime): Time when the template was created
+ updated_at (datetime.datetime): Time when the template was last updated
created_by (Union['TeamUser', None]):
- disk_size_mb (int): Disk size for the sandbox in MiB
- envd_version (str): Version of the envd running in the sandbox
last_spawned_at (Union[None, datetime.datetime]): Time when the template was last used
- memory_mb (int): Memory for the sandbox in MiB
- public (bool): Whether the template is public or only accessible by the team
spawn_count (int): Number of times the template was used
- template_id (str): Identifier of the template
- updated_at (datetime.datetime): Time when the template was last updated
+ build_count (int): Number of times the template was built
+ envd_version (str): Version of the envd running in the sandbox
"""
- aliases: list[str]
- build_count: int
+ template_id: str
build_id: str
cpu_count: int
+ memory_mb: int
+ disk_size_mb: int
+ public: bool
+ aliases: list[str]
created_at: datetime.datetime
+ updated_at: datetime.datetime
created_by: Union["TeamUser", None]
- disk_size_mb: int
- envd_version: str
last_spawned_at: Union[None, datetime.datetime]
- memory_mb: int
- public: bool
spawn_count: int
- template_id: str
- updated_at: datetime.datetime
+ build_count: int
+ envd_version: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
from ..models.team_user import TeamUser
- aliases = self.aliases
-
- build_count = self.build_count
+ template_id = self.template_id
build_id = self.build_id
cpu_count = self.cpu_count
+ memory_mb = self.memory_mb
+
+ disk_size_mb = self.disk_size_mb
+
+ public = self.public
+
+ aliases = self.aliases
+
created_at = self.created_at.isoformat()
+ updated_at = self.updated_at.isoformat()
+
created_by: Union[None, dict[str, Any]]
if isinstance(self.created_by, TeamUser):
created_by = self.created_by.to_dict()
else:
created_by = self.created_by
- disk_size_mb = self.disk_size_mb
-
- envd_version = self.envd_version
-
last_spawned_at: Union[None, str]
if isinstance(self.last_spawned_at, datetime.datetime):
last_spawned_at = self.last_spawned_at.isoformat()
else:
last_spawned_at = self.last_spawned_at
- memory_mb = self.memory_mb
-
- public = self.public
-
spawn_count = self.spawn_count
- template_id = self.template_id
+ build_count = self.build_count
- updated_at = self.updated_at.isoformat()
+ envd_version = self.envd_version
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "aliases": aliases,
- "buildCount": build_count,
+ "templateID": template_id,
"buildID": build_id,
"cpuCount": cpu_count,
+ "memoryMB": memory_mb,
+ "diskSizeMB": disk_size_mb,
+ "public": public,
+ "aliases": aliases,
"createdAt": created_at,
+ "updatedAt": updated_at,
"createdBy": created_by,
- "diskSizeMB": disk_size_mb,
- "envdVersion": envd_version,
"lastSpawnedAt": last_spawned_at,
- "memoryMB": memory_mb,
- "public": public,
"spawnCount": spawn_count,
- "templateID": template_id,
- "updatedAt": updated_at,
+ "buildCount": build_count,
+ "envdVersion": envd_version,
}
)
@@ -116,16 +116,24 @@ class TemplateLegacy:
from ..models.team_user import TeamUser
d = dict(src_dict)
- aliases = cast(list[str], d.pop("aliases"))
-
- build_count = d.pop("buildCount")
+ template_id = d.pop("templateID")
build_id = d.pop("buildID")
cpu_count = d.pop("cpuCount")
+ memory_mb = d.pop("memoryMB")
+
+ disk_size_mb = d.pop("diskSizeMB")
+
+ public = d.pop("public")
+
+ aliases = cast(list[str], d.pop("aliases"))
+
created_at = isoparse(d.pop("createdAt"))
+ updated_at = isoparse(d.pop("updatedAt"))
+
def _parse_created_by(data: object) -> Union["TeamUser", None]:
if data is None:
return data
@@ -141,10 +149,6 @@ class TemplateLegacy:
created_by = _parse_created_by(d.pop("createdBy"))
- disk_size_mb = d.pop("diskSizeMB")
-
- envd_version = d.pop("envdVersion")
-
def _parse_last_spawned_at(data: object) -> Union[None, datetime.datetime]:
if data is None:
return data
@@ -160,31 +164,27 @@ class TemplateLegacy:
last_spawned_at = _parse_last_spawned_at(d.pop("lastSpawnedAt"))
- memory_mb = d.pop("memoryMB")
-
- public = d.pop("public")
-
spawn_count = d.pop("spawnCount")
- template_id = d.pop("templateID")
+ build_count = d.pop("buildCount")
- updated_at = isoparse(d.pop("updatedAt"))
+ envd_version = d.pop("envdVersion")
template_legacy = cls(
- aliases=aliases,
- build_count=build_count,
+ template_id=template_id,
build_id=build_id,
cpu_count=cpu_count,
+ memory_mb=memory_mb,
+ disk_size_mb=disk_size_mb,
+ public=public,
+ aliases=aliases,
created_at=created_at,
+ updated_at=updated_at,
created_by=created_by,
- disk_size_mb=disk_size_mb,
- envd_version=envd_version,
last_spawned_at=last_spawned_at,
- memory_mb=memory_mb,
- public=public,
spawn_count=spawn_count,
- template_id=template_id,
- updated_at=updated_at,
+ build_count=build_count,
+ envd_version=envd_version,
)
template_legacy.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/template_request_response_v3.py b/packages/python-sdk/e2b/api/client/models/template_request_response_v3.py
index 9921980c5..a32b432fb 100644
--- a/packages/python-sdk/e2b/api/client/models/template_request_response_v3.py
+++ b/packages/python-sdk/e2b/api/client/models/template_request_response_v3.py
@@ -11,45 +11,45 @@ T = TypeVar("T", bound="TemplateRequestResponseV3")
class TemplateRequestResponseV3:
"""
Attributes:
- aliases (list[str]): Aliases of the template
+ template_id (str): Identifier of the template
build_id (str): Identifier of the last successful build for given template
- names (list[str]): Names of the template
public (bool): Whether the template is public or only accessible by the team
+ names (list[str]): Names of the template
tags (list[str]): Tags assigned to the template build
- template_id (str): Identifier of the template
+ aliases (list[str]): Aliases of the template
"""
- aliases: list[str]
+ template_id: str
build_id: str
- names: list[str]
public: bool
+ names: list[str]
tags: list[str]
- template_id: str
+ aliases: list[str]
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- aliases = self.aliases
+ template_id = self.template_id
build_id = self.build_id
- names = self.names
-
public = self.public
+ names = self.names
+
tags = self.tags
- template_id = self.template_id
+ aliases = self.aliases
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "aliases": aliases,
+ "templateID": template_id,
"buildID": build_id,
- "names": names,
"public": public,
+ "names": names,
"tags": tags,
- "templateID": template_id,
+ "aliases": aliases,
}
)
@@ -58,25 +58,25 @@ class TemplateRequestResponseV3:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- aliases = cast(list[str], d.pop("aliases"))
+ template_id = d.pop("templateID")
build_id = d.pop("buildID")
- names = cast(list[str], d.pop("names"))
-
public = d.pop("public")
+ names = cast(list[str], d.pop("names"))
+
tags = cast(list[str], d.pop("tags"))
- template_id = d.pop("templateID")
+ aliases = cast(list[str], d.pop("aliases"))
template_request_response_v3 = cls(
- aliases=aliases,
+ template_id=template_id,
build_id=build_id,
- names=names,
public=public,
+ names=names,
tags=tags,
- template_id=template_id,
+ aliases=aliases,
)
template_request_response_v3.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/template_tag.py b/packages/python-sdk/e2b/api/client/models/template_tag.py
index cd2680906..ec1d356d4 100644
--- a/packages/python-sdk/e2b/api/client/models/template_tag.py
+++ b/packages/python-sdk/e2b/api/client/models/template_tag.py
@@ -14,30 +14,30 @@ T = TypeVar("T", bound="TemplateTag")
class TemplateTag:
"""
Attributes:
+ tag (str): The tag name
build_id (UUID): Identifier of the build associated with this tag
created_at (datetime.datetime): Time when the tag was assigned
- tag (str): The tag name
"""
+ tag: str
build_id: UUID
created_at: datetime.datetime
- tag: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
+ tag = self.tag
+
build_id = str(self.build_id)
created_at = self.created_at.isoformat()
- tag = self.tag
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
+ "tag": tag,
"buildID": build_id,
"createdAt": created_at,
- "tag": tag,
}
)
@@ -46,16 +46,16 @@ class TemplateTag:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
+ tag = d.pop("tag")
+
build_id = UUID(d.pop("buildID"))
created_at = isoparse(d.pop("createdAt"))
- tag = d.pop("tag")
-
template_tag = cls(
+ tag=tag,
build_id=build_id,
created_at=created_at,
- tag=tag,
)
template_tag.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/template_with_builds.py b/packages/python-sdk/e2b/api/client/models/template_with_builds.py
index 90c0a6344..9bd60d6cb 100644
--- a/packages/python-sdk/e2b/api/client/models/template_with_builds.py
+++ b/packages/python-sdk/e2b/api/client/models/template_with_builds.py
@@ -17,67 +17,67 @@ T = TypeVar("T", bound="TemplateWithBuilds")
class TemplateWithBuilds:
"""
Attributes:
+ template_id (str): Identifier of the template
+ public (bool): Whether the template is public or only accessible by the team
aliases (list[str]): Aliases of the template
- builds (list['TemplateBuild']): List of builds for the template
+ names (list[str]): Names of the template (namespace/alias format when namespaced)
created_at (datetime.datetime): Time when the template was created
+ updated_at (datetime.datetime): Time when the template was last updated
last_spawned_at (Union[None, datetime.datetime]): Time when the template was last used
- names (list[str]): Names of the template (namespace/alias format when namespaced)
- public (bool): Whether the template is public or only accessible by the team
spawn_count (int): Number of times the template was used
- template_id (str): Identifier of the template
- updated_at (datetime.datetime): Time when the template was last updated
+ builds (list['TemplateBuild']): List of builds for the template
"""
+ template_id: str
+ public: bool
aliases: list[str]
- builds: list["TemplateBuild"]
+ names: list[str]
created_at: datetime.datetime
+ updated_at: datetime.datetime
last_spawned_at: Union[None, datetime.datetime]
- names: list[str]
- public: bool
spawn_count: int
- template_id: str
- updated_at: datetime.datetime
+ builds: list["TemplateBuild"]
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
+ template_id = self.template_id
+
+ public = self.public
+
aliases = self.aliases
- builds = []
- for builds_item_data in self.builds:
- builds_item = builds_item_data.to_dict()
- builds.append(builds_item)
+ names = self.names
created_at = self.created_at.isoformat()
+ updated_at = self.updated_at.isoformat()
+
last_spawned_at: Union[None, str]
if isinstance(self.last_spawned_at, datetime.datetime):
last_spawned_at = self.last_spawned_at.isoformat()
else:
last_spawned_at = self.last_spawned_at
- names = self.names
-
- public = self.public
-
spawn_count = self.spawn_count
- template_id = self.template_id
-
- updated_at = self.updated_at.isoformat()
+ builds = []
+ for builds_item_data in self.builds:
+ builds_item = builds_item_data.to_dict()
+ builds.append(builds_item)
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
+ "templateID": template_id,
+ "public": public,
"aliases": aliases,
- "builds": builds,
+ "names": names,
"createdAt": created_at,
+ "updatedAt": updated_at,
"lastSpawnedAt": last_spawned_at,
- "names": names,
- "public": public,
"spawnCount": spawn_count,
- "templateID": template_id,
- "updatedAt": updated_at,
+ "builds": builds,
}
)
@@ -88,17 +88,18 @@ class TemplateWithBuilds:
from ..models.template_build import TemplateBuild
d = dict(src_dict)
- aliases = cast(list[str], d.pop("aliases"))
+ template_id = d.pop("templateID")
- builds = []
- _builds = d.pop("builds")
- for builds_item_data in _builds:
- builds_item = TemplateBuild.from_dict(builds_item_data)
+ public = d.pop("public")
- builds.append(builds_item)
+ aliases = cast(list[str], d.pop("aliases"))
+
+ names = cast(list[str], d.pop("names"))
created_at = isoparse(d.pop("createdAt"))
+ updated_at = isoparse(d.pop("updatedAt"))
+
def _parse_last_spawned_at(data: object) -> Union[None, datetime.datetime]:
if data is None:
return data
@@ -114,26 +115,25 @@ class TemplateWithBuilds:
last_spawned_at = _parse_last_spawned_at(d.pop("lastSpawnedAt"))
- names = cast(list[str], d.pop("names"))
-
- public = d.pop("public")
-
spawn_count = d.pop("spawnCount")
- template_id = d.pop("templateID")
+ builds = []
+ _builds = d.pop("builds")
+ for builds_item_data in _builds:
+ builds_item = TemplateBuild.from_dict(builds_item_data)
- updated_at = isoparse(d.pop("updatedAt"))
+ builds.append(builds_item)
template_with_builds = cls(
+ template_id=template_id,
+ public=public,
aliases=aliases,
- builds=builds,
+ names=names,
created_at=created_at,
+ updated_at=updated_at,
last_spawned_at=last_spawned_at,
- names=names,
- public=public,
spawn_count=spawn_count,
- template_id=template_id,
- updated_at=updated_at,
+ builds=builds,
)
template_with_builds.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/volume.py b/packages/python-sdk/e2b/api/client/models/volume.py
index 77474989c..66c5f13bf 100644
--- a/packages/python-sdk/e2b/api/client/models/volume.py
+++ b/packages/python-sdk/e2b/api/client/models/volume.py
@@ -11,25 +11,25 @@ T = TypeVar("T", bound="Volume")
class Volume:
"""
Attributes:
- name (str): Name of the volume
volume_id (str): ID of the volume
+ name (str): Name of the volume
"""
- name: str
volume_id: str
+ name: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
- name = self.name
-
volume_id = self.volume_id
+ name = self.name
+
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
- "name": name,
"volumeID": volume_id,
+ "name": name,
}
)
@@ -38,13 +38,13 @@ class Volume:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
- name = d.pop("name")
-
volume_id = d.pop("volumeID")
+ name = d.pop("name")
+
volume = cls(
- name=name,
volume_id=volume_id,
+ name=name,
)
volume.additional_properties = d
diff --git a/packages/python-sdk/e2b/api/client/models/volume_and_token.py b/packages/python-sdk/e2b/api/client/models/volume_and_token.py
index 5f57d4630..dabbb23a6 100644
--- a/packages/python-sdk/e2b/api/client/models/volume_and_token.py
+++ b/packages/python-sdk/e2b/api/client/models/volume_and_token.py
@@ -11,30 +11,30 @@ T = TypeVar("T", bound="VolumeAndToken")
class VolumeAndToken:
"""
Attributes:
+ volume_id (str): ID of the volume
name (str): Name of the volume
token (str): Auth token to use for interacting with volume content
- volume_id (str): ID of the volume
"""
+ volume_id: str
name: str
token: str
- volume_id: str
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> dict[str, Any]:
+ volume_id = self.volume_id
+
name = self.name
token = self.token
- volume_id = self.volume_id
-
field_dict: dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
+ "volumeID": volume_id,
"name": name,
"token": token,
- "volumeID": volume_id,
}
)
@@ -43,16 +43,16 @@ class VolumeAndToken:
@classmethod
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
d = dict(src_dict)
+ volume_id = d.pop("volumeID")
+
name = d.pop("name")
token = d.pop("token")
- volume_id = d.pop("volumeID")
-
volume_and_token = cls(
+ volume_id=volume_id,
name=name,
token=token,
- volume_id=volume_id,
)
volume_and_token.additional_properties = d
diff --git a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb.py b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb.py
index 5cac7bfa9..fcf8688ac 100644
--- a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb.py
+++ b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb.py
@@ -752,11 +752,16 @@ class FileType(Enum):
```proto
FILE_TYPE_DIRECTORY = 2
```
+ SYMLINK:
+ ```proto
+ FILE_TYPE_SYMLINK = 3
+ ```
"""
UNSPECIFIED = 0
FILE = 1
DIRECTORY = 2
+ SYMLINK = 3
class EventType(Enum):
"""
@@ -800,7 +805,7 @@ class EventType(Enum):
_DESC = file_desc(
- b'\n\x1bfilesystem/filesystem.proto\x12\nfilesystem\x1a\x1fgoogle/protobuf/timestamp.proto"G\n\x0bMoveRequest\x12\x16\n\x06source\x18\x01 \x01(\tR\x06source\x12 \n\x0bdestination\x18\x02 \x01(\tR\x0bdestination";\n\x0cMoveResponse\x12+\n\x05entry\x18\x01 \x01(\x0b2\x15.filesystem.EntryInfoR\x05entry"$\n\x0eMakeDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path">\n\x0fMakeDirResponse\x12+\n\x05entry\x18\x01 \x01(\x0b2\x15.filesystem.EntryInfoR\x05entry"#\n\rRemoveRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path"\x10\n\x0eRemoveResponse"!\n\x0bStatRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path";\n\x0cStatResponse\x12+\n\x05entry\x18\x01 \x01(\x0b2\x15.filesystem.EntryInfoR\x05entry"\xd1\x03\n\tEntryInfo\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12(\n\x04type\x18\x02 \x01(\x0e2\x14.filesystem.FileTypeR\x04type\x12\x12\n\x04path\x18\x03 \x01(\tR\x04path\x12\x12\n\x04size\x18\x04 \x01(\x03R\x04size\x12\x12\n\x04mode\x18\x05 \x01(\rR\x04mode\x12 \n\x0bpermissions\x18\x06 \x01(\tR\x0bpermissions\x12\x14\n\x05owner\x18\x07 \x01(\tR\x05owner\x12\x14\n\x05group\x18\x08 \x01(\tR\x05group\x12?\n\rmodified_time\x18\t \x01(\x0b2\x1a.google.protobuf.TimestampR\x0cmodifiedTime\x12*\n\x0esymlink_target\x18\n \x01(\tH\x00R\rsymlinkTarget\x88\x01\x01\x12?\n\x08metadata\x18\x0b \x03(\x0b2#.filesystem.EntryInfo.MetadataEntryR\x08metadata\x1a;\n\rMetadataEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x11\n\x0f_symlink_target":\n\x0eListDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x14\n\x05depth\x18\x02 \x01(\rR\x05depth"B\n\x0fListDirResponse\x12/\n\x07entries\x18\x01 \x03(\x0b2\x15.filesystem.EntryInfoR\x07entries"\x9a\x01\n\x0fWatchDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x1c\n\trecursive\x18\x02 \x01(\x08R\trecursive\x12#\n\rinclude_entry\x18\x03 \x01(\x08R\x0cincludeEntry\x120\n\x14allow_network_mounts\x18\x04 \x01(\x08R\x12allowNetworkMounts"\x8c\x01\n\x0fFilesystemEvent\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12)\n\x04type\x18\x02 \x01(\x0e2\x15.filesystem.EventTypeR\x04type\x120\n\x05entry\x18\x03 \x01(\x0b2\x15.filesystem.EntryInfoH\x00R\x05entry\x88\x01\x01B\x08\n\x06_entry"\xfe\x01\n\x10WatchDirResponse\x12?\n\x05start\x18\x01 \x01(\x0b2\'.filesystem.WatchDirResponse.StartEventH\x00R\x05start\x12=\n\nfilesystem\x18\x02 \x01(\x0b2\x1b.filesystem.FilesystemEventH\x00R\nfilesystem\x12F\n\tkeepalive\x18\x03 \x01(\x0b2&.filesystem.WatchDirResponse.KeepAliveH\x00R\tkeepalive\x1a\x0c\n\nStartEvent\x1a\x0b\n\tKeepAliveB\x07\n\x05event"\x9f\x01\n\x14CreateWatcherRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x1c\n\trecursive\x18\x02 \x01(\x08R\trecursive\x12#\n\rinclude_entry\x18\x03 \x01(\x08R\x0cincludeEntry\x120\n\x14allow_network_mounts\x18\x04 \x01(\x08R\x12allowNetworkMounts"6\n\x15CreateWatcherResponse\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId"8\n\x17GetWatcherEventsRequest\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId"O\n\x18GetWatcherEventsResponse\x123\n\x06events\x18\x01 \x03(\x0b2\x1b.filesystem.FilesystemEventR\x06events"5\n\x14RemoveWatcherRequest\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId"\x17\n\x15RemoveWatcherResponse*R\n\x08FileType\x12\x19\n\x15FILE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eFILE_TYPE_FILE\x10\x01\x12\x17\n\x13FILE_TYPE_DIRECTORY\x10\x02*\x98\x01\n\tEventType\x12\x1a\n\x16EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11EVENT_TYPE_CREATE\x10\x01\x12\x14\n\x10EVENT_TYPE_WRITE\x10\x02\x12\x15\n\x11EVENT_TYPE_REMOVE\x10\x03\x12\x15\n\x11EVENT_TYPE_RENAME\x10\x04\x12\x14\n\x10EVENT_TYPE_CHMOD\x10\x052\x9f\x05\n\nFilesystem\x129\n\x04Stat\x12\x17.filesystem.StatRequest\x1a\x18.filesystem.StatResponse\x12B\n\x07MakeDir\x12\x1a.filesystem.MakeDirRequest\x1a\x1b.filesystem.MakeDirResponse\x129\n\x04Move\x12\x17.filesystem.MoveRequest\x1a\x18.filesystem.MoveResponse\x12B\n\x07ListDir\x12\x1a.filesystem.ListDirRequest\x1a\x1b.filesystem.ListDirResponse\x12?\n\x06Remove\x12\x19.filesystem.RemoveRequest\x1a\x1a.filesystem.RemoveResponse\x12G\n\x08WatchDir\x12\x1b.filesystem.WatchDirRequest\x1a\x1c.filesystem.WatchDirResponse0\x01\x12T\n\rCreateWatcher\x12 .filesystem.CreateWatcherRequest\x1a!.filesystem.CreateWatcherResponse\x12]\n\x10GetWatcherEvents\x12#.filesystem.GetWatcherEventsRequest\x1a$.filesystem.GetWatcherEventsResponse\x12T\n\rRemoveWatcher\x12 .filesystem.RemoveWatcherRequest\x1a!.filesystem.RemoveWatcherResponseBi\n\x0ecom.filesystemB\x0fFilesystemProtoP\x01\xa2\x02\x03FXX\xaa\x02\nFilesystem\xca\x02\nFilesystem\xe2\x02\x16Filesystem\\GPBMetadata\xea\x02\nFilesystemb\x06proto3',
+ b'\n\x1bfilesystem/filesystem.proto\x12\nfilesystem\x1a\x1fgoogle/protobuf/timestamp.proto"G\n\x0bMoveRequest\x12\x16\n\x06source\x18\x01 \x01(\tR\x06source\x12 \n\x0bdestination\x18\x02 \x01(\tR\x0bdestination";\n\x0cMoveResponse\x12+\n\x05entry\x18\x01 \x01(\x0b2\x15.filesystem.EntryInfoR\x05entry"$\n\x0eMakeDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path">\n\x0fMakeDirResponse\x12+\n\x05entry\x18\x01 \x01(\x0b2\x15.filesystem.EntryInfoR\x05entry"#\n\rRemoveRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path"\x10\n\x0eRemoveResponse"!\n\x0bStatRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path";\n\x0cStatResponse\x12+\n\x05entry\x18\x01 \x01(\x0b2\x15.filesystem.EntryInfoR\x05entry"\xd1\x03\n\tEntryInfo\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12(\n\x04type\x18\x02 \x01(\x0e2\x14.filesystem.FileTypeR\x04type\x12\x12\n\x04path\x18\x03 \x01(\tR\x04path\x12\x12\n\x04size\x18\x04 \x01(\x03R\x04size\x12\x12\n\x04mode\x18\x05 \x01(\rR\x04mode\x12 \n\x0bpermissions\x18\x06 \x01(\tR\x0bpermissions\x12\x14\n\x05owner\x18\x07 \x01(\tR\x05owner\x12\x14\n\x05group\x18\x08 \x01(\tR\x05group\x12?\n\rmodified_time\x18\t \x01(\x0b2\x1a.google.protobuf.TimestampR\x0cmodifiedTime\x12*\n\x0esymlink_target\x18\n \x01(\tH\x00R\rsymlinkTarget\x88\x01\x01\x12?\n\x08metadata\x18\x0b \x03(\x0b2#.filesystem.EntryInfo.MetadataEntryR\x08metadata\x1a;\n\rMetadataEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x11\n\x0f_symlink_target":\n\x0eListDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x14\n\x05depth\x18\x02 \x01(\rR\x05depth"B\n\x0fListDirResponse\x12/\n\x07entries\x18\x01 \x03(\x0b2\x15.filesystem.EntryInfoR\x07entries"\x9a\x01\n\x0fWatchDirRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x1c\n\trecursive\x18\x02 \x01(\x08R\trecursive\x12#\n\rinclude_entry\x18\x03 \x01(\x08R\x0cincludeEntry\x120\n\x14allow_network_mounts\x18\x04 \x01(\x08R\x12allowNetworkMounts"\x8c\x01\n\x0fFilesystemEvent\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12)\n\x04type\x18\x02 \x01(\x0e2\x15.filesystem.EventTypeR\x04type\x120\n\x05entry\x18\x03 \x01(\x0b2\x15.filesystem.EntryInfoH\x00R\x05entry\x88\x01\x01B\x08\n\x06_entry"\xfe\x01\n\x10WatchDirResponse\x12?\n\x05start\x18\x01 \x01(\x0b2\'.filesystem.WatchDirResponse.StartEventH\x00R\x05start\x12=\n\nfilesystem\x18\x02 \x01(\x0b2\x1b.filesystem.FilesystemEventH\x00R\nfilesystem\x12F\n\tkeepalive\x18\x03 \x01(\x0b2&.filesystem.WatchDirResponse.KeepAliveH\x00R\tkeepalive\x1a\x0c\n\nStartEvent\x1a\x0b\n\tKeepAliveB\x07\n\x05event"\x9f\x01\n\x14CreateWatcherRequest\x12\x12\n\x04path\x18\x01 \x01(\tR\x04path\x12\x1c\n\trecursive\x18\x02 \x01(\x08R\trecursive\x12#\n\rinclude_entry\x18\x03 \x01(\x08R\x0cincludeEntry\x120\n\x14allow_network_mounts\x18\x04 \x01(\x08R\x12allowNetworkMounts"6\n\x15CreateWatcherResponse\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId"8\n\x17GetWatcherEventsRequest\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId"O\n\x18GetWatcherEventsResponse\x123\n\x06events\x18\x01 \x03(\x0b2\x1b.filesystem.FilesystemEventR\x06events"5\n\x14RemoveWatcherRequest\x12\x1d\n\nwatcher_id\x18\x01 \x01(\tR\twatcherId"\x17\n\x15RemoveWatcherResponse*i\n\x08FileType\x12\x19\n\x15FILE_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eFILE_TYPE_FILE\x10\x01\x12\x17\n\x13FILE_TYPE_DIRECTORY\x10\x02\x12\x15\n\x11FILE_TYPE_SYMLINK\x10\x03*\x98\x01\n\tEventType\x12\x1a\n\x16EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11EVENT_TYPE_CREATE\x10\x01\x12\x14\n\x10EVENT_TYPE_WRITE\x10\x02\x12\x15\n\x11EVENT_TYPE_REMOVE\x10\x03\x12\x15\n\x11EVENT_TYPE_RENAME\x10\x04\x12\x14\n\x10EVENT_TYPE_CHMOD\x10\x052\x9f\x05\n\nFilesystem\x129\n\x04Stat\x12\x17.filesystem.StatRequest\x1a\x18.filesystem.StatResponse\x12B\n\x07MakeDir\x12\x1a.filesystem.MakeDirRequest\x1a\x1b.filesystem.MakeDirResponse\x129\n\x04Move\x12\x17.filesystem.MoveRequest\x1a\x18.filesystem.MoveResponse\x12B\n\x07ListDir\x12\x1a.filesystem.ListDirRequest\x1a\x1b.filesystem.ListDirResponse\x12?\n\x06Remove\x12\x19.filesystem.RemoveRequest\x1a\x1a.filesystem.RemoveResponse\x12G\n\x08WatchDir\x12\x1b.filesystem.WatchDirRequest\x1a\x1c.filesystem.WatchDirResponse0\x01\x12T\n\rCreateWatcher\x12 .filesystem.CreateWatcherRequest\x1a!.filesystem.CreateWatcherResponse\x12]\n\x10GetWatcherEvents\x12#.filesystem.GetWatcherEventsRequest\x1a$.filesystem.GetWatcherEventsResponse\x12T\n\rRemoveWatcher\x12 .filesystem.RemoveWatcherRequest\x1a!.filesystem.RemoveWatcherResponseBi\n\x0ecom.filesystemB\x0fFilesystemProtoP\x01\xa2\x02\x03FXX\xaa\x02\nFilesystem\xca\x02\nFilesystem\xe2\x02\x16Filesystem\\GPBMetadata\xea\x02\nFilesystemb\x06proto3',
[
timestamp_pb.desc(),
],
diff --git a/packages/python-sdk/e2b/envd/process/process_pb.py b/packages/python-sdk/e2b/envd/process/process_pb.py
index bcc0ba0d5..588ac83a0 100644
--- a/packages/python-sdk/e2b/envd/process/process_pb.py
+++ b/packages/python-sdk/e2b/envd/process/process_pb.py
@@ -231,6 +231,9 @@ class StartRequest(Message[_StartRequestFields]):
optional string tag = 3;
```
stdin:
+ This is optional for backwards compatibility.
+ We default to true. New SDK versions will set this to false by default.
+
```proto
optional bool stdin = 4;
```
diff --git a/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py b/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py
index 7cf284439..d80c29624 100644
--- a/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py
+++ b/packages/python-sdk/e2b/sandbox/filesystem/filesystem.py
@@ -28,6 +28,10 @@ class FileType(Enum):
"""
Filesystem object is a directory.
"""
+ SYMLINK = "symlink"
+ """
+ Filesystem object is a symlink.
+ """
def map_file_type(ft: filesystem_pb.FileType):
@@ -35,6 +39,8 @@ def map_file_type(ft: filesystem_pb.FileType):
return FileType.FILE
elif ft == filesystem_pb.FileType.DIRECTORY:
return FileType.DIR
+ elif ft == filesystem_pb.FileType.SYMLINK:
+ return FileType.SYMLINK
def map_file_type_str(value: Optional[str]) -> Optional[FileType]:
diff --git a/packages/python-sdk/e2b/sandbox_async/sandbox_api.py b/packages/python-sdk/e2b/sandbox_async/sandbox_api.py
index 31ffe2e15..9df7a5a95 100644
--- a/packages/python-sdk/e2b/sandbox_async/sandbox_api.py
+++ b/packages/python-sdk/e2b/sandbox_async/sandbox_api.py
@@ -27,8 +27,8 @@ from e2b.api.client.models import (
ConnectSandbox,
Error,
NewSandbox,
- PostSandboxesSandboxIDSnapshotsBody,
- PostSandboxesSandboxIDTimeoutBody,
+ SandboxSnapshotRequest,
+ SandboxTimeoutRequest,
SandboxAutoResumeConfig,
SandboxForkRequest,
SandboxNetworkConfig,
@@ -165,7 +165,7 @@ class SandboxApi(SandboxBase):
res = await post_sandboxes_sandbox_id_timeout.asyncio_detailed(
sandbox_id,
client=api_client,
- body=PostSandboxesSandboxIDTimeoutBody(timeout=timeout),
+ body=SandboxTimeoutRequest(timeout=timeout),
)
if res.status_code == 404:
@@ -383,7 +383,7 @@ class SandboxApi(SandboxBase):
res = await post_sandboxes_sandbox_id_snapshots.asyncio_detailed(
sandbox_id,
client=api_client,
- body=PostSandboxesSandboxIDSnapshotsBody(name=name if name else UNSET),
+ body=SandboxSnapshotRequest(name=name if name else UNSET),
)
if res.status_code == 404:
diff --git a/packages/python-sdk/e2b/sandbox_sync/sandbox_api.py b/packages/python-sdk/e2b/sandbox_sync/sandbox_api.py
index c66b04183..c7bf34e82 100644
--- a/packages/python-sdk/e2b/sandbox_sync/sandbox_api.py
+++ b/packages/python-sdk/e2b/sandbox_sync/sandbox_api.py
@@ -27,8 +27,8 @@ from e2b.api.client.models import (
ConnectSandbox,
Error,
NewSandbox,
- PostSandboxesSandboxIDSnapshotsBody,
- PostSandboxesSandboxIDTimeoutBody,
+ SandboxSnapshotRequest,
+ SandboxTimeoutRequest,
SandboxAutoResumeConfig,
SandboxForkRequest,
SandboxNetworkConfig,
@@ -164,7 +164,7 @@ class SandboxApi(SandboxBase):
res = post_sandboxes_sandbox_id_timeout.sync_detailed(
sandbox_id,
client=api_client,
- body=PostSandboxesSandboxIDTimeoutBody(timeout=timeout),
+ body=SandboxTimeoutRequest(timeout=timeout),
)
if res.status_code == 404:
@@ -510,7 +510,7 @@ class SandboxApi(SandboxBase):
res = post_sandboxes_sandbox_id_snapshots.sync_detailed(
sandbox_id,
client=api_client,
- body=PostSandboxesSandboxIDSnapshotsBody(name=name if name else UNSET),
+ body=SandboxSnapshotRequest(name=name if name else UNSET),
)
if res.status_code == 404:
diff --git a/packages/python-sdk/pyproject.toml b/packages/python-sdk/pyproject.toml
index 6b15c608a..73d433563 100644
--- a/packages/python-sdk/pyproject.toml
+++ b/packages/python-sdk/pyproject.toml
@@ -39,11 +39,12 @@ dev = [
]
# Tools for local code generation (`make init` && `uv run make generate-*`).
-# Pins mirror codegen.Dockerfile so local output matches CI. `generate-envd`
-# additionally needs `buf` on the PATH.
+# Pins mirror codegen.Dockerfile so local output matches CI. `generate-api`
+# additionally needs @redocly/cli on the PATH (pinned as a js-sdk
+# devDependency and in codegen.Dockerfile — keep the versions in sync) and
+# `generate-envd` needs `buf`.
codegen = [
"black==26.3.1",
- "pyyaml==6.0.2",
"e2b-openapi-python-client==0.26.2",
"datamodel-code-generator==0.34.0",
"protoc-gen-connectrpc==0.11.1",
diff --git a/packages/python-sdk/tests/test_filesystem_models.py b/packages/python-sdk/tests/test_filesystem_models.py
index dd665bca5..ad1d1dcb5 100644
--- a/packages/python-sdk/tests/test_filesystem_models.py
+++ b/packages/python-sdk/tests/test_filesystem_models.py
@@ -41,6 +41,45 @@ def test_map_file_type_str():
assert map_file_type_str(None) is None
+def test_map_entry_info_maps_every_known_file_type():
+ def entry(file_type: filesystem_pb.FileType) -> filesystem_pb.EntryInfo:
+ return filesystem_pb.EntryInfo(
+ name="entry",
+ type=file_type,
+ path="/home/user/entry",
+ size=0,
+ mode=0o644,
+ permissions="-rw-r--r--",
+ owner="user",
+ group="user",
+ )
+
+ assert map_entry_info(entry(filesystem_pb.FileType.FILE)).type is FileType.FILE
+ assert map_entry_info(entry(filesystem_pb.FileType.DIRECTORY)).type is FileType.DIR
+ assert (
+ map_entry_info(entry(filesystem_pb.FileType.SYMLINK)).type is FileType.SYMLINK
+ )
+
+
+def test_map_entry_info_keeps_symlink_target_on_symlink_entries():
+ entry = filesystem_pb.EntryInfo(
+ name="link",
+ type=filesystem_pb.FileType.SYMLINK,
+ path="/home/user/link",
+ size=0,
+ mode=0o777,
+ permissions="lrwxrwxrwx",
+ owner="user",
+ group="user",
+ )
+ entry.symlink_target = "/home/user/a.txt"
+
+ info = map_entry_info(entry)
+
+ assert info.type is FileType.SYMLINK
+ assert info.symlink_target == "/home/user/a.txt"
+
+
def test_map_entry_info_modified_time_is_timezone_aware():
entry = filesystem_pb.EntryInfo(
name="a.txt",
diff --git a/packages/python-sdk/uv.lock b/packages/python-sdk/uv.lock
index 6ae1c30b7..2118b9e0f 100644
--- a/packages/python-sdk/uv.lock
+++ b/packages/python-sdk/uv.lock
@@ -204,7 +204,6 @@ codegen = [
{ name = "e2b-openapi-python-client" },
{ name = "protoc-gen-connectrpc" },
{ name = "protoc-gen-py" },
- { name = "pyyaml" },
]
dev = [
{ name = "pytest" },
@@ -240,7 +239,6 @@ codegen = [
{ name = "e2b-openapi-python-client", specifier = "==0.26.2" },
{ name = "protoc-gen-connectrpc", specifier = "==0.11.1" },
{ name = "protoc-gen-py", specifier = "==0.1.1" },
- { name = "pyyaml", specifier = "==6.0.2" },
]
dev = [
{ name = "pytest", specifier = ">=9.0.3,<10" },
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 7dd335ea8..2b34cf7ac 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -174,6 +174,9 @@ importers:
'@cloudflare/vitest-pool-workers':
specifier: ^0.18.7
+ '@redocly/cli':
+ specifier: 2.39.0
+ version: 2.39.0
'@testing-library/react':
specifier: ^16.2.0
@@ -249,12 +252,6 @@ importers:
packages/python-sdk: {}
- spec:
- devDependencies:
- prettier:
- specifier: ^3.3.3
- version: 3.6.2
-
packages:
'@apidevtools/[email protected]':
@@ -1323,6 +1320,11 @@ packages:
'@redocly/[email protected]':
resolution: {integrity: sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==}
+ '@redocly/[email protected]':
+ resolution: {integrity: sha512-xA0Z9YMEhlzbpn/BVErlE2UzuKfahp9llBwEnVtAYuhWdF8UCIm+cgYX8f/gHQIJ/TKwB93awAewTOgEsbZFZw==}
+ engines: {node: '>=22.12.0 || >=20.19.0 <21.0.0', npm: '>=10'}
+ hasBin: true
+
'@redocly/[email protected]':
resolution: {integrity: sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==}
@@ -4925,6 +4927,8 @@ snapshots:
require-from-string: 2.0.2
uri-js-replace: 1.0.1
+ '@redocly/[email protected]': {}
+
'@redocly/[email protected]': {}
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 17bd158ba..924b55f42 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -1,3 +1,2 @@
packages:
- packages/*
- - spec
diff --git a/redocly.yaml b/redocly.yaml
new file mode 100644
index 000000000..d2602e140
--- /dev/null
+++ b/redocly.yaml
@@ -0,0 +1,35 @@
+# Filters the synced REST API spec (spec/openapi.yml) down to the endpoint
+# tags each SDK exposes; everything else (admin, access-tokens, api-keys,
+# untagged endpoints like /health) is dropped. The SDK generate pipelines run
+# `redocly bundle <api> -o spec/openapi_generated.<api>.yml` before invoking
+# their client generators. The js-sdk list additionally keeps `auth` because
+# the CLI reaches /teams through the js-sdk's generated schema.
+#
+# filter-out drops any node (operation or component schema) the upstream
+# specs mark `x-not-implemented: true`. It has no applyTo on purpose: the
+# flag must work on schemas as well as operations. A kept operation that
+# still references a dropped schema loses that media-type entry rather
+# than keeping a dangling $ref.
+apis:
+ js-sdk:
+ root: spec/openapi.yml
+ decorators:
+ filter-in:
+ property: tags
+ value: [sandboxes, snapshots, templates, tags, auth, volumes]
+ matchStrategy: any
+ applyTo: Operation
+ filter-out:
+ property: x-not-implemented
+ value: [true]
+ python-sdk:
+ root: spec/openapi.yml
+ decorators:
+ filter-in:
+ property: tags
+ value: [sandboxes, snapshots, templates, tags, volumes]
+ matchStrategy: any
+ applyTo: Operation
+ filter-out:
+ property: x-not-implemented
+ value: [true]
diff --git a/scripts/fetch-spec.sh b/scripts/fetch-spec.sh
new file mode 100755
index 000000000..1f6ab97fc
--- /dev/null
+++ b/scripts/fetch-spec.sh
@@ -0,0 +1,61 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+# Fetches API specs from their source-of-truth repositories with Copybara.
+#
+# Usage: scripts/fetch-spec.sh <api-spec|envd-spec|volume-api-spec>
+#
+# api-spec and envd-spec come from e2b-dev/infra at the commit pinned in
+# spec/infra-ref. Override it with E2B_INFRA_REF, e.g.
+# `E2B_INFRA_REF=main pnpm fetch:api-spec` to try the latest spec without
+# touching the pin. volume-api-spec comes from e2b-dev/belt at the commit
+# pinned in spec/belt-ref (override with E2B_BELT_REF).
+#
+# Fetches authenticate with GITHUB_TOKEN (or `gh auth login`) when available;
+# the public infra specs also fetch anonymously. volume-api-spec needs a
+# token with read access to the private belt repo — `make fetch-specs` falls
+# back to the tracked copy in spec/ with a warning when a fetch fails.
+#
+# This script only resolves the pin and auth and runs Copybara; which spec/
+# paths each workflow owns (and therefore replaces) is declared by the
+# destination_files globs in copy.bara.sky.
+
+SPEC="${1:?usage: fetch-spec.sh <api-spec|envd-spec|volume-api-spec>}"
+ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+
+TOKEN="${GITHUB_TOKEN:-$(gh auth token 2> /dev/null || true)}"
+
+case "$SPEC" in
+ api-spec | envd-spec)
+ SOURCE="e2b-dev/infra"
+ REF="${E2B_INFRA_REF:-$(tr -d '[:space:]' < "$ROOT_DIR/spec/infra-ref")}"
+ ;;
+ volume-api-spec)
+ SOURCE="e2b-dev/belt"
+ REF="${E2B_BELT_REF:-$(tr -d '[:space:]' < "$ROOT_DIR/spec/belt-ref")}"
+ ;;
+ *)
+ echo "error: unknown spec '$SPEC'" >&2
+ exit 1
+ ;;
+esac
+
+echo "Fetching $SPEC from $SOURCE@$REF"
+
+# Set COPYBARA_IMAGE to skip the image build and use a prebuilt image instead
+# (CI builds it separately with a warm buildkit cache).
+if [ -z "${COPYBARA_IMAGE:-}" ]; then
+ docker build -q -t e2b-copybara - < "$ROOT_DIR/copybara.Dockerfile"
+ COPYBARA_IMAGE=e2b-copybara
+fi
+
+docker run --rm \
+ --user "$(id -u):$(id -g)" \
+ -e HOME=/tmp \
+ -e GH_TOKEN="$TOKEN" \
+ -v "$ROOT_DIR:/workspace" \
+ "$COPYBARA_IMAGE" \
+ migrate /workspace/copy.bara.sky "$SPEC" "$REF" \
+ --folder-dir /workspace/spec
+
+echo "Updated spec/ from $SPEC ($SOURCE@$REF)"
diff --git a/spec/README.md b/spec/README.md
new file mode 100644
index 000000000..85b8e6bb0
--- /dev/null
+++ b/spec/README.md
@@ -0,0 +1,37 @@
+# API specs
+
+Most files in this directory are owned by other repositories and are synced
+here with [Copybara](https://github.com/google/copybara) (config in
+`../copy.bara.sky`) — **don't edit them by hand**; change them in their
+source repository and re-sync:
+
+- `openapi.yml`, `envd/envd.yaml`, `envd/filesystem/`, `envd/process/` are
+ owned by the [infra repository](https://github.com/e2b-dev/infra), pinned
+ by `infra-ref`.
+- `openapi-volumecontent.yml` is owned by the private belt repository,
+ pinned by `belt-ref`.
+
+Fetches authenticate with a GitHub token when available (`GITHUB_TOKEN`, or
+being logged in with `gh auth login`); the public infra specs also fetch
+anonymously, while the volume-content spec needs a token with read access
+to belt. When a fetch fails, `make codegen` warns and falls back to the
+tracked copy.
+
+`make codegen` re-fetches all of them at their pinned commits before
+generating the clients, and the generated-files CI check fails if the
+tracked copies don't match the pins. The files are stored byte-identical to
+upstream. To update the specs, point the pin at a newer commit and re-run
+`make codegen`. To fetch without regenerating:
+
+```sh
+pnpm fetch:api-spec # openapi.yml
+pnpm fetch:envd-spec # envd spec
+pnpm fetch:volume-spec # openapi-volumecontent.yml
+E2B_INFRA_REF=main pnpm fetch:api-spec # try the latest without moving the pin
+E2B_BELT_REF=main pnpm fetch:volume-spec
+```
+
+The remaining files (`mcp-server.json`, `envd/buf-*.gen.yaml`) are owned by
+this repository. The SDK generate pipelines filter `openapi.yml` down to the
+tags each SDK exposes with Redocly CLI (see `../redocly.yaml`) before
+generating the clients.
diff --git a/spec/belt-ref b/spec/belt-ref
new file mode 100644
index 000000000..887af6647
--- /dev/null
+++ b/spec/belt-ref
@@ -0,0 +1 @@
+13ca196c19eb2acbec6b2696ce2ff98fec1ceaf8
diff --git a/spec/envd/envd.yaml b/spec/envd/envd.yaml
index 6b776a726..9abd91082 100644
--- a/spec/envd/envd.yaml
+++ b/spec/envd/envd.yaml
@@ -12,22 +12,22 @@ paths:
get:
summary: Check the health of the service
responses:
- '204':
+ "204":
description: The service is healthy
/metrics:
get:
- summary: Get the stats of the service
+ summary: Service stats
security:
- AccessTokenAuth: []
- {}
responses:
- '200':
+ "200":
description: The resource usage metrics of the service
content:
application/json:
schema:
- $ref: '#/components/schemas/Metrics'
+ $ref: "#/components/schemas/Metrics"
/init:
post:
@@ -41,14 +41,22 @@ paths:
schema:
type: object
properties:
+ volumeMounts:
+ type: array
+ items:
+ $ref: "#/components/schemas/VolumeMount"
hyperloopIP:
type: string
description: IP address of the hyperloop server to connect to
+ lifecycleID:
+ type: string
+ description: Lifecycle ID of the sandbox
envVars:
- $ref: '#/components/schemas/EnvVars'
+ $ref: "#/components/schemas/EnvVars"
accessToken:
type: string
description: Access token for secure access to envd service
+ x-go-type: SecureToken
timestamp:
type: string
format: date-time
@@ -59,23 +67,99 @@ paths:
defaultWorkdir:
type: string
description: The default working directory to use for operations
+ caBundle:
+ type: string
+ description: PEM-encoded CA certificates to install into the system trust store (may contain multiple concatenated PEM blocks)
+
responses:
- '204':
+ "204":
description: Env vars set, the time and metadata is synced with the host
+ /freeze:
+ post:
+ summary: Freeze user/pty cgroups before pause. Written directly by envd to avoid Process.Start / shell overhead under load.
+ security:
+ - AccessTokenAuth: []
+ - {}
+ responses:
+ "204":
+ description: Cgroups frozen
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ "503":
+ description: Freeze lock is held by another operation
+
+ /unfreeze:
+ post:
+ summary: Unfreeze user/pty cgroups. Intended ONLY for the orchestrator's pause-failure rollback path; the normal resume thaw happens via /init's deferred unfreeze, not here.
+ security:
+ - AccessTokenAuth: []
+ - {}
+ responses:
+ "204":
+ description: Cgroups unfrozen
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ "503":
+ description: Freeze lock is held by another operation
+
+ /collapse:
+ post:
+ summary: Collapse envd's own anonymous heap into 2 MiB transparent hugepages before pause, so on resume envd touches fewer distinct guest-physical frames (each a cold fault). Best-effort.
+ security:
+ - AccessTokenAuth: []
+ - {}
+ responses:
+ "200":
+ description: Heap collapsed
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CollapseResult"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+
+ /fsfreeze:
+ post:
+ summary: Freeze the guest rootfs (FIFREEZE) before a filesystem-only pause so it is flushed to a consistent on-disk state, closing the sync->pause race. Idempotent. On a successful filesystem-only pause the VM is rebooted, so no thaw is needed; the orchestrator thaws only on the pause-failure path.
+ security:
+ - AccessTokenAuth: []
+ - {}
+ responses:
+ "204":
+ description: Rootfs frozen
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ "503":
+ description: Freeze lock is held by another operation
+
+ /fsthaw:
+ post:
+ summary: Thaw the guest rootfs (FITHAW). Intended ONLY for the orchestrator's pause-failure rollback path, so a frozen filesystem cannot leave the live VM deadlocked. Idempotent.
+ security:
+ - AccessTokenAuth: []
+ - {}
+ responses:
+ "204":
+ description: Rootfs thawed
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ "503":
+ description: Freeze lock is held by another operation
+
/envs:
get:
- summary: Get the environment variables
+ summary: Environment variables
security:
- AccessTokenAuth: []
- {}
responses:
- '200':
+ "200":
description: Environment variables
content:
application/json:
schema:
- $ref: '#/components/schemas/EnvVars'
+ $ref: "#/components/schemas/EnvVars"
/files:
get:
@@ -85,21 +169,23 @@ paths:
- AccessTokenAuth: []
- {}
parameters:
- - $ref: '#/components/parameters/FilePath'
- - $ref: '#/components/parameters/User'
- - $ref: '#/components/parameters/Signature'
- - $ref: '#/components/parameters/SignatureExpiration'
+ - $ref: "#/components/parameters/FilePath"
+ - $ref: "#/components/parameters/User"
+ - $ref: "#/components/parameters/Signature"
+ - $ref: "#/components/parameters/SignatureExpiration"
responses:
- '200':
- $ref: '#/components/responses/DownloadSuccess'
- '401':
- $ref: '#/components/responses/InvalidUser'
- '400':
- $ref: '#/components/responses/InvalidPath'
- '404':
- $ref: '#/components/responses/FileNotFound'
- '500':
- $ref: '#/components/responses/InternalServerError'
+ "200":
+ $ref: "#/components/responses/DownloadSuccess"
+ "400":
+ $ref: "#/components/responses/InvalidPath"
+ "401":
+ $ref: "#/components/responses/InvalidUser"
+ "404":
+ $ref: "#/components/responses/FileNotFound"
+ "406":
+ $ref: "#/components/responses/NotAcceptable"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
post:
summary: Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.
description: |
@@ -128,29 +214,60 @@ paths:
- AccessTokenAuth: []
- {}
parameters:
- - $ref: '#/components/parameters/FilePath'
- - $ref: '#/components/parameters/User'
- - $ref: '#/components/parameters/Signature'
- - $ref: '#/components/parameters/SignatureExpiration'
+ - $ref: "#/components/parameters/FilePath"
+ - $ref: "#/components/parameters/User"
+ - $ref: "#/components/parameters/Signature"
+ - $ref: "#/components/parameters/SignatureExpiration"
requestBody:
- $ref: '#/components/requestBodies/File'
+ $ref: "#/components/requestBodies/File"
responses:
- '200':
- $ref: '#/components/responses/UploadSuccess'
- '400':
- $ref: '#/components/responses/InvalidPath'
- '401':
- $ref: '#/components/responses/InvalidUser'
- '500':
- $ref: '#/components/responses/InternalServerError'
- '507':
- $ref: '#/components/responses/NotEnoughDiskSpace'
+ "200":
+ $ref: "#/components/responses/UploadSuccess"
+ "400":
+ $ref: "#/components/responses/InvalidPath"
+ "401":
+ $ref: "#/components/responses/InvalidUser"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ "507":
+ $ref: "#/components/responses/NotEnoughDiskSpace"
+
+ /files/compose:
+ post:
+ summary: Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition.
+ tags: [files]
+ security:
+ - AccessTokenAuth: []
+ - {}
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ComposeRequest"
+ responses:
+ "200":
+ description: Files composed successfully
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/EntryInfo"
+ "400":
+ $ref: "#/components/responses/InvalidPath"
+ "401":
+ $ref: "#/components/responses/InvalidUser"
+ "404":
+ $ref: "#/components/responses/FileNotFound"
+ "500":
+ $ref: "#/components/responses/InternalServerError"
+ "507":
+ $ref: "#/components/responses/NotEnoughDiskSpace"
components:
securitySchemes:
AccessTokenAuth:
type: apiKey
- scheme: header
+ in: header
name: X-Access-Token
parameters:
@@ -158,14 +275,14 @@ components:
name: path
in: query
required: false
- description: Path to the file, URL encoded. Can be relative to user's home directory.
+ description: Path to the file, URL encoded. Can be relative to the user's home directory (e.g. "file.txt" resolves to ~/file.txt).
schema:
type: string
User:
name: username
in: query
required: false
- description: User used for setting the owner, or resolving relative paths.
+ description: User for setting file ownership and resolving relative paths. Defaults to the sandbox's default user.
schema:
type: string
Signature:
@@ -179,10 +296,9 @@ components:
name: signature_expiration
in: query
required: false
- description: Signature expiration used for defining the expiration time of the signature.
+ description: Unix timestamp (seconds) after which the signature expires. Only used with the signature parameter.
schema:
type: integer
-
requestBodies:
File:
required: true
@@ -194,6 +310,11 @@ components:
file:
type: string
format: binary
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ description: Raw file content. The 'path' query parameter is required when using this content type.
responses:
UploadSuccess:
@@ -203,7 +324,11 @@ components:
schema:
type: array
items:
- $ref: '#/components/schemas/EntryInfo'
+ $ref: "#/components/schemas/EntryInfo"
+ example:
+ - path: "/home/user/hello.txt"
+ name: "hello.txt"
+ type: "file"
DownloadSuccess:
description: Entire file downloaded successfully.
@@ -212,37 +337,61 @@ components:
schema:
type: string
format: binary
- description: The file content
+ description: The raw file content
+ NotAcceptable:
+ description: Requested encoding is not supported
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ example:
+ message: "no acceptable encoding found, supported: [identity, gzip]"
+ code: 406
InvalidPath:
description: Invalid path
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
+ example:
+ message: "path '/home/user/docs' is a directory"
+ code: 400
InternalServerError:
description: Internal server error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
+ example:
+ message: "error opening file '/home/user/file.txt': permission denied"
+ code: 500
FileNotFound:
description: File not found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
+ example:
+ message: "path '/home/user/missing.txt' does not exist"
+ code: 404
InvalidUser:
description: Invalid user
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
+ example:
+ message: "error looking up user 'nonexistent': user: unknown user nonexistent"
+ code: 401
NotEnoughDiskSpace:
description: Not enough disk space
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
+ example:
+ message: "not enough disk space available"
+ code: 507
schemas:
Error:
@@ -304,9 +453,72 @@ components:
mem_used:
type: integer
description: Used virtual memory in bytes
+ mem_cache:
+ type: integer
+ description: Cached memory (page cache) in bytes
+ mem_total_mib:
+ type: integer
+ description: Total virtual memory in MiB
+ mem_used_mib:
+ type: integer
+ description: Used virtual memory in MiB
disk_used:
type: integer
description: Used disk space in bytes
disk_total:
type: integer
description: Total disk space in bytes
+ CollapseResult:
+ type: object
+ description: Per-call statistics from a heap collapse
+ properties:
+ regions:
+ type: integer
+ description: Anonymous read-write regions scanned
+ chunks:
+ type: integer
+ description: 2 MiB chunks attempted
+ collapsed:
+ type: integer
+ description: Chunks whose base pages were actually migrated into a new hugepage (real work)
+ alreadyHuge:
+ type: integer
+ description: Chunks MADV_COLLAPSE accepted but were already hugepages (no work)
+ skipped:
+ type: integer
+ description: Chunks that could not be collapsed (empty or ineligible)
+ elapsedMs:
+ type: integer
+ format: int64
+ description: Wall-clock time spent collapsing, in milliseconds
+ ComposeRequest:
+ type: object
+ required:
+ - source_paths
+ - destination
+ properties:
+ source_paths:
+ type: array
+ items:
+ type: string
+ description: Ordered list of source file paths to concatenate
+ destination:
+ type: string
+ description: Destination file path for the composed file
+ username:
+ type: string
+ description: User for setting ownership and resolving relative paths
+ VolumeMount:
+ type: object
+ description: Volume mount configuration
+ additionalProperties: false
+ properties:
+ nfs_target:
+ type: string
+ description: Server target address
+ path:
+ type: string
+ description: Mount path inside the sandbox
+ required:
+ - nfs_target
+ - path
diff --git a/spec/envd/filesystem/filesystem.proto b/spec/envd/filesystem/filesystem.proto
index e97b687da..7c4c43174 100644
--- a/spec/envd/filesystem/filesystem.proto
+++ b/spec/envd/filesystem/filesystem.proto
@@ -5,148 +5,149 @@ package filesystem;
import "google/protobuf/timestamp.proto";
service Filesystem {
- rpc Stat(StatRequest) returns (StatResponse);
- rpc MakeDir(MakeDirRequest) returns (MakeDirResponse);
- rpc Move(MoveRequest) returns (MoveResponse);
- rpc ListDir(ListDirRequest) returns (ListDirResponse);
- rpc Remove(RemoveRequest) returns (RemoveResponse);
+ rpc Stat(StatRequest) returns (StatResponse);
+ rpc MakeDir(MakeDirRequest) returns (MakeDirResponse);
+ rpc Move(MoveRequest) returns (MoveResponse);
+ rpc ListDir(ListDirRequest) returns (ListDirResponse);
+ rpc Remove(RemoveRequest) returns (RemoveResponse);
- rpc WatchDir(WatchDirRequest) returns (stream WatchDirResponse);
+ rpc WatchDir(WatchDirRequest) returns (stream WatchDirResponse);
- // Non-streaming versions of WatchDir
- rpc CreateWatcher(CreateWatcherRequest) returns (CreateWatcherResponse);
- rpc GetWatcherEvents(GetWatcherEventsRequest) returns (GetWatcherEventsResponse);
- rpc RemoveWatcher(RemoveWatcherRequest) returns (RemoveWatcherResponse);
+ // Non-streaming versions of WatchDir
+ rpc CreateWatcher(CreateWatcherRequest) returns (CreateWatcherResponse);
+ rpc GetWatcherEvents(GetWatcherEventsRequest) returns (GetWatcherEventsResponse);
+ rpc RemoveWatcher(RemoveWatcherRequest) returns (RemoveWatcherResponse);
}
message MoveRequest {
- string source = 1;
- string destination = 2;
+ string source = 1;
+ string destination = 2;
}
message MoveResponse {
- EntryInfo entry = 1;
+ EntryInfo entry = 1;
}
message MakeDirRequest {
- string path = 1;
+ string path = 1;
}
message MakeDirResponse {
- EntryInfo entry = 1;
+ EntryInfo entry = 1;
}
message RemoveRequest {
- string path = 1;
+ string path = 1;
}
message RemoveResponse {}
message StatRequest {
- string path = 1;
+ string path = 1;
}
message StatResponse {
- EntryInfo entry = 1;
+ EntryInfo entry = 1;
}
message EntryInfo {
- string name = 1;
- FileType type = 2;
- string path = 3;
- int64 size = 4;
- uint32 mode = 5;
- string permissions = 6;
- string owner = 7;
- string group = 8;
- google.protobuf.Timestamp modified_time = 9;
- // If the entry is a symlink, this field contains the target of the symlink.
- optional string symlink_target = 10;
- // User-defined metadata stored as extended attributes (xattrs) on the file.
- // Keys live under the `user.e2b.` xattr namespace; the prefix is stripped here.
- // Plain `user.*` xattrs written by other tooling are not reflected.
- map<string, string> metadata = 11;
+ string name = 1;
+ FileType type = 2;
+ string path = 3;
+ int64 size = 4;
+ uint32 mode = 5;
+ string permissions = 6;
+ string owner = 7;
+ string group = 8;
+ google.protobuf.Timestamp modified_time = 9;
+ // If the entry is a symlink, this field contains the target of the symlink.
+ optional string symlink_target = 10;
+ // User-defined metadata stored as extended attributes (xattrs) on the file.
+ // Keys live under the `user.e2b.` xattr namespace; the prefix is stripped here.
+ // Plain `user.*` xattrs written by other tooling are not reflected.
+ map<string, string> metadata = 11;
}
enum FileType {
- FILE_TYPE_UNSPECIFIED = 0;
- FILE_TYPE_FILE = 1;
- FILE_TYPE_DIRECTORY = 2;
+ FILE_TYPE_UNSPECIFIED = 0;
+ FILE_TYPE_FILE = 1;
+ FILE_TYPE_DIRECTORY = 2;
+ FILE_TYPE_SYMLINK = 3;
}
message ListDirRequest {
- string path = 1;
- uint32 depth = 2;
+ string path = 1;
+ uint32 depth = 2;
}
message ListDirResponse {
- repeated EntryInfo entries = 1;
+ repeated EntryInfo entries = 1;
}
message WatchDirRequest {
- string path = 1;
- bool recursive = 2;
- // If true, each FilesystemEvent includes the EntryInfo of the affected entry, when available.
- bool include_entry = 3;
- // If true, allows watching paths on network filesystem mounts (NFS, CIFS, SMB, FUSE).
- // Events on network mounts may be unreliable or not delivered at all.
- bool allow_network_mounts = 4;
+ string path = 1;
+ bool recursive = 2;
+ // If true, each FilesystemEvent includes the EntryInfo of the affected entry, when available.
+ bool include_entry = 3;
+ // If true, allows watching paths on network filesystem mounts (NFS, CIFS, SMB, FUSE).
+ // Events on network mounts may be unreliable or not delivered at all.
+ bool allow_network_mounts = 4;
}
message FilesystemEvent {
- string name = 1;
- EventType type = 2;
- // Info of the entry that triggered the event. Only populated when include_entry
- // was requested and the entry could be stat-ed (e.g. not set for remove/rename-away
- // events, where the entry no longer exists at this path).
- optional EntryInfo entry = 3;
+ string name = 1;
+ EventType type = 2;
+ // Info of the entry that triggered the event. Only populated when include_entry
+ // was requested and the entry could be stat-ed (e.g. not set for remove/rename-away
+ // events, where the entry no longer exists at this path).
+ optional EntryInfo entry = 3;
}
message WatchDirResponse {
- oneof event {
- StartEvent start = 1;
- FilesystemEvent filesystem = 2;
- KeepAlive keepalive = 3;
- }
+ oneof event {
+ StartEvent start = 1;
+ FilesystemEvent filesystem = 2;
+ KeepAlive keepalive = 3;
+ }
- message StartEvent {}
+ message StartEvent {}
- message KeepAlive {}
+ message KeepAlive {}
}
message CreateWatcherRequest {
- string path = 1;
- bool recursive = 2;
- // If true, each FilesystemEvent includes the EntryInfo of the affected entry, when available.
- bool include_entry = 3;
- // If true, allows watching paths on network filesystem mounts (NFS, CIFS, SMB, FUSE).
- // Events on network mounts may be unreliable or not delivered at all.
- bool allow_network_mounts = 4;
+ string path = 1;
+ bool recursive = 2;
+ // If true, each FilesystemEvent includes the EntryInfo of the affected entry, when available.
+ bool include_entry = 3;
+ // If true, allows watching paths on network filesystem mounts (NFS, CIFS, SMB, FUSE).
+ // Events on network mounts may be unreliable or not delivered at all.
+ bool allow_network_mounts = 4;
}
message CreateWatcherResponse {
- string watcher_id = 1;
+ string watcher_id = 1;
}
message GetWatcherEventsRequest {
- string watcher_id = 1;
+ string watcher_id = 1;
}
message GetWatcherEventsResponse {
- repeated FilesystemEvent events = 1;
+ repeated FilesystemEvent events = 1;
}
message RemoveWatcherRequest {
- string watcher_id = 1;
+ string watcher_id = 1;
}
message RemoveWatcherResponse {}
enum EventType {
- EVENT_TYPE_UNSPECIFIED = 0;
- EVENT_TYPE_CREATE = 1;
- EVENT_TYPE_WRITE = 2;
- EVENT_TYPE_REMOVE = 3;
- EVENT_TYPE_RENAME = 4;
- EVENT_TYPE_CHMOD = 5;
+ EVENT_TYPE_UNSPECIFIED = 0;
+ EVENT_TYPE_CREATE = 1;
+ EVENT_TYPE_WRITE = 2;
+ EVENT_TYPE_REMOVE = 3;
+ EVENT_TYPE_RENAME = 4;
+ EVENT_TYPE_CHMOD = 5;
}
diff --git a/spec/envd/process/process.proto b/spec/envd/process/process.proto
index 4d394da6d..99376a0e3 100644
--- a/spec/envd/process/process.proto
+++ b/spec/envd/process/process.proto
@@ -53,6 +53,8 @@ message StartRequest {
ProcessConfig process = 1;
optional PTY pty = 2;
optional string tag = 3;
+ // This is optional for backwards compatibility.
+ // We default to true. New SDK versions will set this to false by default.
optional bool stdin = 4;
}
diff --git a/spec/infra-ref b/spec/infra-ref
new file mode 100644
index 000000000..5851cf1af
--- /dev/null
+++ b/spec/infra-ref
@@ -0,0 +1 @@
+97782d4d2812ffaa88fce2eb640dac645ccbdbd4
diff --git a/spec/openapi-volumecontent.yml b/spec/openapi-volumecontent.yml
index 64809b33f..a84c39642 100644
--- a/spec/openapi-volumecontent.yml
+++ b/spec/openapi-volumecontent.yml
@@ -4,7 +4,7 @@ info:
title: E2B API
security:
- - VolumeJWT: []
+ - VolumeJWT: [ ]
components:
securitySchemes:
@@ -26,44 +26,45 @@ components:
required: true
schema:
type: string
+ minLength: 1
responses:
- '400':
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Authentication error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '409':
+ $ref: "#/components/schemas/Error"
+ "409":
description: Conflict
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "500":
description: Server error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
schemas:
Error:
@@ -85,7 +86,7 @@ components:
type: string
type:
type: string
- enum: [unknown, file, directory, symlink]
+ enum: [ unknown, file, directory, symlink ]
path:
type: string
size:
@@ -126,32 +127,32 @@ components:
VolumeDirectoryListing:
type: array
items:
- $ref: '#/components/schemas/VolumeEntryStat'
+ $ref: "#/components/schemas/VolumeEntryStat"
paths:
/volumecontent/{volumeID}/path:
get:
description: Get path information
- tags: [volumes]
+ tags: [ volumes ]
parameters:
- - $ref: '#/components/parameters/volumeID'
- - $ref: '#/components/parameters/path'
+ - $ref: "#/components/parameters/volumeID"
+ - $ref: "#/components/parameters/path"
responses:
- '200':
+ "200":
description: Successfully retrieved path information
content:
application/json:
schema:
- $ref: '#/components/schemas/VolumeEntryStat'
- '404':
- $ref: '#/components/responses/404'
+ $ref: "#/components/schemas/VolumeEntryStat"
+ "404":
+ $ref: "#/components/responses/404"
patch:
description: Update path metadata
- tags: [volumes]
+ tags: [ volumes ]
parameters:
- - $ref: '#/components/parameters/volumeID'
- - $ref: '#/components/parameters/path'
+ - $ref: "#/components/parameters/volumeID"
+ - $ref: "#/components/parameters/path"
requestBody:
required: true
content:
@@ -169,38 +170,38 @@ paths:
type: integer
format: uint32
responses:
- '200':
- description: "Successfully updated a file's metadata"
+ "200":
+ description: "Successfully updated a path's metadata"
content:
application/json:
schema:
- $ref: '#/components/schemas/VolumeEntryStat'
- '400':
- description: 'Invalid metadata provided'
- '404':
- description: 'path not found'
- '500':
- description: 'Internal server error'
+ $ref: "#/components/schemas/VolumeEntryStat"
+ "400":
+ description: "Invalid metadata provided"
+ "404":
+ description: "path not found"
+ "500":
+ description: "Internal server error"
delete:
description: Delete a path
- tags: [volumes]
+ tags: [ volumes ]
parameters:
- - $ref: '#/components/parameters/volumeID'
- - $ref: '#/components/parameters/path'
+ - $ref: "#/components/parameters/volumeID"
+ - $ref: "#/components/parameters/path"
responses:
- '204':
+ "204":
description: Successfully deleted a path
- '404':
- $ref: '#/components/responses/404'
+ "404":
+ $ref: "#/components/responses/404"
/volumecontent/{volumeID}/dir:
get:
description: List directory contents
- tags: [volumes]
+ tags: [ volumes ]
parameters:
- - $ref: '#/components/parameters/volumeID'
- - $ref: '#/components/parameters/path'
+ - $ref: "#/components/parameters/volumeID"
+ - $ref: "#/components/parameters/path"
- name: depth
in: query
description: Number of layers deep to recurse into the directory
@@ -209,24 +210,24 @@ paths:
format: uint32
default: 1
responses:
- '200':
- description: 'Successfully retrieved a directory listing'
+ "200":
+ description: "Successfully retrieved a directory listing"
content:
application/json:
schema:
- $ref: '#/components/schemas/VolumeDirectoryListing'
- '400':
- description: 'Invalid path provided'
- '404':
- description: 'path not found'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/VolumeDirectoryListing"
+ "400":
+ description: "Invalid path provided"
+ "404":
+ description: "path not found"
+ "500":
+ $ref: "#/components/responses/500"
post:
- description: 'Create a directory'
- tags: [volumes]
+ description: "Create a directory"
+ tags: [ volumes ]
parameters:
- - $ref: '#/components/parameters/volumeID'
- - $ref: '#/components/parameters/path'
+ - $ref: "#/components/parameters/volumeID"
+ - $ref: "#/components/parameters/path"
- name: uid
in: query
description: User ID of the created directory
@@ -251,42 +252,42 @@ paths:
schema:
type: boolean
responses:
- '201':
- description: 'Successfully created a directory'
+ "201":
+ description: "Successfully created a directory"
content:
application/json:
schema:
- $ref: '#/components/schemas/VolumeEntryStat'
- '404':
- description: 'path not found'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/VolumeEntryStat"
+ "404":
+ description: "path not found"
+ "500":
+ $ref: "#/components/responses/500"
/volumecontent/{volumeID}/file:
get:
description: Download file
- tags: [volumes]
+ tags: [ volumes ]
parameters:
- - $ref: '#/components/parameters/volumeID'
- - $ref: '#/components/parameters/path'
+ - $ref: "#/components/parameters/volumeID"
+ - $ref: "#/components/parameters/path"
responses:
- '200':
- description: 'Successfully downloaded a file'
+ "200":
+ description: "Successfully downloaded a file"
content:
application/octet-stream:
schema:
type: string
format: binary
- '404':
- description: 'path not found'
- '500':
- $ref: '#/components/responses/500'
+ "404":
+ description: "path not found"
+ "500":
+ $ref: "#/components/responses/500"
put:
description: Upload file
- tags: [volumes]
+ tags: [ volumes ]
parameters:
- - $ref: '#/components/parameters/volumeID'
- - $ref: '#/components/parameters/path'
+ - $ref: "#/components/parameters/volumeID"
+ - $ref: "#/components/parameters/path"
- name: uid
in: query
description: User ID of the uploaded file
@@ -317,13 +318,13 @@ paths:
type: string
format: binary
responses:
- '201':
- description: 'Successfully created a file'
+ "201":
+ description: "Successfully created a file"
content:
application/json:
schema:
- $ref: '#/components/schemas/VolumeEntryStat'
- '404':
- description: 'path not found'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/VolumeEntryStat"
+ "404":
+ description: "path not found"
+ "500":
+ $ref: "#/components/responses/500"
diff --git a/spec/openapi.yml b/spec/openapi.yml
index da541a1f4..7ae8dd32d 100644
--- a/spec/openapi.yml
+++ b/spec/openapi.yml
@@ -16,19 +16,12 @@ components:
type: http
scheme: bearer
bearerFormat: access_token
- # Generated code uses security schemas in the alphabetical order.
- # In order to check first the token, and then the team (so we can already use the user),
- # there is a 1 and 2 present in the names of the security schemas.
- Supabase1TokenAuth:
- type: apiKey
- in: header
- name: X-Supabase-Token
- Supabase2TeamAuth:
- type: apiKey
- in: header
- name: X-Supabase-Team
+ description: |
+ **Deprecated.** Access token authentication is deprecated and will be
+ removed in a future release. Use API key authentication (`X-API-Key`)
+ instead.
# AuthProviderBearerAuth / AuthProviderTeamAuth: B before T in the name
- # so Bearer is validated before Team (same reason as Supabase1/2 above).
+ # so Bearer is validated before Team.
AuthProviderBearerAuth:
type: http
scheme: bearer
@@ -37,10 +30,16 @@ components:
type: apiKey
in: header
name: X-Team-ID
- AdminTokenAuth:
+ # AdminApiKeyAuth / AdminTeamAuth: alphabetical names ensure token
+ # validation runs before team context population.
+ AdminApiKeyAuth:
type: apiKey
in: header
name: X-Admin-Token
+ AdminTeamAuth:
+ type: apiKey
+ in: header
+ name: X-Team-ID
parameters:
templateID:
@@ -125,42 +124,48 @@ components:
type: string
responses:
- '400':
+ "400":
description: Bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '401':
+ $ref: "#/components/schemas/Error"
+ "401":
description: Authentication error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '403':
+ $ref: "#/components/schemas/Error"
+ "403":
description: Forbidden
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '404':
+ $ref: "#/components/schemas/Error"
+ "404":
description: Not found
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '409':
+ $ref: "#/components/schemas/Error"
+ "409":
description: Conflict
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
- '500':
+ $ref: "#/components/schemas/Error"
+ "410":
+ description: Gone
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/Error"
+ "500":
description: Server error
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
schemas:
Team:
@@ -292,6 +297,10 @@ components:
description: List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules.
items:
type: string
+ egressProxy:
+ allOf:
+ - $ref: "#/components/schemas/SandboxEgressProxyConfig"
+ x-not-implemented: true
maskRequestHost:
type: string
description: Specify host mask which will be used for all sandbox requests
@@ -304,7 +313,7 @@ components:
additionalProperties:
type: array
items:
- $ref: '#/components/schemas/SandboxNetworkRule'
+ $ref: "#/components/schemas/SandboxNetworkRule"
SandboxNetworkUpdateConfig:
type: object
@@ -320,13 +329,17 @@ components:
description: List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules.
items:
type: string
+ egressProxy:
+ allOf:
+ - $ref: "#/components/schemas/SandboxEgressProxyConfig"
+ x-not-implemented: true
rules:
type: object
description: Per-domain transform rules. Replaces all existing rules when provided.
additionalProperties:
type: array
items:
- $ref: '#/components/schemas/SandboxNetworkRule'
+ $ref: "#/components/schemas/SandboxNetworkRule"
allow_internet_access:
type: boolean
description:
@@ -338,7 +351,7 @@ components:
description: Transform rule applied to egress requests matching a domain pattern.
properties:
transform:
- $ref: '#/components/schemas/SandboxNetworkTransform'
+ $ref: "#/components/schemas/SandboxNetworkTransform"
SandboxNetworkTransform:
type: object
@@ -353,6 +366,32 @@ components:
additionalProperties:
type: string
+ SandboxEgressProxyConfig:
+ type: object
+ nullable: true
+ x-not-implemented: true
+ description: >-
+ SOCKS5 proxy for sandbox egress. Outbound TCP is tunneled through the
+ proxy after allow/deny filtering; the sandbox is unaware. Domain-matched
+ flows use remote DNS (ATYP=domain).
+ required:
+ - address
+ properties:
+ address:
+ type: string
+ description: >-
+ SOCKS5 proxy address in host:port format (e.g. "proxy.example.com:1080").
+ username:
+ type: string
+ maxLength: 255
+ description: >-
+ Optional SOCKS5 username (RFC 1929), max 255 bytes.
+ password:
+ type: string
+ maxLength: 255
+ description: >-
+ Optional SOCKS5 password (RFC 1929), max 255 bytes.
+
SandboxAutoResumeEnabled:
type: boolean
description: Auto-resume enabled flag for paused sandboxes. Default false.
@@ -365,7 +404,7 @@ components:
- enabled
properties:
enabled:
- $ref: '#/components/schemas/SandboxAutoResumeEnabled'
+ $ref: "#/components/schemas/SandboxAutoResumeEnabled"
SandboxOnTimeout:
type: string
@@ -385,7 +424,7 @@ components:
type: boolean
description: Whether the sandbox can auto-resume.
onTimeout:
- $ref: '#/components/schemas/SandboxOnTimeout'
+ $ref: "#/components/schemas/SandboxOnTimeout"
SandboxLog:
description: Log entry with timestamp and line
@@ -416,7 +455,7 @@ components:
type: string
description: Log message content
level:
- $ref: '#/components/schemas/LogLevel'
+ $ref: "#/components/schemas/LogLevel"
fields:
type: object
additionalProperties:
@@ -431,12 +470,12 @@ components:
description: Logs of the sandbox
type: array
items:
- $ref: '#/components/schemas/SandboxLog'
+ $ref: "#/components/schemas/SandboxLog"
logEntries:
description: Structured logs of the sandbox
type: array
items:
- $ref: '#/components/schemas/SandboxLogEntry'
+ $ref: "#/components/schemas/SandboxLogEntry"
SandboxLogsV2Response:
required:
@@ -447,7 +486,7 @@ components:
description: Sandbox logs structured
type: array
items:
- $ref: '#/components/schemas/SandboxLogEntry'
+ $ref: "#/components/schemas/SandboxLogEntry"
SandboxMetric:
description: Metric entry with timestamp and line
@@ -534,7 +573,7 @@ components:
deprecated: true
description: Identifier of the client
envdVersion:
- $ref: '#/components/schemas/EnvdVersion'
+ $ref: "#/components/schemas/EnvdVersion"
envdAccessToken:
type: string
description: Access token used for envd communication
@@ -582,7 +621,7 @@ components:
format: date-time
description: Time when the sandbox will expire
envdVersion:
- $ref: '#/components/schemas/EnvdVersion'
+ $ref: "#/components/schemas/EnvdVersion"
envdAccessToken:
type: string
description: Access token used for envd communication
@@ -595,23 +634,23 @@ components:
nullable: true
description: Base domain where the sandbox traffic is accessible
cpuCount:
- $ref: '#/components/schemas/CPUCount'
+ $ref: "#/components/schemas/CPUCount"
memoryMB:
- $ref: '#/components/schemas/MemoryMB'
+ $ref: "#/components/schemas/MemoryMB"
diskSizeMB:
- $ref: '#/components/schemas/DiskSizeMB'
+ $ref: "#/components/schemas/DiskSizeMB"
metadata:
- $ref: '#/components/schemas/SandboxMetadata'
+ $ref: "#/components/schemas/SandboxMetadata"
state:
- $ref: '#/components/schemas/SandboxState'
+ $ref: "#/components/schemas/SandboxState"
network:
- $ref: '#/components/schemas/SandboxNetworkConfig'
+ $ref: "#/components/schemas/SandboxNetworkConfig"
lifecycle:
- $ref: '#/components/schemas/SandboxLifecycle'
+ $ref: "#/components/schemas/SandboxLifecycle"
volumeMounts:
type: array
items:
- $ref: '#/components/schemas/SandboxVolumeMount'
+ $ref: "#/components/schemas/SandboxVolumeMount"
ListedSandbox:
required:
@@ -648,21 +687,21 @@ components:
format: date-time
description: Time when the sandbox will expire
cpuCount:
- $ref: '#/components/schemas/CPUCount'
+ $ref: "#/components/schemas/CPUCount"
memoryMB:
- $ref: '#/components/schemas/MemoryMB'
+ $ref: "#/components/schemas/MemoryMB"
diskSizeMB:
- $ref: '#/components/schemas/DiskSizeMB'
+ $ref: "#/components/schemas/DiskSizeMB"
metadata:
- $ref: '#/components/schemas/SandboxMetadata'
+ $ref: "#/components/schemas/SandboxMetadata"
state:
- $ref: '#/components/schemas/SandboxState'
+ $ref: "#/components/schemas/SandboxState"
envdVersion:
- $ref: '#/components/schemas/EnvdVersion'
+ $ref: "#/components/schemas/EnvdVersion"
volumeMounts:
type: array
items:
- $ref: '#/components/schemas/SandboxVolumeMount'
+ $ref: "#/components/schemas/SandboxVolumeMount"
SandboxesWithMetrics:
required:
@@ -670,7 +709,7 @@ components:
properties:
sandboxes:
additionalProperties:
- $ref: '#/components/schemas/SandboxMetric'
+ $ref: "#/components/schemas/SandboxMetric"
NewSandbox:
required:
@@ -701,7 +740,7 @@ components:
auto-resumed by traffic and must be resumed explicitly, so it cannot
be combined with autoResume. Defaults to true (full memory snapshot).
autoResume:
- $ref: '#/components/schemas/SandboxAutoResumeConfig'
+ $ref: "#/components/schemas/SandboxAutoResumeConfig"
secure:
type: boolean
description: Secure all system communication with sandbox
@@ -711,17 +750,48 @@ components:
Allow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut
to 0.0.0.0/0 in the network config.
network:
- $ref: '#/components/schemas/SandboxNetworkConfig'
+ $ref: "#/components/schemas/SandboxNetworkConfig"
metadata:
- $ref: '#/components/schemas/SandboxMetadata'
+ $ref: "#/components/schemas/SandboxMetadata"
envVars:
- $ref: '#/components/schemas/EnvVars'
+ $ref: "#/components/schemas/EnvVars"
mcp:
- $ref: '#/components/schemas/Mcp'
+ $ref: "#/components/schemas/Mcp"
+ iam:
+ $ref: "#/components/schemas/SandboxIam"
volumeMounts:
type: array
items:
- $ref: '#/components/schemas/SandboxVolumeMount'
+ $ref: "#/components/schemas/SandboxVolumeMount"
+
+ SandboxIam:
+ type: object
+ description: >-
+ Sandbox workload identity configuration. A non-empty, valid tokens map
+ enables workload identity for the sandbox.
+ properties:
+ tokens:
+ $ref: "#/components/schemas/SandboxIamTokens"
+
+ SandboxIamTokens:
+ type: object
+ description: >-
+ Named workload-token definitions, keyed by a caller-chosen token name.
+ additionalProperties:
+ $ref: "#/components/schemas/SandboxIamToken"
+
+ SandboxIamToken:
+ type: object
+ required:
+ - audience
+ - tokenType
+ properties:
+ audience:
+ type: string
+ description: Audience of the workload token, stored exactly as provided.
+ tokenType:
+ type: string
+ description: Workload token type.
ResumedSandbox:
properties:
@@ -736,6 +806,44 @@ components:
deprecated: true
description: Automatically pauses the sandbox after the timeout
+ ConnectSandbox:
+ type: object
+ required:
+ - timeout
+ properties:
+ timeout:
+ description: Timeout in seconds from the current time after which the sandbox should expire
+ type: integer
+ format: int32
+ minimum: 0
+
+ SandboxTimeoutRequest:
+ type: object
+ required:
+ - timeout
+ properties:
+ timeout:
+ description: Timeout in seconds from the current time after which the sandbox should expire
+ type: integer
+ format: int32
+ minimum: 0
+
+ SandboxRefreshRequest:
+ type: object
+ properties:
+ duration:
+ description: Duration for which the sandbox should be kept alive in seconds
+ type: integer
+ maximum: 3600 # 1 hour
+ minimum: 0
+
+ SandboxSnapshotRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ description: Optional name for the snapshot template. If a snapshot template with this name already exists, a new build will be assigned to the existing template instead of creating a new one.
+
SandboxPauseRequest:
type: object
properties:
@@ -750,17 +858,6 @@ components:
resume); auto-resume, which can be triggered by arbitrary traffic,
refuses such a sandbox. Defaults to true.
- ConnectSandbox:
- type: object
- required:
- - timeout
- properties:
- timeout:
- description: Timeout in seconds from the current time after which the sandbox should expire
- type: integer
- format: int32
- minimum: 0
-
SandboxForkRequest:
type: object
properties:
@@ -790,9 +887,9 @@ components:
start.
properties:
sandbox:
- $ref: '#/components/schemas/Sandbox'
+ $ref: "#/components/schemas/Sandbox"
error:
- $ref: '#/components/schemas/Error'
+ $ref: "#/components/schemas/Error"
TeamMetric:
description: Team metric with timestamp
@@ -898,11 +995,11 @@ components:
type: string
description: Identifier of the last successful build for given template
cpuCount:
- $ref: '#/components/schemas/CPUCount'
+ $ref: "#/components/schemas/CPUCount"
memoryMB:
- $ref: '#/components/schemas/MemoryMB'
+ $ref: "#/components/schemas/MemoryMB"
diskSizeMB:
- $ref: '#/components/schemas/DiskSizeMB'
+ $ref: "#/components/schemas/DiskSizeMB"
public:
type: boolean
description: Whether the template is public or only accessible by the team
@@ -927,7 +1024,7 @@ components:
description: Time when the template was last updated
createdBy:
allOf:
- - $ref: '#/components/schemas/TeamUser'
+ - $ref: "#/components/schemas/TeamUser"
nullable: true
lastSpawnedAt:
type: string
@@ -943,9 +1040,9 @@ components:
format: int32
description: Number of times the template was built
envdVersion:
- $ref: '#/components/schemas/EnvdVersion'
+ $ref: "#/components/schemas/EnvdVersion"
buildStatus:
- $ref: '#/components/schemas/TemplateBuildStatus'
+ $ref: "#/components/schemas/TemplateBuildStatus"
TemplateRequestResponseV3:
required:
@@ -1006,11 +1103,11 @@ components:
type: string
description: Identifier of the last successful build for given template
cpuCount:
- $ref: '#/components/schemas/CPUCount'
+ $ref: "#/components/schemas/CPUCount"
memoryMB:
- $ref: '#/components/schemas/MemoryMB'
+ $ref: "#/components/schemas/MemoryMB"
diskSizeMB:
- $ref: '#/components/schemas/DiskSizeMB'
+ $ref: "#/components/schemas/DiskSizeMB"
public:
type: boolean
description: Whether the template is public or only accessible by the team
@@ -1029,7 +1126,7 @@ components:
description: Time when the template was last updated
createdBy:
allOf:
- - $ref: '#/components/schemas/TeamUser'
+ - $ref: "#/components/schemas/TeamUser"
nullable: true
lastSpawnedAt:
type: string
@@ -1045,7 +1142,7 @@ components:
format: int32
description: Number of times the template was built
envdVersion:
- $ref: '#/components/schemas/EnvdVersion'
+ $ref: "#/components/schemas/EnvdVersion"
TemplateBuild:
required:
@@ -1061,7 +1158,7 @@ components:
format: uuid
description: Identifier of the build
status:
- $ref: '#/components/schemas/TemplateBuildStatus'
+ $ref: "#/components/schemas/TemplateBuildStatus"
createdAt:
type: string
format: date-time
@@ -1075,13 +1172,13 @@ components:
format: date-time
description: Time when the build was finished
cpuCount:
- $ref: '#/components/schemas/CPUCount'
+ $ref: "#/components/schemas/CPUCount"
memoryMB:
- $ref: '#/components/schemas/MemoryMB'
+ $ref: "#/components/schemas/MemoryMB"
diskSizeMB:
- $ref: '#/components/schemas/DiskSizeMB'
+ $ref: "#/components/schemas/DiskSizeMB"
envdVersion:
- $ref: '#/components/schemas/EnvdVersion'
+ $ref: "#/components/schemas/EnvdVersion"
TemplateWithBuilds:
required:
@@ -1133,7 +1230,7 @@ components:
type: array
description: List of builds for the template
items:
- $ref: '#/components/schemas/TemplateBuild'
+ $ref: "#/components/schemas/TemplateBuild"
TemplateAliasResponse:
required:
@@ -1167,9 +1264,9 @@ components:
description: Ready check command to execute in the template after the build
type: string
cpuCount:
- $ref: '#/components/schemas/CPUCount'
+ $ref: "#/components/schemas/CPUCount"
memoryMB:
- $ref: '#/components/schemas/MemoryMB'
+ $ref: "#/components/schemas/MemoryMB"
TemplateStep:
description: Step in the template build process
@@ -1198,6 +1295,7 @@ components:
name:
description: Name of the template. Can include a tag with colon separator (e.g. "my-template" or "my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array.
type: string
+ maxLength: 128
tags:
type: array
description: Tags to assign to the template build
@@ -1206,15 +1304,16 @@ components:
alias:
description: Alias of the template. Deprecated, use name instead.
type: string
+ maxLength: 128
deprecated: true
teamID:
deprecated: true
type: string
description: Identifier of the team
cpuCount:
- $ref: '#/components/schemas/CPUCount'
+ $ref: "#/components/schemas/CPUCount"
memoryMB:
- $ref: '#/components/schemas/MemoryMB'
+ $ref: "#/components/schemas/MemoryMB"
TemplateBuildRequestV2:
required:
@@ -1228,21 +1327,21 @@ components:
type: string
description: Identifier of the team
cpuCount:
- $ref: '#/components/schemas/CPUCount'
+ $ref: "#/components/schemas/CPUCount"
memoryMB:
- $ref: '#/components/schemas/MemoryMB'
+ $ref: "#/components/schemas/MemoryMB"
FromImageRegistry:
oneOf:
- - $ref: '#/components/schemas/AWSRegistry'
- - $ref: '#/components/schemas/GCPRegistry'
- - $ref: '#/components/schemas/GeneralRegistry'
+ - $ref: "#/components/schemas/AWSRegistry"
+ - $ref: "#/components/schemas/GCPRegistry"
+ - $ref: "#/components/schemas/GeneralRegistry"
discriminator:
propertyName: type
mapping:
- aws: '#/components/schemas/AWSRegistry'
- gcp: '#/components/schemas/GCPRegistry'
- registry: '#/components/schemas/GeneralRegistry'
+ aws: "#/components/schemas/AWSRegistry"
+ gcp: "#/components/schemas/GCPRegistry"
+ registry: "#/components/schemas/GeneralRegistry"
AWSRegistry:
type: object
@@ -1308,7 +1407,7 @@ components:
type: string
description: Template to use as a base for the template build
fromImageRegistry:
- $ref: '#/components/schemas/FromImageRegistry'
+ $ref: "#/components/schemas/FromImageRegistry"
force:
default: false
type: boolean
@@ -1318,7 +1417,7 @@ components:
description: List of steps to execute in the template build
type: array
items:
- $ref: '#/components/schemas/TemplateStep'
+ $ref: "#/components/schemas/TemplateStep"
startCmd:
description: Start command to execute in the template after the build
type: string
@@ -1360,7 +1459,7 @@ components:
type: string
description: Log message content
level:
- $ref: '#/components/schemas/LogLevel'
+ $ref: "#/components/schemas/LogLevel"
step:
type: string
description: Step in the build process related to the log entry
@@ -1380,7 +1479,7 @@ components:
description: Log entries related to the status reason
type: array
items:
- $ref: '#/components/schemas/BuildLogEntry'
+ $ref: "#/components/schemas/BuildLogEntry"
TemplateBuildStatus:
type: string
@@ -1410,7 +1509,7 @@ components:
description: Build logs structured
type: array
items:
- $ref: '#/components/schemas/BuildLogEntry'
+ $ref: "#/components/schemas/BuildLogEntry"
templateID:
type: string
description: Identifier of the template
@@ -1418,9 +1517,9 @@ components:
type: string
description: Identifier of the build
status:
- $ref: '#/components/schemas/TemplateBuildStatus'
+ $ref: "#/components/schemas/TemplateBuildStatus"
reason:
- $ref: '#/components/schemas/BuildStatusReason'
+ $ref: "#/components/schemas/BuildStatusReason"
TemplateBuildLogsResponse:
required:
@@ -1431,7 +1530,7 @@ components:
description: Build logs structured
type: array
items:
- $ref: '#/components/schemas/BuildLogEntry'
+ $ref: "#/components/schemas/BuildLogEntry"
LogsDirection:
type: string
@@ -1481,7 +1580,7 @@ components:
format: uuid
description: Identifier of the cluster
status:
- $ref: '#/components/schemas/NodeStatus'
+ $ref: "#/components/schemas/NodeStatus"
DiskMetrics:
required:
@@ -1519,6 +1618,10 @@ components:
- cpuCount
- memoryTotalBytes
- disks
+ - hugePagesTotal
+ - hugePagesUsed
+ - hugePagesReserved
+ - hugePageSizeBytes
properties:
allocatedCPU:
type: integer
@@ -1544,11 +1647,27 @@ components:
type: integer
format: uint64
description: Total node memory in bytes
+ hugePagesTotal:
+ type: integer
+ format: uint64
+ description: Total number of preallocated hugepages on the node
+ hugePagesUsed:
+ type: integer
+ format: uint64
+ description: Number of hugepages in use (total - free)
+ hugePagesReserved:
+ type: integer
+ format: uint64
+ description: Number of reserved hugepages (committed but not yet faulted)
+ hugePageSizeBytes:
+ type: integer
+ format: uint64
+ description: Size of a single hugepage in bytes
disks:
type: array
description: Detailed metrics for each disk/mount point
items:
- $ref: '#/components/schemas/DiskMetrics'
+ $ref: "#/components/schemas/DiskMetrics"
MachineInfo:
required:
- cpuFamily
@@ -1575,6 +1694,7 @@ components:
- serviceInstanceID
- clusterID
- status
+ - statusChangedAt
- sandboxCount
- metrics
- createSuccesses
@@ -1600,15 +1720,19 @@ components:
type: string
description: Identifier of the cluster
machineInfo:
- $ref: '#/components/schemas/MachineInfo'
+ $ref: "#/components/schemas/MachineInfo"
status:
- $ref: '#/components/schemas/NodeStatus'
+ $ref: "#/components/schemas/NodeStatus"
+ statusChangedAt:
+ type: string
+ format: date-time
+ description: Time when the node status was last changed
sandboxCount:
type: integer
format: uint32
description: Number of sandboxes running on the node
metrics:
- $ref: '#/components/schemas/NodeMetrics'
+ $ref: "#/components/schemas/NodeMetrics"
createSuccesses:
type: integer
format: uint64
@@ -1628,6 +1752,7 @@ components:
- serviceInstanceID
- clusterID
- status
+ - statusChangedAt
- sandboxCount
- cachedBuilds
- createSuccesses
@@ -1653,15 +1778,19 @@ components:
type: string
description: Service instance identifier of the node
machineInfo:
- $ref: '#/components/schemas/MachineInfo'
+ $ref: "#/components/schemas/MachineInfo"
status:
- $ref: '#/components/schemas/NodeStatus'
+ $ref: "#/components/schemas/NodeStatus"
+ statusChangedAt:
+ type: string
+ format: date-time
+ description: Time when the node status was last changed
sandboxCount:
type: integer
format: uint32
description: Number of sandboxes running on the node
metrics:
- $ref: '#/components/schemas/NodeMetrics'
+ $ref: "#/components/schemas/NodeMetrics"
cachedBuilds:
type: array
description: List of cached builds id on the node
@@ -1695,7 +1824,7 @@ components:
type: string
description: The fully created access token
mask:
- $ref: '#/components/schemas/IdentifierMaskingDetails'
+ $ref: "#/components/schemas/IdentifierMaskingDetails"
createdAt:
type: string
format: date-time
@@ -1724,14 +1853,14 @@ components:
type: string
description: Name of the API key
mask:
- $ref: '#/components/schemas/IdentifierMaskingDetails'
+ $ref: "#/components/schemas/IdentifierMaskingDetails"
createdAt:
type: string
format: date-time
description: Timestamp of API key creation
createdBy:
allOf:
- - $ref: '#/components/schemas/TeamUser'
+ - $ref: "#/components/schemas/TeamUser"
nullable: true
lastUsed:
type: string
@@ -1755,7 +1884,7 @@ components:
type: string
description: Raw value of the API key
mask:
- $ref: '#/components/schemas/IdentifierMaskingDetails'
+ $ref: "#/components/schemas/IdentifierMaskingDetails"
name:
type: string
description: Name of the API key
@@ -1765,7 +1894,7 @@ components:
description: Timestamp of API key creation
createdBy:
allOf:
- - $ref: '#/components/schemas/TeamUser'
+ - $ref: "#/components/schemas/TeamUser"
nullable: true
lastUsed:
type: string
@@ -1919,7 +2048,7 @@ components:
name:
type: string
description: Name of the volume
- pattern: '^[a-zA-Z0-9_-]+$'
+ pattern: "^[a-zA-Z0-9_-]+$"
required:
- name
@@ -1935,48 +2064,49 @@ tags:
paths:
/health:
get:
+ summary: Health check
description: Health check
responses:
- '204':
+ "204":
description: The service is healthy
- '401':
- $ref: '#/components/responses/401'
+ "401":
+ $ref: "#/components/responses/401"
/teams:
get:
+ summary: List teams
description: List all teams
tags: [auth]
security:
- AccessTokenAuth: []
- - Supabase1TokenAuth: []
- AuthProviderBearerAuth: []
responses:
- '200':
+ "200":
description: Successfully returned all teams
content:
application/json:
schema:
type: array
items:
- allOf:
- - $ref: '#/components/schemas/Team'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/Team"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/teams/{teamID}/metrics:
get:
+ summary: Team metrics
description: Get metrics for the team
tags: [auth]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/teamID'
+ - $ref: "#/components/parameters/teamID"
- in: query
name: start
schema:
@@ -1992,35 +2122,36 @@ paths:
minimum: 0
description: Unix timestamp for the end of the interval, in seconds, for which the metrics
responses:
- '200':
+ "200":
description: Successfully returned the team metrics
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/TeamMetric'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '403':
- $ref: '#/components/responses/403'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TeamMetric"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "403":
+ $ref: "#/components/responses/403"
+ "500":
+ $ref: "#/components/responses/500"
/teams/{teamID}/metrics/max:
get:
+ summary: Maximum team metrics
description: Get the maximum metrics for the team in the given interval
tags: [auth]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/teamID'
+ - $ref: "#/components/parameters/teamID"
- in: query
name: start
schema:
@@ -2043,31 +2174,33 @@ paths:
enum: [concurrent_sandboxes, sandbox_start_rate]
description: Metric to retrieve the maximum value for
responses:
- '200':
+ "200":
description: Successfully returned the team metrics
content:
application/json:
schema:
- $ref: '#/components/schemas/MaxTeamMetric'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '403':
- $ref: '#/components/responses/403'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/MaxTeamMetric"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "403":
+ $ref: "#/components/responses/403"
+ "500":
+ $ref: "#/components/responses/500"
/sandboxes:
get:
- description: List all running sandboxes
+ summary: List running sandboxes
+ description: List all running sandboxes. Use GET /v2/sandboxes instead.
+ deprecated: true
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- name: metadata
in: query
@@ -2076,60 +2209,61 @@ paths:
schema:
type: string
responses:
- '200':
+ "200":
description: Successfully returned all running sandboxes
content:
application/json:
schema:
type: array
items:
- allOf:
- - $ref: '#/components/schemas/ListedSandbox'
- '401':
- $ref: '#/components/responses/401'
- '400':
- $ref: '#/components/responses/400'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/ListedSandbox"
+ "401":
+ $ref: "#/components/responses/401"
+ "400":
+ $ref: "#/components/responses/400"
+ "500":
+ $ref: "#/components/responses/500"
post:
+ summary: Create sandbox
description: Create a sandbox from the template
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/NewSandbox'
+ $ref: "#/components/schemas/NewSandbox"
responses:
- '201':
+ "201":
description: The sandbox was created successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/Sandbox'
- '401':
- $ref: '#/components/responses/401'
- '400':
- $ref: '#/components/responses/400'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/Sandbox"
+ "401":
+ $ref: "#/components/responses/401"
+ "400":
+ $ref: "#/components/responses/400"
+ "500":
+ $ref: "#/components/responses/500"
/v2/sandboxes:
get:
+ summary: List sandboxes (v2)
description: List all sandboxes
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- name: metadata
in: query
@@ -2144,38 +2278,38 @@ paths:
schema:
type: array
items:
- $ref: '#/components/schemas/SandboxState'
+ $ref: "#/components/schemas/SandboxState"
style: form
explode: false
- - $ref: '#/components/parameters/paginationNextToken'
- - $ref: '#/components/parameters/paginationLimit'
+ - $ref: "#/components/parameters/paginationNextToken"
+ - $ref: "#/components/parameters/paginationLimit"
responses:
- '200':
+ "200":
description: Successfully returned all running sandboxes
content:
application/json:
schema:
type: array
items:
- allOf:
- - $ref: '#/components/schemas/ListedSandbox'
- '401':
- $ref: '#/components/responses/401'
- '400':
- $ref: '#/components/responses/400'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/ListedSandbox"
+ "401":
+ $ref: "#/components/responses/401"
+ "400":
+ $ref: "#/components/responses/400"
+ "500":
+ $ref: "#/components/responses/500"
/sandboxes/metrics:
get:
+ summary: List sandbox metrics
description: List metrics for given sandboxes
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- name: sandbox_ids
in: query
@@ -2189,32 +2323,33 @@ paths:
maxItems: 100
uniqueItems: true
responses:
- '200':
+ "200":
description: Successfully returned all running sandboxes with metrics
content:
application/json:
schema:
- $ref: '#/components/schemas/SandboxesWithMetrics'
- '401':
- $ref: '#/components/responses/401'
- '400':
- $ref: '#/components/responses/400'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/SandboxesWithMetrics"
+ "401":
+ $ref: "#/components/responses/401"
+ "400":
+ $ref: "#/components/responses/400"
+ "500":
+ $ref: "#/components/responses/500"
/sandboxes/{sandboxID}/logs:
get:
+ summary: Sandbox logs
description: Get sandbox logs. Use /v2/sandboxes/{sandboxID}/logs instead.
deprecated: true
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
- in: query
name: start
schema:
@@ -2231,31 +2366,32 @@ paths:
type: integer
description: Maximum number of logs that should be returned
responses:
- '200':
+ "200":
description: Successfully returned the sandbox logs
content:
application/json:
schema:
- $ref: '#/components/schemas/SandboxLogs'
- '404':
- $ref: '#/components/responses/404'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/SandboxLogs"
+ "404":
+ $ref: "#/components/responses/404"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/v2/sandboxes/{sandboxID}/logs:
get:
+ summary: Sandbox logs (v2)
description: Get sandbox logs
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
- in: query
name: cursor
schema:
@@ -2275,12 +2411,12 @@ paths:
- in: query
name: direction
schema:
- $ref: '#/components/schemas/LogsDirection'
+ $ref: "#/components/schemas/LogsDirection"
description: Direction of the logs that should be returned
- in: query
name: level
schema:
- $ref: '#/components/schemas/LogLevel'
+ $ref: "#/components/schemas/LogLevel"
description: Minimum log level to return. Logs below this level are excluded
- in: query
name: search
@@ -2289,78 +2425,81 @@ paths:
maxLength: 256
description: Case-sensitive substring match on log message content
responses:
- '200':
+ "200":
description: Successfully returned the sandbox logs
content:
application/json:
schema:
- $ref: '#/components/schemas/SandboxLogsV2Response'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/SandboxLogsV2Response"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/sandboxes/{sandboxID}:
get:
+ summary: Sandbox
description: Get a sandbox by id
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
responses:
- '200':
+ "200":
description: Successfully returned the sandbox
content:
application/json:
schema:
- $ref: '#/components/schemas/SandboxDetail'
- '404':
- $ref: '#/components/responses/404'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/SandboxDetail"
+ "404":
+ $ref: "#/components/responses/404"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
delete:
+ summary: Kill sandbox
description: Kill a sandbox
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
responses:
- '204':
+ "204":
description: The sandbox was killed successfully
- '404':
- $ref: '#/components/responses/404'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ "404":
+ $ref: "#/components/responses/404"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/sandboxes/{sandboxID}/metrics:
get:
+ summary: Sandbox metrics
description: Get sandbox metrics
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
- in: query
name: start
schema:
@@ -2377,88 +2516,90 @@ paths:
description: Unix timestamp for the end of the interval, in seconds, for which the metrics
responses:
- '200':
+ "200":
description: Successfully returned the sandbox metrics
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/SandboxMetric'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/SandboxMetric"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
# TODO: Pause and resume might be exposed as POST /sandboxes/{sandboxID}/snapshot and then POST /sandboxes with specified snapshotting setup
/sandboxes/{sandboxID}/pause:
post:
+ summary: Pause sandbox
description: Pause the sandbox
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
requestBody:
required: false
content:
application/json:
schema:
- $ref: '#/components/schemas/SandboxPauseRequest'
+ $ref: "#/components/schemas/SandboxPauseRequest"
responses:
- '204':
+ "204":
description: The sandbox was paused successfully and can be resumed
- '409':
- $ref: '#/components/responses/409'
- '404':
- $ref: '#/components/responses/404'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ "409":
+ $ref: "#/components/responses/409"
+ "404":
+ $ref: "#/components/responses/404"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/sandboxes/{sandboxID}/resume:
post:
+ summary: Resume sandbox
deprecated: true
description: Resume the sandbox
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/ResumedSandbox'
+ $ref: "#/components/schemas/ResumedSandbox"
responses:
- '201':
+ "201":
description: The sandbox was resumed successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/Sandbox'
- '409':
- $ref: '#/components/responses/409'
- '404':
- $ref: '#/components/responses/404'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/Sandbox"
+ "409":
+ $ref: "#/components/responses/409"
+ "404":
+ $ref: "#/components/responses/404"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/sandboxes/{sandboxID}/fork:
post:
@@ -2474,20 +2615,20 @@ paths:
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
requestBody:
required: false
content:
application/json:
schema:
- $ref: '#/components/schemas/SandboxForkRequest'
+ $ref: "#/components/schemas/SandboxForkRequest"
responses:
- '201':
+ "201":
description: >-
The sandbox was snapshotted and the forks were attempted; each
entry reports one fork's outcome
@@ -2496,200 +2637,188 @@ paths:
schema:
type: array
items:
- $ref: '#/components/schemas/SandboxForkResult'
- '409':
- $ref: '#/components/responses/409'
- '404':
- $ref: '#/components/responses/404'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/SandboxForkResult"
+ "409":
+ $ref: "#/components/responses/409"
+ "404":
+ $ref: "#/components/responses/404"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/sandboxes/{sandboxID}/connect:
post:
+ summary: Connect sandbox
description: Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended.
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/ConnectSandbox'
+ $ref: "#/components/schemas/ConnectSandbox"
responses:
- '200':
+ "200":
description: The sandbox was already running
content:
application/json:
schema:
- $ref: '#/components/schemas/Sandbox'
- '201':
+ $ref: "#/components/schemas/Sandbox"
+ "201":
description: The sandbox was resumed successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/Sandbox'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/Sandbox"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/sandboxes/{sandboxID}/timeout:
post:
+ summary: Set sandbox timeout
description: Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration.
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
tags: [sandboxes]
requestBody:
content:
application/json:
schema:
- type: object
- required:
- - timeout
- properties:
- timeout:
- description: Timeout in seconds from the current time after which the sandbox should expire
- type: integer
- format: int32
- minimum: 0
+ $ref: "#/components/schemas/SandboxTimeoutRequest"
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
responses:
- '204':
+ "204":
description: Successfully set the sandbox timeout
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/sandboxes/{sandboxID}/network:
put:
+ summary: Update sandbox network
description: Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
tags: [sandboxes]
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/SandboxNetworkUpdateConfig'
+ $ref: "#/components/schemas/SandboxNetworkUpdateConfig"
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
responses:
- '204':
+ "204":
description: Successfully updated the sandbox network configuration
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '409':
- $ref: '#/components/responses/409'
- '500':
- $ref: '#/components/responses/500'
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "409":
+ $ref: "#/components/responses/409"
+ "500":
+ $ref: "#/components/responses/500"
/sandboxes/{sandboxID}/refreshes:
post:
+ summary: Refresh sandbox
description: Refresh the sandbox extending its time to live
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
tags: [sandboxes]
requestBody:
content:
application/json:
schema:
- type: object
- properties:
- duration:
- description: Duration for which the sandbox should be kept alive in seconds
- type: integer
- maximum: 3600 # 1 hour
- minimum: 0
+ $ref: "#/components/schemas/SandboxRefreshRequest"
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
responses:
- '204':
+ "204":
description: Successfully refreshed the sandbox
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
/sandboxes/{sandboxID}/snapshots:
post:
+ summary: Create snapshot
description: Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime.
tags: [sandboxes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/sandboxID'
+ - $ref: "#/components/parameters/sandboxID"
requestBody:
required: true
content:
application/json:
schema:
- type: object
- properties:
- name:
- type: string
- description: Optional name for the snapshot template. If a snapshot template with this name already exists, a new build will be assigned to the existing template instead of creating a new one.
+ $ref: "#/components/schemas/SandboxSnapshotRequest"
responses:
- '201':
+ "201":
description: Snapshot created successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/SnapshotInfo'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/SnapshotInfo"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/snapshots:
get:
+ summary: List snapshots
description: List all snapshots for the team
tags: [snapshots]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- name: sandboxID
in: query
@@ -2699,104 +2828,149 @@ paths:
description: Filter snapshots by source sandbox ID
- name: name
in: query
+ description: Filter snapshots by name or ID, optionally tag-qualified (e.g. "my-snapshot", "my-team/my-snapshot" or "my-snapshot:v1").
required: false
schema:
type: string
- description: Filter snapshots by name or ID, optionally tag-qualified (e.g. "my-snapshot", "my-team/my-snapshot" or "my-snapshot:v1").
- - $ref: '#/components/parameters/paginationLimit'
- - $ref: '#/components/parameters/paginationNextToken'
+ - $ref: "#/components/parameters/paginationLimit"
+ - $ref: "#/components/parameters/paginationNextToken"
responses:
- '200':
+ "200":
description: Successfully returned snapshots
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/SnapshotInfo'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/SnapshotInfo"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/v3/templates:
post:
+ summary: Create template (v3)
description: Create a new template
tags: [templates]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateBuildRequestV3'
+ $ref: "#/components/schemas/TemplateBuildRequestV3"
responses:
- '202':
+ "202":
description: The build was requested successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateRequestResponseV3'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '403':
- $ref: '#/components/responses/403'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TemplateRequestResponseV3"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "403":
+ $ref: "#/components/responses/403"
+ "500":
+ $ref: "#/components/responses/500"
/v2/templates:
+ get:
+ summary: List templates (v2)
+ description: List all templates
+ tags: [templates]
+ security:
+ - ApiKeyAuth: []
+ - AccessTokenAuth: []
+ - AuthProviderBearerAuth: []
+ AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
+ parameters:
+ - in: query
+ required: false
+ name: teamID
+ schema:
+ type: string
+ description: Identifier of the team
+ - $ref: "#/components/parameters/paginationNextToken"
+ - $ref: "#/components/parameters/paginationLimit"
+ responses:
+ "200":
+ description: Successfully returned all templates
+ headers:
+ X-Next-Token:
+ description: Cursor to fetch the next page of results, if more exist
+ schema:
+ type: string
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: "#/components/schemas/Template"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "403":
+ $ref: "#/components/responses/403"
+ "500":
+ $ref: "#/components/responses/500"
post:
+ summary: Create template (v2)
description: Create a new template
deprecated: true
tags: [templates]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateBuildRequestV2'
+ $ref: "#/components/schemas/TemplateBuildRequestV2"
responses:
- '202':
+ "202":
description: The build was requested successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateLegacy'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TemplateLegacy"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/templates/{templateID}/files/{hash}:
get:
+ summary: Template build file upload URL
description: Get an upload link for a tar file containing build layer files
tags: [templates]
security:
- AccessTokenAuth: []
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/templateID'
+ - $ref: "#/components/parameters/templateID"
- in: path
name: hash
required: true
@@ -2805,32 +2979,34 @@ paths:
description: Hash of the files
responses:
- '201':
+ "201":
description: The upload link where to upload the tar file
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateBuildFileUpload'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TemplateBuildFileUpload"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/templates:
get:
+ summary: List templates
description: List all templates
+ deprecated: true
tags: [templates]
security:
- ApiKeyAuth: []
- AccessTokenAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- in: query
required: false
@@ -2839,27 +3015,25 @@ paths:
type: string
description: Identifier of the team
responses:
- '200':
+ "200":
description: Successfully returned all templates
content:
application/json:
schema:
type: array
items:
- allOf:
- - $ref: '#/components/schemas/Template'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/Template"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
post:
+ summary: Create template
description: Create a new template
deprecated: true
tags: [templates]
security:
- AccessTokenAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
requestBody:
@@ -2867,221 +3041,225 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateBuildRequest'
+ $ref: "#/components/schemas/TemplateBuildRequest"
responses:
- '202':
+ "202":
description: The build was accepted
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateLegacy'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TemplateLegacy"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/templates/{templateID}:
get:
+ summary: List template builds
description: List all builds for a template
tags: [templates]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/templateID'
- - $ref: '#/components/parameters/paginationNextToken'
- - $ref: '#/components/parameters/paginationLimit'
+ - $ref: "#/components/parameters/templateID"
+ - $ref: "#/components/parameters/paginationNextToken"
+ - $ref: "#/components/parameters/paginationLimit"
responses:
- '200':
+ "200":
description: Successfully returned the template with its builds
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateWithBuilds'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TemplateWithBuilds"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
post:
+ summary: Rebuild template
description: Rebuild an template
deprecated: true
tags: [templates]
security:
- AccessTokenAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
parameters:
- - $ref: '#/components/parameters/templateID'
+ - $ref: "#/components/parameters/templateID"
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateBuildRequest'
+ $ref: "#/components/schemas/TemplateBuildRequest"
responses:
- '202':
+ "202":
description: The build was accepted
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateLegacy'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TemplateLegacy"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
delete:
+ summary: Delete template
description: Delete a template
tags: [templates]
security:
- ApiKeyAuth: []
- AccessTokenAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/templateID'
+ - $ref: "#/components/parameters/templateID"
responses:
- '204':
+ "204":
description: The template was deleted successfully
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
patch:
+ summary: Update template
description: Update template
deprecated: true
tags: [templates]
security:
- ApiKeyAuth: []
- AccessTokenAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/templateID'
+ - $ref: "#/components/parameters/templateID"
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateUpdateRequest'
+ $ref: "#/components/schemas/TemplateUpdateRequest"
responses:
- '200':
+ "200":
description: The template was updated successfully
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/templates/{templateID}/builds/{buildID}:
post:
+ summary: Start template build
description: Start the build
deprecated: true
tags: [templates]
security:
- AccessTokenAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
parameters:
- - $ref: '#/components/parameters/templateID'
- - $ref: '#/components/parameters/buildID'
+ - $ref: "#/components/parameters/templateID"
+ - $ref: "#/components/parameters/buildID"
responses:
- '202':
+ "202":
description: The build has started
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/v2/templates/{templateID}/builds/{buildID}:
post:
+ summary: Start template build (v2)
description: Start the build
tags: [templates]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/templateID'
- - $ref: '#/components/parameters/buildID'
+ - $ref: "#/components/parameters/templateID"
+ - $ref: "#/components/parameters/buildID"
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateBuildStartV2'
+ $ref: "#/components/schemas/TemplateBuildStartV2"
responses:
- '202':
+ "202":
description: The build has started
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/v2/templates/{templateID}:
patch:
+ summary: Update template (v2)
description: Update template
tags: [templates]
security:
- ApiKeyAuth: []
- AccessTokenAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/templateID'
+ - $ref: "#/components/parameters/templateID"
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateUpdateRequest'
+ $ref: "#/components/schemas/TemplateUpdateRequest"
responses:
- '200':
+ "200":
description: The template was updated successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateUpdateResponse'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TemplateUpdateResponse"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/templates/{templateID}/builds/{buildID}/status:
get:
+ summary: Template build status
description: Get template build info
tags: [templates]
security:
- AccessTokenAuth: []
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/templateID'
- - $ref: '#/components/parameters/buildID'
+ - $ref: "#/components/parameters/templateID"
+ - $ref: "#/components/parameters/buildID"
- in: query
name: logsOffset
schema:
@@ -3102,35 +3280,36 @@ paths:
- in: query
name: level
schema:
- $ref: '#/components/schemas/LogLevel'
+ $ref: "#/components/schemas/LogLevel"
responses:
- '200':
+ "200":
description: Successfully returned the template
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateBuildInfo'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TemplateBuildInfo"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/templates/{templateID}/builds/{buildID}/logs:
get:
+ summary: Template build logs
description: Get template build logs
tags: [templates]
security:
- AccessTokenAuth: []
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/templateID'
- - $ref: '#/components/parameters/buildID'
+ - $ref: "#/components/parameters/templateID"
+ - $ref: "#/components/parameters/buildID"
- in: query
name: cursor
schema:
@@ -3150,128 +3329,132 @@ paths:
- in: query
name: direction
schema:
- $ref: '#/components/schemas/LogsDirection'
+ $ref: "#/components/schemas/LogsDirection"
- in: query
name: level
schema:
- $ref: '#/components/schemas/LogLevel'
+ $ref: "#/components/schemas/LogLevel"
- in: query
name: source
schema:
- $ref: '#/components/schemas/LogsSource'
+ $ref: "#/components/schemas/LogsSource"
description: Source of the logs that should be returned from
responses:
- '200':
+ "200":
description: Successfully returned the template build logs
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateBuildLogsResponse'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TemplateBuildLogsResponse"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/templates/tags:
post:
+ summary: Assign template tags
description: Assign tag(s) to a template build
tags: [tags]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/AssignTemplateTagsRequest'
+ $ref: "#/components/schemas/AssignTemplateTagsRequest"
responses:
- '201':
+ "201":
description: Tag assigned successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/AssignedTemplateTags'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/AssignedTemplateTags"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
delete:
+ summary: Delete template tags
description: Delete multiple tags from templates
tags: [tags]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/DeleteTemplateTagsRequest'
+ $ref: "#/components/schemas/DeleteTemplateTagsRequest"
responses:
- '204':
+ "204":
description: Tags deleted successfully
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/templates/{templateID}/tags:
get:
+ summary: List template tags
description: List all tags for a template
tags: [tags]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/templateID'
+ - $ref: "#/components/parameters/templateID"
responses:
- '200':
+ "200":
description: Successfully returned the template tags
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/TemplateTag'
- '401':
- $ref: '#/components/responses/401'
- '403':
- $ref: '#/components/responses/403'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TemplateTag"
+ "401":
+ $ref: "#/components/responses/401"
+ "403":
+ $ref: "#/components/responses/403"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/templates/aliases/{alias}:
get:
+ summary: Check template alias
description: Check if template with given alias exists
tags: [templates]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- name: alias
in: path
@@ -3280,27 +3463,28 @@ paths:
type: string
description: Template alias
responses:
- '200':
+ "200":
description: Successfully queried template by alias
content:
application/json:
schema:
- $ref: '#/components/schemas/TemplateAliasResponse'
- '400':
- $ref: '#/components/responses/400'
- '403':
- $ref: '#/components/responses/403'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TemplateAliasResponse"
+ "400":
+ $ref: "#/components/responses/400"
+ "403":
+ $ref: "#/components/responses/403"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/nodes:
get:
+ summary: List nodes
description: List all nodes
tags: [admin]
security:
- - AdminTokenAuth: []
+ - AdminApiKeyAuth: []
parameters:
- in: query
name: clusterID
@@ -3310,28 +3494,28 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: Successfully returned all nodes
content:
application/json:
schema:
type: array
items:
- allOf:
- - $ref: '#/components/schemas/Node'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/Node"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/nodes/{nodeID}:
get:
+ summary: Node info
description: Get node info
tags: [admin]
security:
- - AdminTokenAuth: []
+ - AdminApiKeyAuth: []
parameters:
- - $ref: '#/components/parameters/nodeID'
+ - $ref: "#/components/parameters/nodeID"
- in: query
name: clusterID
description: Identifier of the cluster
@@ -3340,39 +3524,42 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: Successfully returned the node
content:
application/json:
schema:
- $ref: '#/components/schemas/NodeDetail'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/NodeDetail"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
post:
+ summary: Change node status
description: Change status of a node
tags: [admin]
security:
- - AdminTokenAuth: []
+ - AdminApiKeyAuth: []
parameters:
- - $ref: '#/components/parameters/nodeID'
+ - $ref: "#/components/parameters/nodeID"
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/NodeStatusChange'
+ $ref: "#/components/schemas/NodeStatusChange"
responses:
- '204':
+ "204":
description: The node status was changed successfully
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ "409":
+ $ref: "#/components/responses/409"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/admin/teams/{teamID}/sandboxes/kill:
post:
@@ -3380,7 +3567,7 @@ paths:
description: Kills all sandboxes for the specified team
tags: [admin]
security:
- - AdminTokenAuth: []
+ - AdminApiKeyAuth: []
parameters:
- name: teamID
in: path
@@ -3390,18 +3577,18 @@ paths:
format: uuid
description: Team ID
responses:
- '200':
+ "200":
description: Successfully killed sandboxes
content:
application/json:
schema:
- $ref: '#/components/schemas/AdminSandboxKillResult'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/AdminSandboxKillResult"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/admin/teams/{teamID}/builds/cancel:
post:
@@ -3409,7 +3596,7 @@ paths:
description: Cancels all in-progress and pending builds for the specified team
tags: [admin]
security:
- - AdminTokenAuth: []
+ - AdminApiKeyAuth: []
parameters:
- name: teamID
in: path
@@ -3419,18 +3606,18 @@ paths:
format: uuid
description: Team ID
responses:
- '200':
+ "200":
description: Successfully cancelled builds
content:
application/json:
schema:
- $ref: '#/components/schemas/AdminBuildCancelResult'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/AdminBuildCancelResult"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/admin/teams/{teamID}/api-keys:
post:
@@ -3438,7 +3625,7 @@ paths:
description: Creates a team API key for internal service workflows.
tags: [admin]
security:
- - AdminTokenAuth: []
+ - AdminApiKeyAuth: []
parameters:
- name: teamID
in: path
@@ -3452,24 +3639,24 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/NewTeamAPIKey'
+ $ref: "#/components/schemas/NewTeamAPIKey"
responses:
- '201':
+ "201":
description: Team API key created successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/CreatedTeamAPIKey'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '403':
- $ref: '#/components/responses/403'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/CreatedTeamAPIKey"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "403":
+ $ref: "#/components/responses/403"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/admin/teams/{teamID}/api-keys/{apiKeyID}:
delete:
@@ -3477,7 +3664,7 @@ paths:
description: Deletes a team API key for internal service workflows.
tags: [admin]
security:
- - AdminTokenAuth: []
+ - AdminApiKeyAuth: []
parameters:
- name: teamID
in: path
@@ -3486,91 +3673,94 @@ paths:
type: string
format: uuid
description: Team ID
- - $ref: '#/components/parameters/apiKeyID'
+ - $ref: "#/components/parameters/apiKeyID"
responses:
- '204':
+ "204":
description: Team API key deleted successfully
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/access-tokens:
post:
- description: Create a new access token
+ summary: Create access token
+ description: Create a new access token. Deprecated; use an API key (E2B_API_KEY) instead.
+ deprecated: true
tags: [access-tokens]
security:
- - Supabase1TokenAuth: []
- AuthProviderBearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/NewAccessToken'
+ $ref: "#/components/schemas/NewAccessToken"
responses:
- '201':
+ "201":
description: Access token created successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/CreatedAccessToken'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/CreatedAccessToken"
+ "401":
+ $ref: "#/components/responses/401"
+ "410":
+ $ref: "#/components/responses/410"
+ "500":
+ $ref: "#/components/responses/500"
/access-tokens/{accessTokenID}:
delete:
+ summary: Delete access token
description: Delete an access token
tags: [access-tokens]
security:
- - Supabase1TokenAuth: []
- AuthProviderBearerAuth: []
parameters:
- - $ref: '#/components/parameters/accessTokenID'
+ - $ref: "#/components/parameters/accessTokenID"
responses:
- '204':
+ "204":
description: Access token deleted successfully
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/api-keys:
get:
+ summary: List team API keys
description: List all team API keys
tags: [api-keys]
security:
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
responses:
- '200':
+ "200":
description: Successfully returned all team API keys
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/TeamAPIKey'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/TeamAPIKey"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
post:
+ summary: Create team API key
description: Create a new team API key
tags: [api-keys]
security:
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
requestBody:
@@ -3578,161 +3768,167 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/NewTeamAPIKey'
+ $ref: "#/components/schemas/NewTeamAPIKey"
responses:
- '201':
+ "201":
description: Team API key created successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/CreatedTeamAPIKey'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/CreatedTeamAPIKey"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/api-keys/{apiKeyID}:
patch:
+ summary: Update team API key
description: Update a team API key
tags: [api-keys]
security:
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/apiKeyID'
+ - $ref: "#/components/parameters/apiKeyID"
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/UpdateTeamAPIKey'
+ $ref: "#/components/schemas/UpdateTeamAPIKey"
responses:
- '200':
+ "200":
description: Team API key updated successfully
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
delete:
+ summary: Delete team API key
description: Delete a team API key
tags: [api-keys]
security:
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/apiKeyID'
+ - $ref: "#/components/parameters/apiKeyID"
responses:
- '204':
+ "204":
description: Team API key deleted successfully
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
/volumes:
get:
+ summary: List team volumes
description: List all team volumes
tags: [volumes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
responses:
- '200':
+ "200":
description: Successfully listed all team volumes
content:
application/json:
schema:
type: array
items:
- $ref: '#/components/schemas/Volume'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/Volume"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
post:
+ summary: Create team volume
description: Create a new team volume
tags: [volumes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/NewVolume'
+ $ref: "#/components/schemas/NewVolume"
responses:
- '201':
+ "201":
description: Successfully created a new team volume
content:
application/json:
schema:
- $ref: '#/components/schemas/VolumeAndToken'
- '400':
- $ref: '#/components/responses/400'
- '401':
- $ref: '#/components/responses/401'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/VolumeAndToken"
+ "400":
+ $ref: "#/components/responses/400"
+ "401":
+ $ref: "#/components/responses/401"
+ "500":
+ $ref: "#/components/responses/500"
/volumes/{volumeID}:
get:
+ summary: Team volume
description: Get team volume info
tags: [volumes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/volumeID'
+ - $ref: "#/components/parameters/volumeID"
responses:
- '200':
+ "200":
description: Successfully retrieved a team volume
content:
application/json:
schema:
- $ref: '#/components/schemas/VolumeAndToken'
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ $ref: "#/components/schemas/VolumeAndToken"
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
delete:
+ summary: Delete team volume
description: Delete a team volume
tags: [volumes]
security:
- ApiKeyAuth: []
- - Supabase1TokenAuth: []
- Supabase2TeamAuth: []
- AuthProviderBearerAuth: []
AuthProviderTeamAuth: []
+ - AdminApiKeyAuth: []
+ AdminTeamAuth: []
parameters:
- - $ref: '#/components/parameters/volumeID'
+ - $ref: "#/components/parameters/volumeID"
responses:
- '204':
+ "204":
description: Successfully deleted a team volume
- '401':
- $ref: '#/components/responses/401'
- '404':
- $ref: '#/components/responses/404'
- '500':
- $ref: '#/components/responses/500'
+ "401":
+ $ref: "#/components/responses/401"
+ "404":
+ $ref: "#/components/responses/404"
+ "500":
+ $ref: "#/components/responses/500"
diff --git a/spec/package.json b/spec/package.json
deleted file mode 100644
index 47c7f6c6f..000000000
--- a/spec/package.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "@e2b/spec",
- "private": true,
- "scripts": {
- "lint": "prettier --check openapi.yml envd/envd.yaml",
- "format": "prettier --write openapi.yml envd/envd.yaml"
- },
- "devDependencies": {
- "prettier": "^3.3.3"
- }
-}
diff --git a/spec/remove_extra_tags.py b/spec/remove_extra_tags.py
deleted file mode 100644
index 7292a8e60..000000000
--- a/spec/remove_extra_tags.py
+++ /dev/null
@@ -1,45 +0,0 @@
-import os
-import sys
-
-import yaml
-
-# Get directory of this script
-directory = os.path.dirname(os.path.abspath(__file__))
-path = os.path.join(directory, "openapi.yml")
-
-# Load OpenAPI spec
-with open(path, "r") as file:
- spec = yaml.safe_load(file)
-
-tags_to_keep = sys.argv[1:] if len(sys.argv) > 1 else None
-filtered_paths = {}
-
-for path, methods in spec.get("paths", {}).items():
- # Store path-level parameters if they exist
- path_level_params = methods.get("parameters")
-
- for method, operation in methods.items():
- # Skip path-level parameters key as it's not a method
- if method == "parameters":
- continue
-
- if "tags" in operation:
- for tag in tags_to_keep:
- if tag in operation["tags"]:
- if path in filtered_paths:
- filtered_paths[path][method] = operation
- else:
- filtered_paths[path] = {method: operation}
- # Add path-level parameters if they exist
- if path_level_params:
- filtered_paths[path]["parameters"] = path_level_params
- break
-
-
-# Create a new spec with only the filtered paths
-filtered_spec = spec.copy()
-filtered_spec["paths"] = filtered_paths
-
-# Save the filtered spec
-with open(os.path.join(directory, "openapi_generated.yml"), "w") as file:
- yaml.dump(filtered_spec, file)