Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
feat(sdk): add dnsServers / dns_servers to the network config (#2013)
Ryan Sanae5a9fa618c3b
diff --git a/.changeset/dns-servers.md b/.changeset/dns-servers.mdnew file mode 100644index 000000000..705268cdc--- /dev/null+++ b/.changeset/dns-servers.md@@ -0,0 +1,6 @@+---+"e2b": minor+"@e2b/python-sdk": minor+---++Add `dnsServers` to the network options (`dns_servers` in Python): the DNS servers a sandbox can reach when `allowOut` contains a domain. Leave it out to allow the default, 8.8.8.8, pass a list of IPs to allow those instead, or pass `[]` to allow none. It only opens the firewall and doesn't change the sandbox's `/etc/resolv.conf`. `updateNetwork`/`update_network` reset it to the default when it is left out, like the other fields, and `getInfo`/`get_info` report it when set.diff --git a/packages/js-sdk/src/api/schema.gen.ts b/packages/js-sdk/src/api/schema.gen.tsindex 31285a5ca..a66dd5b35 100644--- a/packages/js-sdk/src/api/schema.gen.ts+++ b/packages/js-sdk/src/api/schema.gen.ts@@ -4,6 +4,48 @@*/export interface paths {+ "/default-templates": {+ parameters: {+ query?: never;+ header?: never;+ path?: never;+ cookie?: never;+ };+ /**+ * List default templates+ * @description Lists the platform's default templates, ordered by template ID. Deleted templates are left out. Templates that are not public are listed only to their own team and to admin callers. The build, resources and envd version are those of the newest ready build tagged `default`, the one a sandbox started from the template runs, and are zero or empty when there is none; `buildStatus` describes the newest build tagged `default` in any state. Usage fields (`spawnCount`, `buildCount`, `lastSpawnedAt`, `createdBy`) are reported only for the caller's own templates and to admin callers.+ */+ get: {+ parameters: {+ query?: never;+ header?: never;+ path?: never;+ cookie?: never;+ };+ requestBody?: never;+ responses: {+ /** @description Successfully returned the default templates */+ 200: {+ headers: {+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["Template"][];+ };+ };+ 401: components["responses"]["401"];+ 429: components["responses"]["429"];+ 500: components["responses"]["500"];+ };+ };+ put?: never;+ post?: never;+ delete?: never;+ options?: never;+ head?: never;+ patch?: never;+ trace?: never;+ };"/sandboxes": {parameters: {query?: never;@@ -47,7 +89,7 @@ export interface paths {/*** Create sandbox* @deprecated- * @description Create a sandbox from the template. Use POST /v2/sandboxes instead.+ * @description Create a sandbox from the template. All system communication with the sandbox is secured. Use POST /v2/sandboxes instead.*/post: {parameters: {@@ -1023,6 +1065,54 @@ export interface paths {patch?: never;trace?: never;};+ "/teams/{teamID}/limits": {+ parameters: {+ query?: never;+ header?: never;+ path?: never;+ cookie?: never;+ };+ /**+ * Get team limits+ * @description Returns the team's effective resource limits. A team-authenticated request may read only its own team.+ */+ get: {+ parameters: {+ query?: never;+ header?: never;+ path: {+ /** @description Identifier of the team, as its UUID or its public project ID (prj_) */+ teamID: components["parameters"]["teamID"];+ };+ cookie?: never;+ };+ requestBody?: never;+ responses: {+ /** @description Successfully returned the team limits */+ 200: {+ headers: {+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["TeamLimitsResponse"];+ };+ };+ 400: components["responses"]["400"];+ 401: components["responses"]["401"];+ 403: components["responses"]["403"];+ 404: components["responses"]["404"];+ 429: components["responses"]["429"];+ 500: components["responses"]["500"];+ };+ };+ put?: never;+ post?: never;+ delete?: never;+ options?: never;+ head?: never;+ patch?: never;+ trace?: never;+ };"/teams/{teamID}/metrics": {parameters: {query?: never;@@ -1127,6 +1217,54 @@ export interface paths {patch?: never;trace?: never;};+ "/teams/{teamID}/status": {+ parameters: {+ query?: never;+ header?: never;+ path?: never;+ cookie?: never;+ };+ /**+ * Get team access status+ * @description Returns whether the team is banned or blocked, and why it is blocked. A team-authenticated request may read only its own team.+ */+ get: {+ parameters: {+ query?: never;+ header?: never;+ path: {+ /** @description Identifier of the team, as its UUID or its public project ID (prj_) */+ teamID: components["parameters"]["teamID"];+ };+ cookie?: never;+ };+ requestBody?: never;+ responses: {+ /** @description Successfully returned the team access status */+ 200: {+ headers: {+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["TeamStatusResponse"];+ };+ };+ 400: components["responses"]["400"];+ 401: components["responses"]["401"];+ 403: components["responses"]["403"];+ 404: components["responses"]["404"];+ 429: components["responses"]["429"];+ 500: components["responses"]["500"];+ };+ };+ put?: never;+ post?: never;+ delete?: never;+ options?: never;+ head?: never;+ patch?: never;+ trace?: never;+ };"/templates": {parameters: {query?: never;@@ -1480,6 +1618,213 @@ export interface paths {patch?: never;trace?: never;};+ "/templates/{templateID}/tags/{tag}/assignments": {+ parameters: {+ query?: never;+ header?: never;+ path?: never;+ cookie?: never;+ };+ /**+ * List template tag assignments+ * @description Lists the ready assignments of one tag of the template, newest first, with keyset cursor pagination. Returns 404 when the template does not exist or belongs to another team.+ */+ get: {+ parameters: {+ query?: {+ /** @description Cursor returned by the previous list response in `assigned_at|assignment_id` format. */+ cursor?: components["parameters"]["tagAssignmentsCursor"];+ /** @description Maximum number of assignment rows to return per page. */+ limit?: components["parameters"]["tagAssignmentsLimit"];+ };+ header?: never;+ path: {+ tag: components["parameters"]["tag"];+ templateID: components["parameters"]["templateID"];+ };+ cookie?: never;+ };+ requestBody?: never;+ responses: {+ /** @description Successfully returned the tag assignments */+ 200: {+ headers: {+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["TemplateTagAssignmentsResponse"];+ };+ };+ 400: components["responses"]["400"];+ 401: components["responses"]["401"];+ 403: components["responses"]["403"];+ 404: components["responses"]["404"];+ 429: components["responses"]["429"];+ 500: components["responses"]["500"];+ };+ };+ put?: never;+ post?: never;+ delete?: never;+ options?: never;+ head?: never;+ patch?: never;+ trace?: never;+ };+ "/templates/{templateID}/tags/count": {+ parameters: {+ query?: never;+ header?: never;+ path?: never;+ cookie?: never;+ };+ /**+ * Count template tags+ * @description Returns the number of distinct tags of the template that have at least one ready build. Returns 404 when the template does not exist or belongs to another team.+ */+ get: {+ parameters: {+ query?: never;+ header?: never;+ path: {+ templateID: components["parameters"]["templateID"];+ };+ cookie?: never;+ };+ requestBody?: never;+ responses: {+ /** @description Successfully returned the tag count */+ 200: {+ headers: {+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["TemplateTagsCountResponse"];+ };+ };+ 401: components["responses"]["401"];+ 403: components["responses"]["403"];+ 404: components["responses"]["404"];+ 429: components["responses"]["429"];+ 500: components["responses"]["500"];+ };+ };+ put?: never;+ post?: never;+ delete?: never;+ options?: never;+ head?: never;+ patch?: never;+ trace?: never;+ };+ "/templates/{templateID}/tags/exists": {+ parameters: {+ query?: never;+ header?: never;+ path?: never;+ cookie?: never;+ };+ /**+ * Check template tag+ * @description Checks whether a tag of the template has at least one ready build. Returns 404 when the template does not exist or belongs to another team.+ */+ get: {+ parameters: {+ query: {+ /** @description Template tag name to check. */+ tag: components["parameters"]["tagQuery"];+ };+ header?: never;+ path: {+ templateID: components["parameters"]["templateID"];+ };+ cookie?: never;+ };+ requestBody?: never;+ responses: {+ /** @description Successfully checked the tag */+ 200: {+ headers: {+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["TemplateTagExistsResponse"];+ };+ };+ 400: components["responses"]["400"];+ 401: components["responses"]["401"];+ 403: components["responses"]["403"];+ 404: components["responses"]["404"];+ 429: components["responses"]["429"];+ 500: components["responses"]["500"];+ };+ };+ put?: never;+ post?: never;+ delete?: never;+ options?: never;+ head?: never;+ patch?: never;+ trace?: never;+ };+ "/templates/{templateID}/tags/groups": {+ parameters: {+ query?: never;+ header?: never;+ path?: never;+ cookie?: never;+ };+ /**+ * List template tag groups+ * @description Lists the template's tags that have at least one ready build, each with its most recent ready assignments, paginated over tags with a keyset cursor. Returns 404 when the template does not exist or belongs to another team.+ */+ get: {+ parameters: {+ query?: {+ /** @description Maximum number of ready assignment rows to return per tag. */+ assignmentLimit?: components["parameters"]["tagAssignmentLimit"];+ /** @description Substring filter on tag name. Allowed characters are `a-z`, `0-9`, `.`, `_`, `-`. */+ search?: components["parameters"]["tagGroupsSearch"];+ /** @description Sort order for the returned tag groups. */+ sort?: components["parameters"]["tagGroupsSort"];+ /** @description Cursor returned by the previous list response in `{sort}|{latest_assigned_at}|{tag}` format (sort-tagged, RFC3339Nano). */+ tagsCursor?: components["parameters"]["tagGroupsCursor"];+ /** @description Maximum number of distinct tags to return per page. */+ tagsLimit?: components["parameters"]["tagGroupsLimit"];+ };+ header?: never;+ path: {+ templateID: components["parameters"]["templateID"];+ };+ cookie?: never;+ };+ requestBody?: never;+ responses: {+ /** @description Successfully returned template tag groups */+ 200: {+ headers: {+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["TemplateTagGroupsResponse"];+ };+ };+ 400: components["responses"]["400"];+ 401: components["responses"]["401"];+ 403: components["responses"]["403"];+ 404: components["responses"]["404"];+ 429: components["responses"]["429"];+ 500: components["responses"]["500"];+ };+ };+ put?: never;+ post?: never;+ delete?: never;+ options?: never;+ head?: never;+ patch?: never;+ trace?: never;+ };"/templates/aliases/{alias}": {parameters: {query?: never;@@ -1664,7 +2009,18 @@ export interface paths {post: {parameters: {query?: never;- header?: never;+ header?: {+ /**+ * @description Optional team-scoped key for retrying sandbox creation. Use 1 to 255 lowercase ASCII+ * letters, digits, or hyphens (a-z, 0-9, -), such as a lowercase UUID. When idempotency is enabled,+ * matching retries replay the original status and body, including errors, for the retention period.+ * Different request parameters return 409 with error_code idempotency_request_mismatch.+ * An in-progress request returns 409 with error_code idempotency_in_progress; an unknown+ * outcome returns 422 with error_code idempotency_outcome_unknown. These retries do not execute the request again.+ * Retries do not extend retention. After the key expires, it can start a new creation.+ */+ "Idempotency-Key"?: string;+ };path?: never;cookie?: never;};@@ -1683,12 +2039,102 @@ export interface paths {"application/json": components["schemas"]["Sandbox"];};};- 400: components["responses"]["400"];+ /** @description Bad request */+ 400: {+ headers: {+ "Should-Retry": components["headers"]["ShouldRetry"];+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["Error"];+ };+ };401: components["responses"]["401"];- 429: components["responses"]["429"];- 500: components["responses"]["500"];- 503: components["responses"]["503"];- 504: components["responses"]["504"];+ /** @description Forbidden */+ 403: {+ headers: {+ "Should-Retry": components["headers"]["ShouldRetry"];+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["Error"];+ };+ };+ /** @description Not found */+ 404: {+ headers: {+ "Should-Retry": components["headers"]["ShouldRetry"];+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["Error"];+ };+ };+ /** @description The Idempotency-Key conflicts with a different request (error_code idempotency_request_mismatch), or the matching original request has no recorded response yet and is within its expected response window (error_code idempotency_in_progress); this request was not executed again */+ 409: {+ headers: {+ "Should-Retry": components["headers"]["ShouldRetry"];+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["Error"];+ };+ };+ /** @description The matching original request has no recorded response and its expected response deadline has passed or is unknown (error_code idempotency_outcome_unknown); this request was not executed again */+ 422: {+ headers: {+ "Should-Retry": components["headers"]["ShouldRetry"];+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["Error"];+ };+ };+ /** @description Too many requests */+ 429: {+ headers: {+ /**+ * @description When present, the number of seconds to wait before retrying the request.+ * @example 30+ */+ "Retry-After"?: number;+ "Should-Retry": components["headers"]["ShouldRetry"];+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["Error"];+ };+ };+ /** @description Server error */+ 500: {+ headers: {+ "Should-Retry": components["headers"]["ShouldRetry"];+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["Error"];+ };+ };+ /** @description Service unavailable */+ 503: {+ headers: {+ "Should-Retry": components["headers"]["ShouldRetry"];+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["Error"];+ };+ };+ /** @description Backend timeout */+ 504: {+ headers: {+ "Should-Retry": components["headers"]["ShouldRetry"];+ [name: string]: unknown;+ };+ content: {+ "application/json": components["schemas"]["Error"];+ };+ };};};delete?: never;@@ -2258,7 +2704,7 @@ export interface components {* @description Error code*/code: number;- /** @description Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed, internal_server_error, secret_limit_reached. */+ /** @description Machine-readable semantic error code. Not a closed set; initial values: sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress, idempotency_outcome_unknown. */error_code?: string;/** @description Error */message: string;@@ -2378,7 +2824,10 @@ export interface components {mcp?: components["schemas"]["Mcp"];metadata?: components["schemas"]["SandboxMetadata"];network?: components["schemas"]["SandboxNetworkConfig"];- /** @description Secure all system communication with sandbox */+ /**+ * @deprecated+ * @description Ignored. All system communication with the sandbox is always secured; the template's envd version must support secured access.+ */secure?: boolean;/** @description Identifier of the required template */templateID: string;@@ -2507,6 +2956,7 @@ export interface components {memoryMB: components["schemas"]["MemoryMB"];metadata?: components["schemas"]["SandboxMetadata"];network?: components["schemas"]["SandboxNetworkConfig"];+ pauseMode?: components["schemas"]["SandboxPauseMode"];/** @description Identifier of the sandbox */sandboxID: string;/**@@ -2671,7 +3121,7 @@ export interface components {timestampUnix: number;};SandboxNetworkConfig: {- /** @description 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. */+ /** @description 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. When allowOut contains a domain, the servers in dnsServers (8.8.8.8 by default) are also allowed. */allowOut?: string[];/*** @description Specify if the sandbox URLs should be accessible only with authentication.@@ -2680,6 +3130,8 @@ export interface components {allowPublicTraffic?: boolean;/** @description List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules. */denyOut?: string[];+ /** @description DNS servers the sandbox can reach when allowOut contains a domain. Each entry must be an IPv4 address, and all traffic to it is allowed. Omit it to allow the default nameserver 8.8.8.8, or pass an empty list to allow none. This does not change the sandbox's /etc/resolv.conf. */+ dnsServers?: string[];egressProxy?: components["schemas"]["SandboxEgressProxyConfig"];/** @description Sandbox ports that serve HTTPS rather than plaintext HTTP. Affects how the proxy reaches the service inside the sandbox; the public URL is HTTPS either way. Certificates are not verified, so self-signed ones work. The envd port (49983) cannot be listed. */httpsPorts?: number[];@@ -2705,10 +3157,12 @@ export interface components {SandboxNetworkUpdateConfig: {/** @description 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_internet_access?: boolean;- /** @description 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. */+ /** @description 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. When allowOut contains a domain, the servers in dnsServers (8.8.8.8 by default) are also allowed. */allowOut?: string[];/** @description List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules. */denyOut?: string[];+ /** @description DNS servers the sandbox can reach when allowOut contains a domain. Each entry must be an IPv4 address, and all traffic to it is allowed. Omit it to reset to the default nameserver 8.8.8.8, or pass an empty list to allow none. This does not change the sandbox's /etc/resolv.conf. */+ dnsServers?: string[];egressProxy?: components["schemas"]["SandboxEgressProxyConfig"];/** @description Per-domain transform rules applied to matching outbound HTTPS requests. Replaces all existing rules when provided. Keys may be exact DNS names or a single leading wildcard (for example, "*.example.com"), and are normalized to lowercase on write. Wildcards match subdomains at any depth but not the apex domain; a bare "*" is invalid. Exact rules take precedence, followed by the longest matching wildcard suffix, and matching rule sets are not merged. Broad wildcards such as "*.com" are allowed and may expose transformed credentials to every matching destination the sandbox contacts. Rules do not grant network access; configure allowOut separately to permit the destination. */rules?: {@@ -2720,6 +3174,11 @@ export interface components {* @enum {string}*/SandboxOnTimeout: "kill" | "pause";+ /**+ * @description What the sandbox's latest pause saved. `full` saved the filesystem and the memory, and resuming restores the sandbox where it left off. `filesystem` saved only the filesystem, and resuming reboots the sandbox from disk. Returned for a paused sandbox once its pause has finished, and omitted while it is still pausing.+ * @enum {string}+ */+ SandboxPauseMode: "full" | "filesystem";SandboxPauseRequest: {/*** @description Whether to capture a full memory snapshot. When false, only the filesystem is persisted and resuming the sandbox cold-boots (reboots) it from disk, losing in-memory state, running processes, and open connections. Resume it with an explicit request (connect or resume); auto-resume, which can be triggered by arbitrary traffic, refuses such a sandbox. Defaults to true.@@ -2803,6 +3262,67 @@ export interface components {/** @description Identifier of the team */teamID: string;};+ /** @description The team's effective resource limits */+ TeamLimits: {+ /**+ * Format: int64+ * @description Requests per second the team may make to delete endpoints+ */+ apiTeamRpsDelete: number;+ /**+ * Format: int64+ * @description Requests per second the team may make to list endpoints+ */+ apiTeamRpsList: number;+ /**+ * Format: int64+ * @description Maximum number of sandboxes running at once+ */+ concurrentSandboxes: number;+ /**+ * Format: int64+ * @description Maximum number of template builds running at once+ */+ concurrentTemplateBuilds: number;+ /**+ * Format: int64+ * @description Free disk space a template build gets when it requests none, in MiB+ */+ defaultFreeDiskSizeMb: number;+ /**+ * Format: int64+ * @description Disk size per sandbox, in MiB+ */+ diskMb: number;+ /**+ * Format: int64+ * @description Number of days sandbox events are kept+ */+ eventsTtlDays: number;+ /**+ * Format: int64+ * @description Maximum free disk space a template build may request, in MiB+ */+ maxFreeDiskSizeMb: number;+ /**+ * Format: int64+ * @description Maximum sandbox lifetime, in hours+ */+ maxLengthHours: number;+ /**+ * Format: int64+ * @description Maximum memory per sandbox, in MiB+ */+ maxRamMb: number;+ /**+ * Format: int64+ * @description Maximum vCPUs per sandbox+ */+ maxVcpu: number;+ };+ TeamLimitsResponse: {+ limits: components["schemas"]["TeamLimits"];+ };/** @description Team metric with timestamp */TeamMetric: {/**@@ -2827,6 +3347,14 @@ export interface components {*/timestampUnix: number;};+ TeamStatusResponse: {+ /** @description Why the team is blocked, if a reason was recorded */+ blockedReason: string | null;+ /** @description Whether the team is banned */+ isBanned: boolean;+ /** @description Whether the team is blocked */+ isBlocked: boolean;+ };TeamUser: {/*** @deprecated@@ -2861,8 +3389,12 @@ export interface components {*/createdAt: string;createdBy: components["schemas"]["TeamUser"] | null;+ /** @description Description of the template */+ description?: string;diskSizeMB: components["schemas"]["DiskSizeMB"];envdVersion: components["schemas"]["EnvdVersion"];+ /** @description Whether the template is one of the platform's default templates. A default template owned by another team carries zero or null usage fields (`spawnCount`, `buildCount`, `lastSpawnedAt`, `createdBy`). */+ isDefault?: boolean;/*** Format: date-time* @description Time when the template was last used@@ -3049,48 +3581,76 @@ export interface components {/** @description The tag name */tag: string;};- TemplateUpdateRequest: {- /** @description Whether the template is public or only accessible by the team */- public?: boolean;- };- TemplateUpdateResponse: {- /** @description Names of the template (namespace/alias format when namespaced) */- names: string[];- };- TemplateWithBuilds: {+ TemplateTagAssignment: {/**- * @deprecated- * @description Aliases of the template+ * Format: date-time+ * @description Time when the tag was assigned to the build.*/- aliases: string[];- /** @description List of builds for the template */- builds: components["schemas"]["TemplateBuild"][];+ assignedAt: string;/**- * Format: date-time- * @description Time when the template was created+ * Format: uuid+ * @description Identifier of the tag assignment event.*/- createdAt: string;+ assignmentId: string;/*** Format: date-time- * @description Time when the template was last used+ * @description Time when the assigned build was created.*/- lastSpawnedAt: string | null;- /** @description Names of the template (namespace/alias format when namespaced) */- names: string[];- /** @description Whether the template is public or only accessible by the team */- public: boolean;+ buildCreatedAt: string;/**- * Format: int64- * @description Number of times the template was used+ * Format: date-time+ * @description Time when the assigned build finished.*/- spawnCount: number;- /** @description Identifier of the template */- templateID: string;+ buildFinishedAt: string | null;/**- * Format: date-time- * @description Time when the template was last updated+ * Format: uuid+ * @description Identifier of the assigned build.+ */+ buildId: string;+ };+ TemplateTagAssignmentsResponse: {+ /** @description Ready assignment events for the tag, sorted latest first. */+ data: components["schemas"]["TemplateTagAssignment"][];+ /** @description Cursor to pass to the next list request, or `null` if there is no next page. */+ nextCursor: string | null;+ };+ TemplateTagExistsResponse: {+ /** @description Whether the template tag has at least one ready assignment. */+ exists: boolean;+ /** @description Normalized template tag name. */+ normalizedTag: string;+ };+ TemplateTagGroup: {+ /** @description Ready assignment events for this tag, sorted latest first. */+ assignments: components["schemas"]["TemplateTagAssignment"][];+ /** @description Whether more ready assignment events exist beyond the requested assignment limit. */+ hasMore: boolean;+ /** @description Template tag name. */+ tag: string;+ };+ TemplateTagGroupsResponse: {+ /** @description Cursor to pass as `tagsCursor` for the next page, or `null` if there is no next page. */+ nextCursor: string | null;+ tags: components["schemas"]["TemplateTagGroup"][];+ };+ TemplateTagsCountResponse: {+ /**+ * Format: int64+ * @description Total distinct ready tags for the template.*/- updatedAt: string;+ total: number;+ };+ TemplateUpdateRequest: {+ /** @description Whether the template is public or only accessible by the team */+ public?: boolean;+ };+ TemplateUpdateResponse: {+ /** @description Names of the template (namespace/alias format when namespaced) */+ names: string[];+ };+ TemplateWithBuilds: components["schemas"]["Template"] & {+ /** @description List of builds for the template */+ builds: components["schemas"]["TemplateBuild"][];};Volume: {/** @description Name of the volume */@@ -3219,6 +3779,23 @@ export interface components {paginationNextToken: string;sandboxID: string;secretID: string;+ tag: string;+ /** @description Maximum number of ready assignment rows to return per tag. */+ tagAssignmentLimit: number;+ /** @description Cursor returned by the previous list response in `assigned_at|assignment_id` format. */+ tagAssignmentsCursor: string;+ /** @description Maximum number of assignment rows to return per page. */+ tagAssignmentsLimit: number;+ /** @description Cursor returned by the previous list response in `{sort}|{latest_assigned_at}|{tag}` format (sort-tagged, RFC3339Nano). */+ tagGroupsCursor: string;+ /** @description Maximum number of distinct tags to return per page. */+ tagGroupsLimit: number;+ /** @description Substring filter on tag name. Allowed characters are `a-z`, `0-9`, `.`, `_`, `-`. */+ tagGroupsSearch: string;+ /** @description Sort order for the returned tag groups. */+ tagGroupsSort: "latest_desc" | "latest_asc" | "name_asc" | "name_desc";+ /** @description Template tag name to check. */+ tagQuery: string;/** @description Identifier of the team, as its UUID or its public project ID (prj_) */teamID: string;templateID: string;@@ -3226,6 +3803,16 @@ export interface components {};requestBodies: never;headers: {+ /**+ * @description Whether the condition behind this error may clear, so that retrying the request could+ * succeed. true marks a transient failure such as missing capacity, a rate limit, or a+ * creation still in progress: retry after Retry-After when present, otherwise with+ * exponential backoff. false marks a failure a retry cannot fix, such as a malformed request+ * or a configuration fault, or an outcome that is unknown, where a retry could create a+ * second sandbox. Successful responses and errors without an explicit classification omit+ * the header.+ */+ ShouldRetry: boolean;/** @description Cursor to fetch the next page of results, if more exist */XNextToken: string;/** @description Number of running sandboxes matching the filters, before pagination is applied. Only present when running sandboxes were requested. */diff --git a/packages/js-sdk/src/sandbox/sandboxApi.ts b/packages/js-sdk/src/sandbox/sandboxApi.tsindex a7025be4c..c5af5b116 100644--- a/packages/js-sdk/src/sandbox/sandboxApi.ts+++ b/packages/js-sdk/src/sandbox/sandboxApi.ts@@ -344,6 +344,35 @@ export type SandboxNetworkOpts = {*/egressProxy?: SandboxEgressProxyOpts+ /**+ * DNS servers the sandbox can reach when {@link allowOut} contains a+ * domain. Each entry must be an IPv4 address (up to 10 entries), and all traffic to it is+ * allowed.+ *+ * Leave it out to allow the default nameserver `8.8.8.8`. Pass a list to+ * allow those servers instead, or `[]` to allow none. Allowed domains still+ * work without a reachable server, since they are matched by name, not by+ * IP; add the names you need to `/etc/hosts`.+ *+ * This only opens the firewall. It does not change the sandbox's+ * `/etc/resolv.conf`, which still points at `8.8.8.8`, so write your own+ * servers there too. With no domain in {@link allowOut} it has no effect.+ *+ * @default ['8.8.8.8']+ *+ * @example+ * ```ts+ * await Sandbox.create({+ * network: {+ * allowOut: ['api.example.com'],+ * denyOut: ({ allTraffic }) => [allTraffic],+ * dnsServers: ['1.1.1.1'],+ * },+ * })+ * ```+ */+ dnsServers?: string[]+/*** Specify if the sandbox URLs should be accessible only with authentication.* @default true@@ -388,6 +417,12 @@ export type SandboxNetworkInfo = {* is missing.*/egressProxy?: SandboxEgressProxyInfo+ /**+ * DNS servers the sandbox can reach when `allowOut` contains a domain. See+ * {@link SandboxNetworkOpts.dnsServers}. Missing means the default,+ * `8.8.8.8`.+ */+ dnsServers?: string[]allowPublicTraffic?: booleanmaskRequestHost?: stringhttpsPorts?: number[]@@ -424,6 +459,12 @@ export type SandboxNetworkUpdate = {* `address` but omits `tls` keeps tunneling without TLS.*/egressProxy?: SandboxEgressProxyOpts+ /**+ * See {@link SandboxNetworkOpts.dnsServers}. Leaving it out resets it to+ * the default, `8.8.8.8`, like the other fields, so repeat a custom list in+ * every update that should keep it.+ */+ dnsServers?: string[]/*** Allow sandbox to access the internet. When set to `false`, it behaves the* same as specifying `denyOut: ['0.0.0.0/0']` in the network config.@@ -1243,6 +1284,7 @@ type NetworkEgressBody = {allowOut?: string[]denyOut?: string[]egressProxy?: components['schemas']['SandboxEgressProxyConfig']+ dnsServers?: string[]rules?: Record<string, { transform?: SandboxNetworkTransform }[]>}@@ -1251,6 +1293,7 @@ function buildNetworkEgress(allowOut?: SandboxNetworkSelectordenyOut?: SandboxNetworkSelectoregressProxy?: SandboxEgressProxyOpts+ dnsServers?: string[]rules?: SandboxNetworkRules},transformContext: SandboxNetworkTransformContext@@ -1271,6 +1314,11 @@ function buildNetworkEgress(...(network.egressProxy != null? { egressProxy: buildEgressProxyBody(network.egressProxy) }: {}),+ // `!= null` so an empty list is sent (it means "no DNS server") and an+ // explicit null means "not set", like Python.+ ...(network.dnsServers != null+ ? { dnsServers: [...network.dnsServers] }+ : {}),...(network.rules !== undefined? { rules: resolveRulesForBody(rules, transformContext) }: {}),@@ -1488,6 +1536,10 @@ export class SandboxApi extends ClientFactory {denyOut: res.data.network.denyOut,rules: res.data.network.rules ?? undefined,egressProxy: fromApiEgressProxy(res.data.network.egressProxy),+ // Only set when the API returns it, so a missing list stays missing.+ ...(res.data.network.dnsServers !== undefined+ ? { dnsServers: res.data.network.dnsServers }+ : {}),allowPublicTraffic: res.data.network.allowPublicTraffic,maskRequestHost: res.data.network.maskRequestHost,httpsPorts: res.data.network.httpsPorts,diff --git a/packages/js-sdk/tests/sandbox/dnsServers.test.ts b/packages/js-sdk/tests/sandbox/dnsServers.test.tsnew file mode 100644index 000000000..9d4e07bf2--- /dev/null+++ b/packages/js-sdk/tests/sandbox/dnsServers.test.ts@@ -0,0 +1,143 @@+import { afterAll, afterEach, beforeAll, expect, test } from 'vitest'+import { http, HttpResponse } from 'msw'++import { Sandbox } from '../../src'+import { TEST_API_KEY, apiUrl } from '../setup'+import { setupMockApi } from '../mockApi'++const sandboxId = 'test-sandbox-id'++let lastCreateBody: Record<string, any> | undefined+let lastUpdateBody: Record<string, any> | undefined+let sandboxNetwork: Record<string, any> | undefined++const server = setupMockApi(+ http.post(apiUrl('/v2/sandboxes'), async ({ request }) => {+ lastCreateBody = (await request.json()) as Record<string, any>+ return HttpResponse.json({+ sandboxID: sandboxId,+ templateID: 'base',+ envdVersion: '0.2.4',+ })+ }),+ http.put(apiUrl(`/sandboxes/${sandboxId}/network`), async ({ request }) => {+ lastUpdateBody = (await request.json()) as Record<string, any>+ return new HttpResponse(null, { status: 204 })+ }),+ http.get(apiUrl(`/sandboxes/${sandboxId}`), () =>+ HttpResponse.json({+ sandboxID: sandboxId,+ templateID: 'base',+ clientID: 'test-client',+ envdVersion: '0.2.4',+ startedAt: '2026-01-01T00:00:00Z',+ endAt: '2026-01-01T01:00:00Z',+ state: 'running',+ cpuCount: 2,+ memoryMB: 512,+ diskSizeMB: 1024,+ network: sandboxNetwork,+ })+ )+)++beforeAll(() => server.listen({ onUnhandledRequest: 'error' }))++afterAll(() => server.close())++afterEach(() => {+ lastCreateBody = undefined+ lastUpdateBody = undefined+ sandboxNetwork = undefined+ server.resetHandlers()+})++test.for([[], ['1.1.1.1'], ['1.1.1.1', '9.9.9.9']])(+ 'Sandbox.create sends dnsServers: %j',+ async (dnsServers) => {+ await Sandbox.create('base', {+ apiKey: TEST_API_KEY,+ network: {+ allowOut: ['api.example.com'],+ denyOut: ({ allTraffic }) => [allTraffic],+ dnsServers,+ },+ })++ expect(lastCreateBody?.network).toEqual({+ allowOut: ['api.example.com'],+ denyOut: ['0.0.0.0/0'],+ dnsServers,+ })+ }+)++test('Sandbox.create omits dnsServers when not provided', async () => {+ await Sandbox.create('base', {+ apiKey: TEST_API_KEY,+ network: { allowOut: ['api.example.com'] },+ })++ expect(lastCreateBody?.network).toEqual({ allowOut: ['api.example.com'] })+})++test.for([[], ['1.1.1.1']])(+ 'updateNetwork sends dnsServers: %j',+ async (dnsServers) => {+ await Sandbox.updateNetwork(+ sandboxId,+ { allowOut: ['api.example.com'], dnsServers },+ { apiKey: TEST_API_KEY }+ )++ expect(lastUpdateBody).toEqual({+ allowOut: ['api.example.com'],+ dnsServers,+ })+ }+)++test('updateNetwork omits dnsServers when not provided', async () => {+ await Sandbox.updateNetwork(+ sandboxId,+ { allowOut: ['api.example.com'] },+ { apiKey: TEST_API_KEY }+ )++ expect(lastUpdateBody).toEqual({ allowOut: ['api.example.com'] })+})++test('a null dnsServers is treated as not set', async () => {+ await Sandbox.create('base', {+ apiKey: TEST_API_KEY,+ network: { allowOut: ['api.example.com'], dnsServers: null as any },+ })+ expect(lastCreateBody?.network).toEqual({ allowOut: ['api.example.com'] })++ await Sandbox.updateNetwork(+ sandboxId,+ { allowOut: ['api.example.com'], dnsServers: null as any },+ { apiKey: TEST_API_KEY }+ )+ expect(lastUpdateBody).toEqual({ allowOut: ['api.example.com'] })+})++test.for([[], ['1.1.1.1']])(+ 'getInfo reports dnsServers: %j',+ async (dnsServers) => {+ sandboxNetwork = { allowOut: ['api.example.com'], dnsServers }++ const info = await Sandbox.getInfo(sandboxId, { apiKey: TEST_API_KEY })++ expect(info.network?.dnsServers).toEqual(dnsServers)+ }+)++test('getInfo leaves dnsServers unset when the API omits it', async () => {+ sandboxNetwork = { allowOut: ['api.example.com'] }++ const info = await Sandbox.getInfo(sandboxId, { apiKey: TEST_API_KEY })++ expect(info.network).toBeDefined()+ expect(info.network).not.toHaveProperty('dnsServers')+})diff --git a/packages/js-sdk/tests/sandbox/network.test.ts b/packages/js-sdk/tests/sandbox/network.test.tsindex 5fe6e2fb1..bb9fc27c2 100644--- a/packages/js-sdk/tests/sandbox/network.test.ts+++ b/packages/js-sdk/tests/sandbox/network.test.ts@@ -321,6 +321,160 @@ describe('updateNetwork clears existing rules when fields are omitted', () => {)})+// Sends one DNS query for example.com to `server` over UDP. Fails if no reply comes back.+const dnsProbeCmd = (server: string) => `python3 -c "+import socket+q = bytes.fromhex('abcd01000001000000000000076578616d706c6503636f6d0000010001')+s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)+s.settimeout(3)+s.sendto(q, ('${server}', 53))+s.recv(512)+"`++// These tests need an API that supports dnsServers. Call this on a sandbox+// created with dnsServers set: if getInfo doesn't report them back, skip.+async function skipUnlessDnsServersSupported(+ sandbox: Sandbox,+ skip: () => void+) {+ const info = await sandbox.getInfo()+ if (info.network?.dnsServers === undefined) skip()+}++describe('dnsServers: [] allows no DNS server for a domain allowlist', () => {+ sandboxTest.override({+ sandboxOpts: {+ network: {+ allowOut: ['example.com'],+ denyOut: ({ allTraffic }) => [allTraffic],+ dnsServers: [],+ },+ },+ })++ sandboxTest.skipIf(isDebug)(+ 'blocks 8.8.8.8 and keeps the allowed domain reachable',+ async ({ sandbox, skip }) => {+ await skipUnlessDnsServersSupported(sandbox, skip)++ await expect(+ sandbox.commands.run(dnsProbeCmd('8.8.8.8'))+ ).rejects.toBeInstanceOf(CommandExitError)+ await expect(+ sandbox.commands.run(+ 'curl --connect-timeout 3 --max-time 5 -Is https://8.8.8.8'+ )+ ).rejects.toBeInstanceOf(CommandExitError)++ // Allowed domains are matched by name, not by IP, so any public IP in+ // /etc/hosts works.+ await sandbox.commands.run("echo '1.1.1.1 example.com' >> /etc/hosts", {+ user: 'root',+ })+ const result = await sandbox.commands.run(+ "curl -s -o /dev/null -w '%{http_code}' https://example.com"+ )+ assert.equal(result.stdout.trim(), '200')++ const info = await sandbox.getInfo()+ assert.deepEqual(info.network?.dnsServers, [])+ },+ 60_000+ )+})++describe('dnsServers allows the listed servers instead of 8.8.8.8', () => {+ sandboxTest.override({+ sandboxOpts: {+ network: {+ allowOut: ['example.com'],+ denyOut: ({ allTraffic }) => [allTraffic],+ dnsServers: ['1.1.1.1'],+ },+ },+ })++ sandboxTest.skipIf(isDebug)(+ 'reaches 1.1.1.1 and blocks 8.8.8.8',+ async ({ sandbox, skip }) => {+ await skipUnlessDnsServersSupported(sandbox, skip)++ const result = await sandbox.commands.run(dnsProbeCmd('1.1.1.1'))+ assert.equal(result.exitCode, 0)+ await expect(+ sandbox.commands.run(dnsProbeCmd('8.8.8.8'))+ ).rejects.toBeInstanceOf(CommandExitError)++ const info = await sandbox.getInfo()+ assert.deepEqual(info.network?.dnsServers, ['1.1.1.1'])+ },+ 60_000+ )+})++describe('updateNetwork resets dnsServers when omitted', () => {+ sandboxTest.override({+ sandboxOpts: {+ network: {+ allowOut: ['example.com'],+ denyOut: ({ allTraffic }) => [allTraffic],+ dnsServers: [],+ },+ },+ })++ sandboxTest.skipIf(isDebug)(+ 'goes back to 8.8.8.8 when the field is left out',+ async ({ sandbox, skip }) => {+ await skipUnlessDnsServersSupported(sandbox, skip)++ const network = {+ allowOut: ['example.com'],+ denyOut: ['0.0.0.0/0'],+ }++ // Left out, so it goes back to the default (8.8.8.8).+ await sandbox.updateNetwork(network)+ const reset = await sandbox.commands.run(dnsProbeCmd('8.8.8.8'))+ assert.equal(reset.exitCode, 0)+ const info = await sandbox.getInfo()+ assert.isUndefined(info.network?.dnsServers)++ await sandbox.updateNetwork({ ...network, dnsServers: [] })+ await expect(+ sandbox.commands.run(dnsProbeCmd('8.8.8.8'))+ ).rejects.toBeInstanceOf(CommandExitError)++ await sandbox.updateNetwork({ ...network, dnsServers: ['8.8.8.8'] })+ const reopened = await sandbox.commands.run(dnsProbeCmd('8.8.8.8'))+ assert.equal(reopened.exitCode, 0)+ },+ 60_000+ )+})++describe('a domain allowlist allows 8.8.8.8 by default', () => {+ sandboxTest.override({+ sandboxOpts: {+ network: {+ allowOut: ['example.com'],+ denyOut: ({ allTraffic }) => [allTraffic],+ },+ },+ })++ sandboxTest.skipIf(isDebug)(+ 'resolves names through 8.8.8.8',+ async ({ sandbox }) => {+ const result = await sandbox.commands.run(dnsProbeCmd('8.8.8.8'))+ assert.equal(result.exitCode, 0)++ const info = await sandbox.getInfo()+ assert.isUndefined(info.network?.dnsServers)+ }+ )+})+describe('httpsPorts option', () => {const port = 8443diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_sandboxes.pyindex 3dec50541..9e58aded5 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@@ -85,7 +85,8 @@ def sync_detailed() -> Response[Union[Error, Sandbox]]:"""Create sandbox- Create a sandbox from the template. Use POST /v2/sandboxes instead.+ Create a sandbox from the template. All system communication with the sandbox is secured. Use POST+ /v2/sandboxes instead.Args:body (NewSandbox):@@ -116,7 +117,8 @@ def sync() -> Optional[Union[Error, Sandbox]]:"""Create sandbox- Create a sandbox from the template. Use POST /v2/sandboxes instead.+ Create a sandbox from the template. All system communication with the sandbox is secured. Use POST+ /v2/sandboxes instead.Args:body (NewSandbox):@@ -142,7 +144,8 @@ async def asyncio_detailed() -> Response[Union[Error, Sandbox]]:"""Create sandbox- Create a sandbox from the template. Use POST /v2/sandboxes instead.+ Create a sandbox from the template. All system communication with the sandbox is secured. Use POST+ /v2/sandboxes instead.Args:body (NewSandbox):@@ -171,7 +174,8 @@ async def asyncio() -> Optional[Union[Error, Sandbox]]:"""Create sandbox- Create a sandbox from the template. Use POST /v2/sandboxes instead.+ Create a sandbox from the template. All system communication with the sandbox is secured. Use POST+ /v2/sandboxes instead.Args:body (NewSandbox):diff --git a/packages/python-sdk/e2b/api/client/api/sandboxes/post_v2_sandboxes.py b/packages/python-sdk/e2b/api/client/api/sandboxes/post_v2_sandboxes.pyindex e2c75ac7d..5793a62aa 100644--- a/packages/python-sdk/e2b/api/client/api/sandboxes/post_v2_sandboxes.py+++ b/packages/python-sdk/e2b/api/client/api/sandboxes/post_v2_sandboxes.py@@ -8,14 +8,17 @@ from ...client import AuthenticatedClient, Clientfrom ...models.error import Errorfrom ...models.new_sandbox_v2 import NewSandboxV2from ...models.sandbox import Sandbox-from ...types import Response+from ...types import UNSET, Response, Unsetdef _get_kwargs(*,body: NewSandboxV2,+ idempotency_key: Union[Unset, str] = UNSET,) -> dict[str, Any]:headers: dict[str, Any] = {}+ if not isinstance(idempotency_key, Unset):+ headers["Idempotency-Key"] = idempotency_key_kwargs: dict[str, Any] = {"method": "post",@@ -45,6 +48,22 @@ def _parse_response(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 == 404:+ response_404 = Error.from_dict(response.json())++ return response_404+ if response.status_code == 409:+ response_409 = Error.from_dict(response.json())++ return response_409+ if response.status_code == 422:+ response_422 = Error.from_dict(response.json())++ return response_422if response.status_code == 429:response_429 = Error.from_dict(response.json())@@ -82,12 +101,14 @@ def sync_detailed(*,client: AuthenticatedClient,body: NewSandboxV2,+ idempotency_key: Union[Unset, str] = UNSET,) -> Response[Union[Error, Sandbox]]:"""Create sandbox (v2)Create a sandbox from the template. All system communication with the sandbox is secured.Args:+ idempotency_key (Union[Unset, str]):body (NewSandboxV2): Sandbox creation request. All system communication with the sandboxis always secured; the template's envd version must support secured access.@@ -101,6 +122,7 @@ def sync_detailed(kwargs = _get_kwargs(body=body,+ idempotency_key=idempotency_key,)response = client.get_httpx_client().request(@@ -114,12 +136,14 @@ def sync(*,client: AuthenticatedClient,body: NewSandboxV2,+ idempotency_key: Union[Unset, str] = UNSET,) -> Optional[Union[Error, Sandbox]]:"""Create sandbox (v2)Create a sandbox from the template. All system communication with the sandbox is secured.Args:+ idempotency_key (Union[Unset, str]):body (NewSandboxV2): Sandbox creation request. All system communication with the sandboxis always secured; the template's envd version must support secured access.@@ -134,6 +158,7 @@ def sync(return sync_detailed(client=client,body=body,+ idempotency_key=idempotency_key,).parsed@@ -141,12 +166,14 @@ async def asyncio_detailed(*,client: AuthenticatedClient,body: NewSandboxV2,+ idempotency_key: Union[Unset, str] = UNSET,) -> Response[Union[Error, Sandbox]]:"""Create sandbox (v2)Create a sandbox from the template. All system communication with the sandbox is secured.Args:+ idempotency_key (Union[Unset, str]):body (NewSandboxV2): Sandbox creation request. All system communication with the sandboxis always secured; the template's envd version must support secured access.@@ -160,6 +187,7 @@ async def asyncio_detailed(kwargs = _get_kwargs(body=body,+ idempotency_key=idempotency_key,)response = await client.get_async_httpx_client().request(**kwargs)@@ -171,12 +199,14 @@ async def asyncio(*,client: AuthenticatedClient,body: NewSandboxV2,+ idempotency_key: Union[Unset, str] = UNSET,) -> Optional[Union[Error, Sandbox]]:"""Create sandbox (v2)Create a sandbox from the template. All system communication with the sandbox is secured.Args:+ idempotency_key (Union[Unset, str]):body (NewSandboxV2): Sandbox creation request. All system communication with the sandboxis always secured; the template's envd version must support secured access.@@ -192,5 +222,6 @@ async def asyncio(await asyncio_detailed(client=client,body=body,+ idempotency_key=idempotency_key,)).parseddiff --git a/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags_count.py b/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags_count.pynew file mode 100644index 000000000..07668af82--- /dev/null+++ b/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags_count.py@@ -0,0 +1,183 @@+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_tags_count_response import TemplateTagsCountResponse+from ...types import Response+++def _get_kwargs(+ template_id: str,+) -> dict[str, Any]:+ _kwargs: dict[str, Any] = {+ "method": "get",+ "url": f"/templates/{template_id}/tags/count",+ }++ return _kwargs+++def _parse_response(+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response+) -> Optional[Union[Error, TemplateTagsCountResponse]]:+ if response.status_code == 200:+ response_200 = TemplateTagsCountResponse.from_dict(response.json())++ return response_200+ 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 == 404:+ response_404 = Error.from_dict(response.json())++ return response_404+ if response.status_code == 429:+ response_429 = Error.from_dict(response.json())++ return response_429+ 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, TemplateTagsCountResponse]]:+ return Response(+ status_code=HTTPStatus(response.status_code),+ content=response.content,+ headers=response.headers,+ parsed=_parse_response(client=client, response=response),+ )+++def sync_detailed(+ template_id: str,+ *,+ client: AuthenticatedClient,+) -> Response[Union[Error, TemplateTagsCountResponse]]:+ """Count template tags++ Returns the number of distinct tags of the template that have at least one ready build. Returns 404+ when the template does not exist or belongs to another team.++ Args:+ template_id (str):++ 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, TemplateTagsCountResponse]]+ """++ kwargs = _get_kwargs(+ template_id=template_id,+ )++ response = client.get_httpx_client().request(+ **kwargs,+ )++ return _build_response(client=client, response=response)+++def sync(+ template_id: str,+ *,+ client: AuthenticatedClient,+) -> Optional[Union[Error, TemplateTagsCountResponse]]:+ """Count template tags++ Returns the number of distinct tags of the template that have at least one ready build. Returns 404+ when the template does not exist or belongs to another team.++ Args:+ template_id (str):++ 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, TemplateTagsCountResponse]+ """++ return sync_detailed(+ template_id=template_id,+ client=client,+ ).parsed+++async def asyncio_detailed(+ template_id: str,+ *,+ client: AuthenticatedClient,+) -> Response[Union[Error, TemplateTagsCountResponse]]:+ """Count template tags++ Returns the number of distinct tags of the template that have at least one ready build. Returns 404+ when the template does not exist or belongs to another team.++ Args:+ template_id (str):++ 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, TemplateTagsCountResponse]]+ """++ kwargs = _get_kwargs(+ template_id=template_id,+ )++ response = await client.get_async_httpx_client().request(**kwargs)++ return _build_response(client=client, response=response)+++async def asyncio(+ template_id: str,+ *,+ client: AuthenticatedClient,+) -> Optional[Union[Error, TemplateTagsCountResponse]]:+ """Count template tags++ Returns the number of distinct tags of the template that have at least one ready build. Returns 404+ when the template does not exist or belongs to another team.++ Args:+ template_id (str):++ 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, TemplateTagsCountResponse]+ """++ return (+ await asyncio_detailed(+ template_id=template_id,+ client=client,+ )+ ).parseddiff --git a/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags_exists.py b/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags_exists.pynew file mode 100644index 000000000..e4745fbc0--- /dev/null+++ b/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags_exists.py@@ -0,0 +1,208 @@+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_tag_exists_response import TemplateTagExistsResponse+from ...types import UNSET, Response+++def _get_kwargs(+ template_id: str,+ *,+ tag: str,+) -> dict[str, Any]:+ params: dict[str, Any] = {}++ params["tag"] = tag++ 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": f"/templates/{template_id}/tags/exists",+ "params": params,+ }++ return _kwargs+++def _parse_response(+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response+) -> Optional[Union[Error, TemplateTagExistsResponse]]:+ if response.status_code == 200:+ response_200 = TemplateTagExistsResponse.from_dict(response.json())++ 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 == 404:+ response_404 = Error.from_dict(response.json())++ return response_404+ if response.status_code == 429:+ response_429 = Error.from_dict(response.json())++ return response_429+ 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, TemplateTagExistsResponse]]:+ return Response(+ status_code=HTTPStatus(response.status_code),+ content=response.content,+ headers=response.headers,+ parsed=_parse_response(client=client, response=response),+ )+++def sync_detailed(+ template_id: str,+ *,+ client: AuthenticatedClient,+ tag: str,+) -> Response[Union[Error, TemplateTagExistsResponse]]:+ """Check template tag++ Checks whether a tag of the template has at least one ready build. Returns 404 when the template+ does not exist or belongs to another team.++ Args:+ template_id (str):+ tag (str):++ 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, TemplateTagExistsResponse]]+ """++ kwargs = _get_kwargs(+ template_id=template_id,+ tag=tag,+ )++ response = client.get_httpx_client().request(+ **kwargs,+ )++ return _build_response(client=client, response=response)+++def sync(+ template_id: str,+ *,+ client: AuthenticatedClient,+ tag: str,+) -> Optional[Union[Error, TemplateTagExistsResponse]]:+ """Check template tag++ Checks whether a tag of the template has at least one ready build. Returns 404 when the template+ does not exist or belongs to another team.++ Args:+ template_id (str):+ tag (str):++ 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, TemplateTagExistsResponse]+ """++ return sync_detailed(+ template_id=template_id,+ client=client,+ tag=tag,+ ).parsed+++async def asyncio_detailed(+ template_id: str,+ *,+ client: AuthenticatedClient,+ tag: str,+) -> Response[Union[Error, TemplateTagExistsResponse]]:+ """Check template tag++ Checks whether a tag of the template has at least one ready build. Returns 404 when the template+ does not exist or belongs to another team.++ Args:+ template_id (str):+ tag (str):++ 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, TemplateTagExistsResponse]]+ """++ kwargs = _get_kwargs(+ template_id=template_id,+ tag=tag,+ )++ response = await client.get_async_httpx_client().request(**kwargs)++ return _build_response(client=client, response=response)+++async def asyncio(+ template_id: str,+ *,+ client: AuthenticatedClient,+ tag: str,+) -> Optional[Union[Error, TemplateTagExistsResponse]]:+ """Check template tag++ Checks whether a tag of the template has at least one ready build. Returns 404 when the template+ does not exist or belongs to another team.++ Args:+ template_id (str):+ tag (str):++ 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, TemplateTagExistsResponse]+ """++ return (+ await asyncio_detailed(+ template_id=template_id,+ client=client,+ tag=tag,+ )+ ).parseddiff --git a/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags_groups.py b/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags_groups.pynew file mode 100644index 000000000..4936b17d0--- /dev/null+++ b/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags_groups.py@@ -0,0 +1,293 @@+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.get_templates_template_id_tags_groups_sort import (+ GetTemplatesTemplateIDTagsGroupsSort,+)+from ...models.template_tag_groups_response import TemplateTagGroupsResponse+from ...types import UNSET, Response, Unset+++def _get_kwargs(+ template_id: str,+ *,+ assignment_limit: Union[Unset, int] = 6,+ tags_limit: Union[Unset, int] = 25,+ tags_cursor: Union[Unset, str] = UNSET,+ search: Union[Unset, str] = UNSET,+ sort: Union[+ Unset, GetTemplatesTemplateIDTagsGroupsSort+ ] = GetTemplatesTemplateIDTagsGroupsSort.LATEST_DESC,+) -> dict[str, Any]:+ params: dict[str, Any] = {}++ params["assignmentLimit"] = assignment_limit++ params["tagsLimit"] = tags_limit++ params["tagsCursor"] = tags_cursor++ params["search"] = search++ json_sort: Union[Unset, str] = UNSET+ if not isinstance(sort, Unset):+ json_sort = sort.value++ params["sort"] = json_sort++ 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": f"/templates/{template_id}/tags/groups",+ "params": params,+ }++ return _kwargs+++def _parse_response(+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response+) -> Optional[Union[Error, TemplateTagGroupsResponse]]:+ if response.status_code == 200:+ response_200 = TemplateTagGroupsResponse.from_dict(response.json())++ 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 == 404:+ response_404 = Error.from_dict(response.json())++ return response_404+ if response.status_code == 429:+ response_429 = Error.from_dict(response.json())++ return response_429+ 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, TemplateTagGroupsResponse]]:+ return Response(+ status_code=HTTPStatus(response.status_code),+ content=response.content,+ headers=response.headers,+ parsed=_parse_response(client=client, response=response),+ )+++def sync_detailed(+ template_id: str,+ *,+ client: AuthenticatedClient,+ assignment_limit: Union[Unset, int] = 6,+ tags_limit: Union[Unset, int] = 25,+ tags_cursor: Union[Unset, str] = UNSET,+ search: Union[Unset, str] = UNSET,+ sort: Union[+ Unset, GetTemplatesTemplateIDTagsGroupsSort+ ] = GetTemplatesTemplateIDTagsGroupsSort.LATEST_DESC,+) -> Response[Union[Error, TemplateTagGroupsResponse]]:+ """List template tag groups++ Lists the template's tags that have at least one ready build, each with its most recent ready+ assignments, paginated over tags with a keyset cursor. Returns 404 when the template does not exist+ or belongs to another team.++ Args:+ template_id (str):+ assignment_limit (Union[Unset, int]): Default: 6.+ tags_limit (Union[Unset, int]): Default: 25.+ tags_cursor (Union[Unset, str]):+ search (Union[Unset, str]):+ sort (Union[Unset, GetTemplatesTemplateIDTagsGroupsSort]): Default:+ GetTemplatesTemplateIDTagsGroupsSort.LATEST_DESC.++ 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, TemplateTagGroupsResponse]]+ """++ kwargs = _get_kwargs(+ template_id=template_id,+ assignment_limit=assignment_limit,+ tags_limit=tags_limit,+ tags_cursor=tags_cursor,+ search=search,+ sort=sort,+ )++ response = client.get_httpx_client().request(+ **kwargs,+ )++ return _build_response(client=client, response=response)+++def sync(+ template_id: str,+ *,+ client: AuthenticatedClient,+ assignment_limit: Union[Unset, int] = 6,+ tags_limit: Union[Unset, int] = 25,+ tags_cursor: Union[Unset, str] = UNSET,+ search: Union[Unset, str] = UNSET,+ sort: Union[+ Unset, GetTemplatesTemplateIDTagsGroupsSort+ ] = GetTemplatesTemplateIDTagsGroupsSort.LATEST_DESC,+) -> Optional[Union[Error, TemplateTagGroupsResponse]]:+ """List template tag groups++ Lists the template's tags that have at least one ready build, each with its most recent ready+ assignments, paginated over tags with a keyset cursor. Returns 404 when the template does not exist+ or belongs to another team.++ Args:+ template_id (str):+ assignment_limit (Union[Unset, int]): Default: 6.+ tags_limit (Union[Unset, int]): Default: 25.+ tags_cursor (Union[Unset, str]):+ search (Union[Unset, str]):+ sort (Union[Unset, GetTemplatesTemplateIDTagsGroupsSort]): Default:+ GetTemplatesTemplateIDTagsGroupsSort.LATEST_DESC.++ 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, TemplateTagGroupsResponse]+ """++ return sync_detailed(+ template_id=template_id,+ client=client,+ assignment_limit=assignment_limit,+ tags_limit=tags_limit,+ tags_cursor=tags_cursor,+ search=search,+ sort=sort,+ ).parsed+++async def asyncio_detailed(+ template_id: str,+ *,+ client: AuthenticatedClient,+ assignment_limit: Union[Unset, int] = 6,+ tags_limit: Union[Unset, int] = 25,+ tags_cursor: Union[Unset, str] = UNSET,+ search: Union[Unset, str] = UNSET,+ sort: Union[+ Unset, GetTemplatesTemplateIDTagsGroupsSort+ ] = GetTemplatesTemplateIDTagsGroupsSort.LATEST_DESC,+) -> Response[Union[Error, TemplateTagGroupsResponse]]:+ """List template tag groups++ Lists the template's tags that have at least one ready build, each with its most recent ready+ assignments, paginated over tags with a keyset cursor. Returns 404 when the template does not exist+ or belongs to another team.++ Args:+ template_id (str):+ assignment_limit (Union[Unset, int]): Default: 6.+ tags_limit (Union[Unset, int]): Default: 25.+ tags_cursor (Union[Unset, str]):+ search (Union[Unset, str]):+ sort (Union[Unset, GetTemplatesTemplateIDTagsGroupsSort]): Default:+ GetTemplatesTemplateIDTagsGroupsSort.LATEST_DESC.++ 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, TemplateTagGroupsResponse]]+ """++ kwargs = _get_kwargs(+ template_id=template_id,+ assignment_limit=assignment_limit,+ tags_limit=tags_limit,+ tags_cursor=tags_cursor,+ search=search,+ sort=sort,+ )++ response = await client.get_async_httpx_client().request(**kwargs)++ return _build_response(client=client, response=response)+++async def asyncio(+ template_id: str,+ *,+ client: AuthenticatedClient,+ assignment_limit: Union[Unset, int] = 6,+ tags_limit: Union[Unset, int] = 25,+ tags_cursor: Union[Unset, str] = UNSET,+ search: Union[Unset, str] = UNSET,+ sort: Union[+ Unset, GetTemplatesTemplateIDTagsGroupsSort+ ] = GetTemplatesTemplateIDTagsGroupsSort.LATEST_DESC,+) -> Optional[Union[Error, TemplateTagGroupsResponse]]:+ """List template tag groups++ Lists the template's tags that have at least one ready build, each with its most recent ready+ assignments, paginated over tags with a keyset cursor. Returns 404 when the template does not exist+ or belongs to another team.++ Args:+ template_id (str):+ assignment_limit (Union[Unset, int]): Default: 6.+ tags_limit (Union[Unset, int]): Default: 25.+ tags_cursor (Union[Unset, str]):+ search (Union[Unset, str]):+ sort (Union[Unset, GetTemplatesTemplateIDTagsGroupsSort]): Default:+ GetTemplatesTemplateIDTagsGroupsSort.LATEST_DESC.++ 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, TemplateTagGroupsResponse]+ """++ return (+ await asyncio_detailed(+ template_id=template_id,+ client=client,+ assignment_limit=assignment_limit,+ tags_limit=tags_limit,+ tags_cursor=tags_cursor,+ search=search,+ sort=sort,+ )+ ).parseddiff --git a/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags_tag_assignments.py b/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags_tag_assignments.pynew file mode 100644index 000000000..1c7f34474--- /dev/null+++ b/packages/python-sdk/e2b/api/client/api/tags/get_templates_template_id_tags_tag_assignments.py@@ -0,0 +1,236 @@+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_tag_assignments_response import TemplateTagAssignmentsResponse+from ...types import UNSET, Response, Unset+++def _get_kwargs(+ template_id: str,+ tag: str,+ *,+ cursor: Union[Unset, str] = UNSET,+ limit: Union[Unset, int] = 50,+) -> dict[str, Any]:+ params: dict[str, Any] = {}++ params["cursor"] = cursor++ 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": f"/templates/{template_id}/tags/{tag}/assignments",+ "params": params,+ }++ return _kwargs+++def _parse_response(+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response+) -> Optional[Union[Error, TemplateTagAssignmentsResponse]]:+ if response.status_code == 200:+ response_200 = TemplateTagAssignmentsResponse.from_dict(response.json())++ 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 == 404:+ response_404 = Error.from_dict(response.json())++ return response_404+ if response.status_code == 429:+ response_429 = Error.from_dict(response.json())++ return response_429+ 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, TemplateTagAssignmentsResponse]]:+ return Response(+ status_code=HTTPStatus(response.status_code),+ content=response.content,+ headers=response.headers,+ parsed=_parse_response(client=client, response=response),+ )+++def sync_detailed(+ template_id: str,+ tag: str,+ *,+ client: AuthenticatedClient,+ cursor: Union[Unset, str] = UNSET,+ limit: Union[Unset, int] = 50,+) -> Response[Union[Error, TemplateTagAssignmentsResponse]]:+ """List template tag assignments++ Lists the ready assignments of one tag of the template, newest first, with keyset cursor pagination.+ Returns 404 when the template does not exist or belongs to another team.++ Args:+ template_id (str):+ tag (str): Tag name+ cursor (Union[Unset, str]):+ limit (Union[Unset, int]): Default: 50.++ 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, TemplateTagAssignmentsResponse]]+ """++ kwargs = _get_kwargs(+ template_id=template_id,+ tag=tag,+ cursor=cursor,+ limit=limit,+ )++ response = client.get_httpx_client().request(+ **kwargs,+ )++ return _build_response(client=client, response=response)+++def sync(+ template_id: str,+ tag: str,+ *,+ client: AuthenticatedClient,+ cursor: Union[Unset, str] = UNSET,+ limit: Union[Unset, int] = 50,+) -> Optional[Union[Error, TemplateTagAssignmentsResponse]]:+ """List template tag assignments++ Lists the ready assignments of one tag of the template, newest first, with keyset cursor pagination.+ Returns 404 when the template does not exist or belongs to another team.++ Args:+ template_id (str):+ tag (str): Tag name+ cursor (Union[Unset, str]):+ limit (Union[Unset, int]): Default: 50.++ 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, TemplateTagAssignmentsResponse]+ """++ return sync_detailed(+ template_id=template_id,+ tag=tag,+ client=client,+ cursor=cursor,+ limit=limit,+ ).parsed+++async def asyncio_detailed(+ template_id: str,+ tag: str,+ *,+ client: AuthenticatedClient,+ cursor: Union[Unset, str] = UNSET,+ limit: Union[Unset, int] = 50,+) -> Response[Union[Error, TemplateTagAssignmentsResponse]]:+ """List template tag assignments++ Lists the ready assignments of one tag of the template, newest first, with keyset cursor pagination.+ Returns 404 when the template does not exist or belongs to another team.++ Args:+ template_id (str):+ tag (str): Tag name+ cursor (Union[Unset, str]):+ limit (Union[Unset, int]): Default: 50.++ 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, TemplateTagAssignmentsResponse]]+ """++ kwargs = _get_kwargs(+ template_id=template_id,+ tag=tag,+ cursor=cursor,+ limit=limit,+ )++ response = await client.get_async_httpx_client().request(**kwargs)++ return _build_response(client=client, response=response)+++async def asyncio(+ template_id: str,+ tag: str,+ *,+ client: AuthenticatedClient,+ cursor: Union[Unset, str] = UNSET,+ limit: Union[Unset, int] = 50,+) -> Optional[Union[Error, TemplateTagAssignmentsResponse]]:+ """List template tag assignments++ Lists the ready assignments of one tag of the template, newest first, with keyset cursor pagination.+ Returns 404 when the template does not exist or belongs to another team.++ Args:+ template_id (str):+ tag (str): Tag name+ cursor (Union[Unset, str]):+ limit (Union[Unset, int]): Default: 50.++ 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, TemplateTagAssignmentsResponse]+ """++ return (+ await asyncio_detailed(+ template_id=template_id,+ tag=tag,+ client=client,+ cursor=cursor,+ limit=limit,+ )+ ).parseddiff --git a/packages/python-sdk/e2b/api/client/api/templates/get_default_templates.py b/packages/python-sdk/e2b/api/client/api/templates/get_default_templates.pynew file mode 100644index 000000000..ecbcaeeb0--- /dev/null+++ b/packages/python-sdk/e2b/api/client/api/templates/get_default_templates.py@@ -0,0 +1,172 @@+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 Response+++def _get_kwargs() -> dict[str, Any]:+ _kwargs: dict[str, Any] = {+ "method": "get",+ "url": "/default-templates",+ }++ 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 == 401:+ response_401 = Error.from_dict(response.json())++ return response_401+ if response.status_code == 429:+ response_429 = Error.from_dict(response.json())++ return response_429+ 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,+) -> Response[Union[Error, list["Template"]]]:+ """List default templates++ Lists the platform's default templates, ordered by template ID. Deleted templates are left out.+ Templates that are not public are listed only to their own team and to admin callers. The build,+ resources and envd version are those of the newest ready build tagged `default`, the one a sandbox+ started from the template runs, and are zero or empty when there is none; `buildStatus` describes+ the newest build tagged `default` in any state. Usage fields (`spawnCount`, `buildCount`,+ `lastSpawnedAt`, `createdBy`) are reported only for the caller's own templates and to admin callers.++ 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()++ response = client.get_httpx_client().request(+ **kwargs,+ )++ return _build_response(client=client, response=response)+++def sync(+ *,+ client: AuthenticatedClient,+) -> Optional[Union[Error, list["Template"]]]:+ """List default templates++ Lists the platform's default templates, ordered by template ID. Deleted templates are left out.+ Templates that are not public are listed only to their own team and to admin callers. The build,+ resources and envd version are those of the newest ready build tagged `default`, the one a sandbox+ started from the template runs, and are zero or empty when there is none; `buildStatus` describes+ the newest build tagged `default` in any state. Usage fields (`spawnCount`, `buildCount`,+ `lastSpawnedAt`, `createdBy`) are reported only for the caller's own templates and to admin callers.++ 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,+ ).parsed+++async def asyncio_detailed(+ *,+ client: AuthenticatedClient,+) -> Response[Union[Error, list["Template"]]]:+ """List default templates++ Lists the platform's default templates, ordered by template ID. Deleted templates are left out.+ Templates that are not public are listed only to their own team and to admin callers. The build,+ resources and envd version are those of the newest ready build tagged `default`, the one a sandbox+ started from the template runs, and are zero or empty when there is none; `buildStatus` describes+ the newest build tagged `default` in any state. Usage fields (`spawnCount`, `buildCount`,+ `lastSpawnedAt`, `createdBy`) are reported only for the caller's own templates and to admin callers.++ 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()++ response = await client.get_async_httpx_client().request(**kwargs)++ return _build_response(client=client, response=response)+++async def asyncio(+ *,+ client: AuthenticatedClient,+) -> Optional[Union[Error, list["Template"]]]:+ """List default templates++ Lists the platform's default templates, ordered by template ID. Deleted templates are left out.+ Templates that are not public are listed only to their own team and to admin callers. The build,+ resources and envd version are those of the newest ready build tagged `default`, the one a sandbox+ started from the template runs, and are zero or empty when there is none; `buildStatus` describes+ the newest build tagged `default` in any state. Usage fields (`spawnCount`, `buildCount`,+ `lastSpawnedAt`, `createdBy`) are reported only for the caller's own templates and to admin callers.++ 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,+ )+ ).parseddiff --git a/packages/python-sdk/e2b/api/client/models/__init__.py b/packages/python-sdk/e2b/api/client/models/__init__.pyindex a2ab66b8e..c09ccaca5 100644--- a/packages/python-sdk/e2b/api/client/models/__init__.py+++ b/packages/python-sdk/e2b/api/client/models/__init__.py@@ -14,6 +14,9 @@ from .gcp_registry import GCPRegistryfrom .gcp_registry_type import GCPRegistryTypefrom .general_registry import GeneralRegistryfrom .general_registry_type import GeneralRegistryType+from .get_templates_template_id_tags_groups_sort import (+ GetTemplatesTemplateIDTagsGroupsSort,+)from .listed_sandbox import ListedSandboxfrom .log_level import LogLevelfrom .logs_direction import LogsDirection@@ -50,6 +53,7 @@ from .sandbox_network_transform_headers import SandboxNetworkTransformHeadersfrom .sandbox_network_update_config import SandboxNetworkUpdateConfigfrom .sandbox_network_update_config_rules import SandboxNetworkUpdateConfigRulesfrom .sandbox_on_timeout import SandboxOnTimeout+from .sandbox_pause_mode import SandboxPauseModefrom .sandbox_pause_request import SandboxPauseRequestfrom .sandbox_refresh_request import SandboxRefreshRequestfrom .sandbox_snapshot_request import SandboxSnapshotRequest@@ -75,6 +79,12 @@ from .template_build_status import TemplateBuildStatusfrom .template_request_response_v3 import TemplateRequestResponseV3from .template_step import TemplateStepfrom .template_tag import TemplateTag+from .template_tag_assignment import TemplateTagAssignment+from .template_tag_assignments_response import TemplateTagAssignmentsResponse+from .template_tag_exists_response import TemplateTagExistsResponse+from .template_tag_group import TemplateTagGroup+from .template_tag_groups_response import TemplateTagGroupsResponse+from .template_tags_count_response import TemplateTagsCountResponsefrom .template_update_request import TemplateUpdateRequestfrom .template_update_response import TemplateUpdateResponsefrom .template_with_builds import TemplateWithBuilds@@ -96,6 +106,7 @@ __all__ = ("GCPRegistryType","GeneralRegistry","GeneralRegistryType",+ "GetTemplatesTemplateIDTagsGroupsSort","ListedSandbox","LogLevel","LogsDirection",@@ -133,6 +144,7 @@ __all__ = ("SandboxNetworkUpdateConfig","SandboxNetworkUpdateConfigRules","SandboxOnTimeout",+ "SandboxPauseMode","SandboxPauseRequest","SandboxRefreshRequest","SandboxSnapshotRequest",@@ -157,6 +169,12 @@ __all__ = ("TemplateRequestResponseV3","TemplateStep","TemplateTag",+ "TemplateTagAssignment",+ "TemplateTagAssignmentsResponse",+ "TemplateTagExistsResponse",+ "TemplateTagGroup",+ "TemplateTagGroupsResponse",+ "TemplateTagsCountResponse","TemplateUpdateRequest","TemplateUpdateResponse","TemplateWithBuilds",diff --git a/packages/python-sdk/e2b/api/client/models/error.py b/packages/python-sdk/e2b/api/client/models/error.pyindex a0a99778a..3fd802494 100644--- a/packages/python-sdk/e2b/api/client/models/error.py+++ b/packages/python-sdk/e2b/api/client/models/error.py@@ -16,8 +16,11 @@ class Error:code (int): Error codemessage (str): Errorerror_code (Union[Unset, str]): Machine-readable semantic error code. Not a closed set; initial values:- sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed,- internal_server_error, secret_limit_reached.+ sandbox_capacity_unavailable, sandbox_placement_timeout, sandbox_no_compatible_node, sandbox_create_failed (a+ node could not create the sandbox this time; retry), sandbox_create_refused (a node refused the sandbox for a+ reason no retry changes, such as a vcpu count out of bounds in the stored build; a server error, since no+ request field reaches that check), internal_server_error, secret_limit_reached, idempotency_request_mismatch,+ idempotency_in_progress, idempotency_outcome_unknown."""code: intdiff --git a/packages/python-sdk/e2b/api/client/models/get_templates_template_id_tags_groups_sort.py b/packages/python-sdk/e2b/api/client/models/get_templates_template_id_tags_groups_sort.pynew file mode 100644index 000000000..809ea7112--- /dev/null+++ b/packages/python-sdk/e2b/api/client/models/get_templates_template_id_tags_groups_sort.py@@ -0,0 +1,11 @@+from enum import Enum+++class GetTemplatesTemplateIDTagsGroupsSort(str, Enum):+ LATEST_ASC = "latest_asc"+ LATEST_DESC = "latest_desc"+ NAME_ASC = "name_asc"+ NAME_DESC = "name_desc"++ def __str__(self) -> str:+ return str(self.value)diff --git a/packages/python-sdk/e2b/api/client/models/new_sandbox.py b/packages/python-sdk/e2b/api/client/models/new_sandbox.pyindex c511ffff1..21dee1c5e 100644--- a/packages/python-sdk/e2b/api/client/models/new_sandbox.py+++ b/packages/python-sdk/e2b/api/client/models/new_sandbox.py@@ -30,7 +30,8 @@ class NewSandbox:snapshot cannot be auto-resumed by traffic and must be resumed explicitly, so it cannot be combined withautoResume. 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+ secure (Union[Unset, bool]): Ignored. All system communication with the sandbox is always secured; the+ template's envd version must support secured access.allow_internet_access (Union[Unset, bool]): Allow sandbox to access the internet. When set to false, it behavesthe same as specifying denyOut to 0.0.0.0/0 in the network config.network (Union[Unset, SandboxNetworkConfig]):diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_detail.py b/packages/python-sdk/e2b/api/client/models/sandbox_detail.pyindex dfe232203..bc150ad4e 100644--- a/packages/python-sdk/e2b/api/client/models/sandbox_detail.py+++ b/packages/python-sdk/e2b/api/client/models/sandbox_detail.py@@ -6,6 +6,7 @@ from attrs import define as _attrs_definefrom attrs import field as _attrs_fieldfrom dateutil.parser import isoparse+from ..models.sandbox_pause_mode import SandboxPauseModefrom ..models.sandbox_state import SandboxStatefrom ..types import UNSET, Unset@@ -40,6 +41,10 @@ class SandboxDetail:metadata (Union[Unset, Any]):network (Union[Unset, SandboxNetworkConfig]):lifecycle (Union[Unset, SandboxLifecycle]): Sandbox lifecycle policy returned by sandbox info.+ pause_mode (Union[Unset, SandboxPauseMode]): What the sandbox's latest pause saved. `full` saved the filesystem+ and the memory, and resuming restores the sandbox where it left off. `filesystem` saved only the filesystem, and+ resuming reboots the sandbox from disk. Returned for a paused sandbox once its pause has finished, and omitted+ while it is still pausing.volume_mounts (Union[Unset, list['SandboxVolumeMount']]):"""@@ -60,6 +65,7 @@ class SandboxDetail:metadata: Union[Unset, Any] = UNSETnetwork: Union[Unset, "SandboxNetworkConfig"] = UNSETlifecycle: Union[Unset, "SandboxLifecycle"] = UNSET+ pause_mode: Union[Unset, SandboxPauseMode] = UNSETvolume_mounts: Union[Unset, list["SandboxVolumeMount"]] = UNSETadditional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)@@ -110,6 +116,10 @@ class SandboxDetail:if not isinstance(self.lifecycle, Unset):lifecycle = self.lifecycle.to_dict()+ pause_mode: Union[Unset, str] = UNSET+ if not isinstance(self.pause_mode, Unset):+ pause_mode = self.pause_mode.value+volume_mounts: Union[Unset, list[dict[str, Any]]] = UNSETif not isinstance(self.volume_mounts, Unset):volume_mounts = []@@ -147,6 +157,8 @@ class SandboxDetail:field_dict["network"] = networkif lifecycle is not UNSET:field_dict["lifecycle"] = lifecycle+ if pause_mode is not UNSET:+ field_dict["pauseMode"] = pause_modeif volume_mounts is not UNSET:field_dict["volumeMounts"] = volume_mounts@@ -219,6 +231,13 @@ class SandboxDetail:else:lifecycle = SandboxLifecycle.from_dict(_lifecycle)+ _pause_mode = d.pop("pauseMode", UNSET)+ pause_mode: Union[Unset, SandboxPauseMode]+ if isinstance(_pause_mode, Unset):+ pause_mode = UNSET+ else:+ pause_mode = SandboxPauseMode(_pause_mode)+volume_mounts = []_volume_mounts = d.pop("volumeMounts", UNSET)for volume_mounts_item_data in _volume_mounts or []:@@ -244,6 +263,7 @@ class SandboxDetail:metadata=metadata,network=network,lifecycle=lifecycle,+ pause_mode=pause_mode,volume_mounts=volume_mounts,)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.pyindex 108a93b2d..4eb243e3a 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@@ -24,9 +24,13 @@ class SandboxNetworkConfig:authentication. Default: True.allow_out (Union[Unset, list[str]]): List of allowed destinations for egress traffic. Each entry can be a CIDRblock (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.+ "*.example.com"). Allowed entries always take precedence over denied entries. When allowOut contains a domain,+ the servers in dnsServers (8.8.8.8 by default) are also allowed.deny_out (Union[Unset, list[str]]): List of denied CIDR blocks or IP addresses for egress traffic. Domain namesare not supported for deny rules.+ dns_servers (Union[Unset, list[str]]): DNS servers the sandbox can reach when allowOut contains a domain. Each+ entry must be an IPv4 address, and all traffic to it is allowed. Omit it to allow the default nameserver+ 8.8.8.8, or pass an empty list to allow none. This does not change the sandbox's /etc/resolv.conf.egress_proxy (Union['SandboxEgressProxyConfigType0', None, Unset]): SOCKS5 proxy for sandbox egress. OutboundTCP is tunneled through the proxy after allow/deny filtering; the sandbox is unaware. Domain-matched flows useremote DNS (ATYP=domain).@@ -46,6 +50,7 @@ class SandboxNetworkConfig:allow_public_traffic: Union[Unset, bool] = Trueallow_out: Union[Unset, list[str]] = UNSETdeny_out: Union[Unset, list[str]] = UNSET+ dns_servers: Union[Unset, list[str]] = UNSETegress_proxy: Union["SandboxEgressProxyConfigType0", None, Unset] = UNSETmask_request_host: Union[Unset, str] = UNSEThttps_ports: Union[Unset, list[int]] = UNSET@@ -67,6 +72,10 @@ class SandboxNetworkConfig:if not isinstance(self.deny_out, Unset):deny_out = self.deny_out+ dns_servers: Union[Unset, list[str]] = UNSET+ if not isinstance(self.dns_servers, Unset):+ dns_servers = self.dns_servers+egress_proxy: Union[None, Unset, dict[str, Any]]if isinstance(self.egress_proxy, Unset):egress_proxy = UNSET@@ -94,6 +103,8 @@ class SandboxNetworkConfig:field_dict["allowOut"] = allow_outif deny_out is not UNSET:field_dict["denyOut"] = deny_out+ if dns_servers is not UNSET:+ field_dict["dnsServers"] = dns_serversif egress_proxy is not UNSET:field_dict["egressProxy"] = egress_proxyif mask_request_host is not UNSET:@@ -119,6 +130,8 @@ class SandboxNetworkConfig:deny_out = cast(list[str], d.pop("denyOut", UNSET))+ dns_servers = cast(list[str], d.pop("dnsServers", UNSET))+def _parse_egress_proxy(data: object,) -> Union["SandboxEgressProxyConfigType0", None, Unset]:@@ -155,6 +168,7 @@ class SandboxNetworkConfig:allow_public_traffic=allow_public_traffic,allow_out=allow_out,deny_out=deny_out,+ dns_servers=dns_servers,egress_proxy=egress_proxy,mask_request_host=mask_request_host,https_ports=https_ports,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.pyindex 3ea8371d8..8cb5fc6e5 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@@ -26,9 +26,13 @@ class SandboxNetworkUpdateConfig:Attributes:allow_out (Union[Unset, list[str]]): List of allowed destinations for egress traffic. Each entry can be a CIDRblock (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.+ "*.example.com"). Allowed entries always take precedence over denied entries. When allowOut contains a domain,+ the servers in dnsServers (8.8.8.8 by default) are also allowed.deny_out (Union[Unset, list[str]]): List of denied CIDR blocks or IP addresses for egress traffic. Domain namesare not supported for deny rules.+ dns_servers (Union[Unset, list[str]]): DNS servers the sandbox can reach when allowOut contains a domain. Each+ entry must be an IPv4 address, and all traffic to it is allowed. Omit it to reset to the default nameserver+ 8.8.8.8, or pass an empty list to allow none. This does not change the sandbox's /etc/resolv.conf.egress_proxy (Union['SandboxEgressProxyConfigType0', None, Unset]): SOCKS5 proxy for sandbox egress. OutboundTCP is tunneled through the proxy after allow/deny filtering; the sandbox is unaware. Domain-matched flows useremote DNS (ATYP=domain).@@ -45,6 +49,7 @@ class SandboxNetworkUpdateConfig:allow_out: Union[Unset, list[str]] = UNSETdeny_out: Union[Unset, list[str]] = UNSET+ dns_servers: Union[Unset, list[str]] = UNSETegress_proxy: Union["SandboxEgressProxyConfigType0", None, Unset] = UNSETrules: Union[Unset, "SandboxNetworkUpdateConfigRules"] = UNSETallow_internet_access: Union[Unset, bool] = UNSET@@ -63,6 +68,10 @@ class SandboxNetworkUpdateConfig:if not isinstance(self.deny_out, Unset):deny_out = self.deny_out+ dns_servers: Union[Unset, list[str]] = UNSET+ if not isinstance(self.dns_servers, Unset):+ dns_servers = self.dns_servers+egress_proxy: Union[None, Unset, dict[str, Any]]if isinstance(self.egress_proxy, Unset):egress_proxy = UNSET@@ -84,6 +93,8 @@ class SandboxNetworkUpdateConfig:field_dict["allowOut"] = allow_outif deny_out is not UNSET:field_dict["denyOut"] = deny_out+ if dns_servers is not UNSET:+ field_dict["dnsServers"] = dns_serversif egress_proxy is not UNSET:field_dict["egressProxy"] = egress_proxyif rules is not UNSET:@@ -107,6 +118,8 @@ class SandboxNetworkUpdateConfig:deny_out = cast(list[str], d.pop("denyOut", UNSET))+ dns_servers = cast(list[str], d.pop("dnsServers", UNSET))+def _parse_egress_proxy(data: object,) -> Union["SandboxEgressProxyConfigType0", None, Unset]:@@ -140,6 +153,7 @@ class SandboxNetworkUpdateConfig:sandbox_network_update_config = cls(allow_out=allow_out,deny_out=deny_out,+ dns_servers=dns_servers,egress_proxy=egress_proxy,rules=rules,allow_internet_access=allow_internet_access,diff --git a/packages/python-sdk/e2b/api/client/models/sandbox_pause_mode.py b/packages/python-sdk/e2b/api/client/models/sandbox_pause_mode.pynew file mode 100644index 000000000..24d1039fb--- /dev/null+++ b/packages/python-sdk/e2b/api/client/models/sandbox_pause_mode.py@@ -0,0 +1,9 @@+from enum import Enum+++class SandboxPauseMode(str, Enum):+ FILESYSTEM = "filesystem"+ FULL = "full"++ def __str__(self) -> str:+ return str(self.value)diff --git a/packages/python-sdk/e2b/api/client/models/template.py b/packages/python-sdk/e2b/api/client/models/template.pyindex 82bdd2804..62666ad8b 100644--- a/packages/python-sdk/e2b/api/client/models/template.py+++ b/packages/python-sdk/e2b/api/client/models/template.py@@ -7,6 +7,7 @@ from attrs import field as _attrs_fieldfrom dateutil.parser import isoparsefrom ..models.template_build_status import TemplateBuildStatus+from ..types import UNSET, Unsetif TYPE_CHECKING:from ..models.team_user import TeamUser@@ -35,6 +36,10 @@ class Template:build_count (int): Number of times the template was builtenvd_version (str): Version of the envd running in the sandboxbuild_status (TemplateBuildStatus): Status of the template build+ is_default (Union[Unset, bool]): Whether the template is one of the platform's default templates. A default+ template owned by another team carries zero or null usage fields (`spawnCount`, `buildCount`, `lastSpawnedAt`,+ `createdBy`).+ description (Union[Unset, str]): Description of the template"""template_id: str@@ -53,6 +58,8 @@ class Template:build_count: intenvd_version: strbuild_status: TemplateBuildStatus+ is_default: Union[Unset, bool] = UNSET+ description: Union[Unset, str] = UNSETadditional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)def to_dict(self) -> dict[str, Any]:@@ -98,6 +105,10 @@ class Template:build_status = self.build_status.value+ is_default = self.is_default++ description = self.description+field_dict: dict[str, Any] = {}field_dict.update(self.additional_properties)field_dict.update(@@ -120,6 +131,10 @@ class Template:"buildStatus": build_status,})+ if is_default is not UNSET:+ field_dict["isDefault"] = is_default+ if description is not UNSET:+ field_dict["description"] = descriptionreturn field_dict@@ -186,6 +201,10 @@ class Template:build_status = TemplateBuildStatus(d.pop("buildStatus"))+ is_default = d.pop("isDefault", UNSET)++ description = d.pop("description", UNSET)+template = cls(template_id=template_id,build_id=build_id,@@ -203,6 +222,8 @@ class Template:build_count=build_count,envd_version=envd_version,build_status=build_status,+ is_default=is_default,+ description=description,)template.additional_properties = ddiff --git a/packages/python-sdk/e2b/api/client/models/template_tag_assignment.py b/packages/python-sdk/e2b/api/client/models/template_tag_assignment.pynew file mode 100644index 000000000..aa5d0972c--- /dev/null+++ b/packages/python-sdk/e2b/api/client/models/template_tag_assignment.py@@ -0,0 +1,111 @@+import datetime+from collections.abc import Mapping+from typing import Any, TypeVar, Union, cast+from uuid import UUID++from attrs import define as _attrs_define+from attrs import field as _attrs_field+from dateutil.parser import isoparse++T = TypeVar("T", bound="TemplateTagAssignment")+++@_attrs_define+class TemplateTagAssignment:+ """+ Attributes:+ assignment_id (UUID): Identifier of the tag assignment event.+ build_id (UUID): Identifier of the assigned build.+ assigned_at (datetime.datetime): Time when the tag was assigned to the build.+ build_created_at (datetime.datetime): Time when the assigned build was created.+ build_finished_at (Union[None, datetime.datetime]): Time when the assigned build finished.+ """++ assignment_id: UUID+ build_id: UUID+ assigned_at: datetime.datetime+ build_created_at: datetime.datetime+ build_finished_at: Union[None, datetime.datetime]+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)++ def to_dict(self) -> dict[str, Any]:+ assignment_id = str(self.assignment_id)++ build_id = str(self.build_id)++ assigned_at = self.assigned_at.isoformat()++ build_created_at = self.build_created_at.isoformat()++ build_finished_at: Union[None, str]+ if isinstance(self.build_finished_at, datetime.datetime):+ build_finished_at = self.build_finished_at.isoformat()+ else:+ build_finished_at = self.build_finished_at++ field_dict: dict[str, Any] = {}+ field_dict.update(self.additional_properties)+ field_dict.update(+ {+ "assignmentId": assignment_id,+ "buildId": build_id,+ "assignedAt": assigned_at,+ "buildCreatedAt": build_created_at,+ "buildFinishedAt": build_finished_at,+ }+ )++ return field_dict++ @classmethod+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:+ d = dict(src_dict)+ assignment_id = UUID(d.pop("assignmentId"))++ build_id = UUID(d.pop("buildId"))++ assigned_at = isoparse(d.pop("assignedAt"))++ build_created_at = isoparse(d.pop("buildCreatedAt"))++ def _parse_build_finished_at(data: object) -> Union[None, datetime.datetime]:+ if data is None:+ return data+ try:+ if not isinstance(data, str):+ raise TypeError()+ build_finished_at_type_0 = isoparse(data)++ return build_finished_at_type_0+ except: # noqa: E722+ pass+ return cast(Union[None, datetime.datetime], data)++ build_finished_at = _parse_build_finished_at(d.pop("buildFinishedAt"))++ template_tag_assignment = cls(+ assignment_id=assignment_id,+ build_id=build_id,+ assigned_at=assigned_at,+ build_created_at=build_created_at,+ build_finished_at=build_finished_at,+ )++ template_tag_assignment.additional_properties = d+ return template_tag_assignment++ @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_propertiesdiff --git a/packages/python-sdk/e2b/api/client/models/template_tag_assignments_response.py b/packages/python-sdk/e2b/api/client/models/template_tag_assignments_response.pynew file mode 100644index 000000000..6ab2264f2--- /dev/null+++ b/packages/python-sdk/e2b/api/client/models/template_tag_assignments_response.py@@ -0,0 +1,87 @@+from collections.abc import Mapping+from typing import TYPE_CHECKING, Any, TypeVar, Union, cast++from attrs import define as _attrs_define+from attrs import field as _attrs_field++if TYPE_CHECKING:+ from ..models.template_tag_assignment import TemplateTagAssignment+++T = TypeVar("T", bound="TemplateTagAssignmentsResponse")+++@_attrs_define+class TemplateTagAssignmentsResponse:+ """+ Attributes:+ data (list['TemplateTagAssignment']): Ready assignment events for the tag, sorted latest first.+ next_cursor (Union[None, str]): Cursor to pass to the next list request, or `null` if there is no next page.+ """++ data: list["TemplateTagAssignment"]+ next_cursor: Union[None, str]+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)++ def to_dict(self) -> dict[str, Any]:+ data = []+ for data_item_data in self.data:+ data_item = data_item_data.to_dict()+ data.append(data_item)++ next_cursor: Union[None, str]+ next_cursor = self.next_cursor++ field_dict: dict[str, Any] = {}+ field_dict.update(self.additional_properties)+ field_dict.update(+ {+ "data": data,+ "nextCursor": next_cursor,+ }+ )++ return field_dict++ @classmethod+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:+ from ..models.template_tag_assignment import TemplateTagAssignment++ d = dict(src_dict)+ data = []+ _data = d.pop("data")+ for data_item_data in _data:+ data_item = TemplateTagAssignment.from_dict(data_item_data)++ data.append(data_item)++ def _parse_next_cursor(data: object) -> Union[None, str]:+ if data is None:+ return data+ return cast(Union[None, str], data)++ next_cursor = _parse_next_cursor(d.pop("nextCursor"))++ template_tag_assignments_response = cls(+ data=data,+ next_cursor=next_cursor,+ )++ template_tag_assignments_response.additional_properties = d+ return template_tag_assignments_response++ @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_propertiesdiff --git a/packages/python-sdk/e2b/api/client/models/template_tag_exists_response.py b/packages/python-sdk/e2b/api/client/models/template_tag_exists_response.pynew file mode 100644index 000000000..df80ebf55--- /dev/null+++ b/packages/python-sdk/e2b/api/client/models/template_tag_exists_response.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="TemplateTagExistsResponse")+++@_attrs_define+class TemplateTagExistsResponse:+ """+ Attributes:+ exists (bool): Whether the template tag has at least one ready assignment.+ normalized_tag (str): Normalized template tag name.+ """++ exists: bool+ normalized_tag: str+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)++ def to_dict(self) -> dict[str, Any]:+ exists = self.exists++ normalized_tag = self.normalized_tag++ field_dict: dict[str, Any] = {}+ field_dict.update(self.additional_properties)+ field_dict.update(+ {+ "exists": exists,+ "normalizedTag": normalized_tag,+ }+ )++ return field_dict++ @classmethod+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:+ d = dict(src_dict)+ exists = d.pop("exists")++ normalized_tag = d.pop("normalizedTag")++ template_tag_exists_response = cls(+ exists=exists,+ normalized_tag=normalized_tag,+ )++ template_tag_exists_response.additional_properties = d+ return template_tag_exists_response++ @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_propertiesdiff --git a/packages/python-sdk/e2b/api/client/models/template_tag_group.py b/packages/python-sdk/e2b/api/client/models/template_tag_group.pynew file mode 100644index 000000000..ca751990a--- /dev/null+++ b/packages/python-sdk/e2b/api/client/models/template_tag_group.py@@ -0,0 +1,89 @@+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.template_tag_assignment import TemplateTagAssignment+++T = TypeVar("T", bound="TemplateTagGroup")+++@_attrs_define+class TemplateTagGroup:+ """+ Attributes:+ tag (str): Template tag name.+ assignments (list['TemplateTagAssignment']): Ready assignment events for this tag, sorted latest first.+ has_more (bool): Whether more ready assignment events exist beyond the requested assignment limit.+ """++ tag: str+ assignments: list["TemplateTagAssignment"]+ has_more: bool+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)++ def to_dict(self) -> dict[str, Any]:+ tag = self.tag++ assignments = []+ for assignments_item_data in self.assignments:+ assignments_item = assignments_item_data.to_dict()+ assignments.append(assignments_item)++ has_more = self.has_more++ field_dict: dict[str, Any] = {}+ field_dict.update(self.additional_properties)+ field_dict.update(+ {+ "tag": tag,+ "assignments": assignments,+ "hasMore": has_more,+ }+ )++ return field_dict++ @classmethod+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:+ from ..models.template_tag_assignment import TemplateTagAssignment++ d = dict(src_dict)+ tag = d.pop("tag")++ assignments = []+ _assignments = d.pop("assignments")+ for assignments_item_data in _assignments:+ assignments_item = TemplateTagAssignment.from_dict(assignments_item_data)++ assignments.append(assignments_item)++ has_more = d.pop("hasMore")++ template_tag_group = cls(+ tag=tag,+ assignments=assignments,+ has_more=has_more,+ )++ template_tag_group.additional_properties = d+ return template_tag_group++ @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_propertiesdiff --git a/packages/python-sdk/e2b/api/client/models/template_tag_groups_response.py b/packages/python-sdk/e2b/api/client/models/template_tag_groups_response.pynew file mode 100644index 000000000..cda631875--- /dev/null+++ b/packages/python-sdk/e2b/api/client/models/template_tag_groups_response.py@@ -0,0 +1,88 @@+from collections.abc import Mapping+from typing import TYPE_CHECKING, Any, TypeVar, Union, cast++from attrs import define as _attrs_define+from attrs import field as _attrs_field++if TYPE_CHECKING:+ from ..models.template_tag_group import TemplateTagGroup+++T = TypeVar("T", bound="TemplateTagGroupsResponse")+++@_attrs_define+class TemplateTagGroupsResponse:+ """+ Attributes:+ tags (list['TemplateTagGroup']):+ next_cursor (Union[None, str]): Cursor to pass as `tagsCursor` for the next page, or `null` if there is no next+ page.+ """++ tags: list["TemplateTagGroup"]+ next_cursor: Union[None, str]+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)++ def to_dict(self) -> dict[str, Any]:+ tags = []+ for tags_item_data in self.tags:+ tags_item = tags_item_data.to_dict()+ tags.append(tags_item)++ next_cursor: Union[None, str]+ next_cursor = self.next_cursor++ field_dict: dict[str, Any] = {}+ field_dict.update(self.additional_properties)+ field_dict.update(+ {+ "tags": tags,+ "nextCursor": next_cursor,+ }+ )++ return field_dict++ @classmethod+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:+ from ..models.template_tag_group import TemplateTagGroup++ d = dict(src_dict)+ tags = []+ _tags = d.pop("tags")+ for tags_item_data in _tags:+ tags_item = TemplateTagGroup.from_dict(tags_item_data)++ tags.append(tags_item)++ def _parse_next_cursor(data: object) -> Union[None, str]:+ if data is None:+ return data+ return cast(Union[None, str], data)++ next_cursor = _parse_next_cursor(d.pop("nextCursor"))++ template_tag_groups_response = cls(+ tags=tags,+ next_cursor=next_cursor,+ )++ template_tag_groups_response.additional_properties = d+ return template_tag_groups_response++ @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_propertiesdiff --git a/packages/python-sdk/e2b/api/client/models/template_tags_count_response.py b/packages/python-sdk/e2b/api/client/models/template_tags_count_response.pynew file mode 100644index 000000000..bb1661dd7--- /dev/null+++ b/packages/python-sdk/e2b/api/client/models/template_tags_count_response.py@@ -0,0 +1,59 @@+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="TemplateTagsCountResponse")+++@_attrs_define+class TemplateTagsCountResponse:+ """+ Attributes:+ total (int): Total distinct ready tags for the template.+ """++ total: int+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)++ def to_dict(self) -> dict[str, Any]:+ total = self.total++ field_dict: dict[str, Any] = {}+ field_dict.update(self.additional_properties)+ field_dict.update(+ {+ "total": total,+ }+ )++ return field_dict++ @classmethod+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:+ d = dict(src_dict)+ total = d.pop("total")++ template_tags_count_response = cls(+ total=total,+ )++ template_tags_count_response.additional_properties = d+ return template_tags_count_response++ @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_propertiesdiff --git a/packages/python-sdk/e2b/api/client/models/template_with_builds.py b/packages/python-sdk/e2b/api/client/models/template_with_builds.pyindex 9bd60d6cb..6ce54467f 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@@ -6,7 +6,11 @@ from attrs import define as _attrs_definefrom attrs import field as _attrs_fieldfrom dateutil.parser import isoparse+from ..models.template_build_status import TemplateBuildStatus+from ..types import UNSET, Unset+if TYPE_CHECKING:+ from ..models.team_user import TeamUserfrom ..models.template_build import TemplateBuild@@ -18,30 +22,62 @@ class TemplateWithBuilds:"""Attributes: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 MiBpublic (bool): Whether the template is public or only accessible by the teamaliases (list[str]): Aliases of the templatenames (list[str]): Names of the template (namespace/alias format when namespaced)created_at (datetime.datetime): Time when the template was createdupdated_at (datetime.datetime): Time when the template was last updated+ created_by (Union['TeamUser', None]):last_spawned_at (Union[None, datetime.datetime]): Time when the template was last usedspawn_count (int): Number of times the template was used+ 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 buildbuilds (list['TemplateBuild']): List of builds for the template+ is_default (Union[Unset, bool]): Whether the template is one of the platform's default templates. A default+ template owned by another team carries zero or null usage fields (`spawnCount`, `buildCount`, `lastSpawnedAt`,+ `createdBy`).+ description (Union[Unset, str]): Description of the template"""template_id: str+ build_id: str+ cpu_count: int+ memory_mb: int+ disk_size_mb: intpublic: boolaliases: list[str]names: list[str]created_at: datetime.datetimeupdated_at: datetime.datetime+ created_by: Union["TeamUser", None]last_spawned_at: Union[None, datetime.datetime]spawn_count: int+ build_count: int+ envd_version: str+ build_status: TemplateBuildStatusbuilds: list["TemplateBuild"]+ is_default: Union[Unset, bool] = UNSET+ description: Union[Unset, str] = UNSETadditional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)def to_dict(self) -> dict[str, Any]:+ from ..models.team_user import TeamUser+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.publicaliases = self.aliases@@ -52,6 +88,12 @@ class TemplateWithBuilds: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+last_spawned_at: Union[None, str]if isinstance(self.last_spawned_at, datetime.datetime):last_spawned_at = self.last_spawned_at.isoformat()@@ -60,36 +102,67 @@ class TemplateWithBuilds:spawn_count = self.spawn_count+ build_count = self.build_count++ envd_version = self.envd_version++ build_status = self.build_status.value+builds = []for builds_item_data in self.builds:builds_item = builds_item_data.to_dict()builds.append(builds_item)+ is_default = self.is_default++ description = self.description+field_dict: dict[str, Any] = {}field_dict.update(self.additional_properties)field_dict.update({"templateID": template_id,+ "buildID": build_id,+ "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,"lastSpawnedAt": last_spawned_at,"spawnCount": spawn_count,+ "buildCount": build_count,+ "envdVersion": envd_version,+ "buildStatus": build_status,"builds": builds,})+ if is_default is not UNSET:+ field_dict["isDefault"] = is_default+ if description is not UNSET:+ field_dict["description"] = descriptionreturn field_dict@classmethoddef from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:+ from ..models.team_user import TeamUserfrom ..models.template_build import TemplateBuildd = dict(src_dict)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"))@@ -100,6 +173,21 @@ class TemplateWithBuilds:updated_at = isoparse(d.pop("updatedAt"))+ def _parse_created_by(data: object) -> Union["TeamUser", None]:+ if data is None:+ return data+ try:+ if not isinstance(data, dict):+ raise TypeError()+ created_by_type_1 = TeamUser.from_dict(data)++ return created_by_type_1+ except: # noqa: E722+ pass+ return cast(Union["TeamUser", None], data)++ created_by = _parse_created_by(d.pop("createdBy"))+def _parse_last_spawned_at(data: object) -> Union[None, datetime.datetime]:if data is None:return data@@ -117,6 +205,12 @@ class TemplateWithBuilds:spawn_count = d.pop("spawnCount")+ build_count = d.pop("buildCount")++ envd_version = d.pop("envdVersion")++ build_status = TemplateBuildStatus(d.pop("buildStatus"))+builds = []_builds = d.pop("builds")for builds_item_data in _builds:@@ -124,16 +218,30 @@ class TemplateWithBuilds:builds.append(builds_item)+ is_default = d.pop("isDefault", UNSET)++ description = d.pop("description", UNSET)+template_with_builds = cls(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,names=names,created_at=created_at,updated_at=updated_at,+ created_by=created_by,last_spawned_at=last_spawned_at,spawn_count=spawn_count,+ build_count=build_count,+ envd_version=envd_version,+ build_status=build_status,builds=builds,+ is_default=is_default,+ description=description,)template_with_builds.additional_properties = ddiff --git a/packages/python-sdk/e2b/sandbox/sandbox_api.py b/packages/python-sdk/e2b/sandbox/sandbox_api.pyindex 66199b016..e0a24dc50 100644--- a/packages/python-sdk/e2b/sandbox/sandbox_api.py+++ b/packages/python-sdk/e2b/sandbox/sandbox_api.py@@ -461,6 +461,29 @@ class SandboxNetworkOpts(TypedDict):)"""+ dns_servers: NotRequired[List[str]]+ """+ DNS servers the sandbox can reach when ``allow_out`` contains a domain.+ Each entry must be an IPv4 address (up to 10 entries), and all traffic to it is allowed.++ Leave it out to allow the default nameserver ``8.8.8.8``. Pass a list to+ allow those servers instead, or ``[]`` to allow none. Allowed domains still+ work without a reachable server, since they are matched by name, not by+ IP; add the names you need to ``/etc/hosts``.++ This only opens the firewall. It does not change the sandbox's+ ``/etc/resolv.conf``, which still points at ``8.8.8.8``, so write your own+ servers there too. With no domain in ``allow_out`` it has no effect::++ Sandbox.create(+ network={+ "allow_out": ["api.example.com"],+ "deny_out": lambda ctx: [ctx.all_traffic],+ "dns_servers": ["1.1.1.1"],+ },+ )+ """+allow_public_traffic: NotRequired[bool]"""Controls whether sandbox URLs should be publicly accessible or require authentication.@@ -524,6 +547,13 @@ class SandboxNetworkUpdate(TypedDict, total=False):``address`` but omits ``tls`` keeps tunneling without TLS."""+ dns_servers: List[str]+ """+ See :attr:`SandboxNetworkOpts.dns_servers`. Leaving it out resets it to+ the default, ``8.8.8.8``, like the other fields, so repeat a custom list in+ every update that should keep it.+ """+allow_internet_access: bool"""Allow sandbox to access the internet. When set to ``False``, it behaves the@@ -583,6 +613,12 @@ class SandboxNetworkInfo(TypedDict, total=False):goes out directly. See :class:`SandboxEgressProxyInfo` for why the passwordis missing."""+ dns_servers: List[str]+ """+ DNS servers the sandbox can reach when ``allow_out`` contains a domain. See+ :attr:`SandboxNetworkOpts.dns_servers`. Missing means the default,+ ``8.8.8.8``.+ """allow_public_traffic: boolmask_request_host: strhttps_ports: List[int]@@ -916,6 +952,10 @@ def _build_network_egress(body["deny_out"] = deny_outif egress_proxy is not None:body["egress_proxy"] = _build_egress_proxy(egress_proxy)+ # `is not None` so an empty list is sent (it means "no DNS server"), like+ # the JS SDK's `!= null`.+ if network.get("dns_servers") is not None:+ body["dns_servers"] = list(network["dns_servers"])if "rules" in network and network["rules"] is not None:body["rules"] = _build_client_rules(network["rules"], ctx).additional_properties@@ -1100,6 +1140,8 @@ def build_network_update_body(body.deny_out = egress["deny_out"]if "egress_proxy" in egress:body.egress_proxy = egress["egress_proxy"]+ if "dns_servers" in egress:+ body.dns_servers = egress["dns_servers"]if "rules" in egress:rules = SandboxNetworkUpdateConfigRules()rules.additional_properties = egress["rules"]@@ -1155,6 +1197,8 @@ def from_client_network_config(egress_proxy = _from_client_egress_proxy(network.egress_proxy)if egress_proxy is not None:result["egress_proxy"] = egress_proxy+ if not isinstance(network.dns_servers, Unset):+ result["dns_servers"] = list(network.dns_servers)if not isinstance(network.allow_public_traffic, Unset):result["allow_public_traffic"] = network.allow_public_trafficif not isinstance(network.mask_request_host, Unset):diff --git a/packages/python-sdk/tests/async/sandbox_async/test_network.py b/packages/python-sdk/tests/async/sandbox_async/test_network.pyindex 66d7e3a07..953891c56 100644--- a/packages/python-sdk/tests/async/sandbox_async/test_network.py+++ b/packages/python-sdk/tests/async/sandbox_async/test_network.py@@ -296,6 +296,116 @@ async def test_update_network_clears_existing_rules(async_sandbox_factory):assert r2.exit_code == 0+def dns_probe_cmd(server: str) -> str:+ """Sends one DNS query for example.com to `server` over UDP. Fails if no reply comes back."""+ return f"""python3 -c "+import socket+q = bytes.fromhex('abcd01000001000000000000076578616d706c6503636f6d0000010001')+s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)+s.settimeout(3)+s.sendto(q, ('{server}', 53))+s.recv(512)+"+"""+++DOMAIN_ONLY = SandboxNetworkOpts(+ allow_out=["example.com"],+ deny_out=lambda ctx: [ctx.all_traffic],+)+++async def skip_unless_dns_servers_supported(async_sandbox):+ # These tests need an API that supports dns_servers. Call this on a sandbox+ # created with dns_servers set: if get_info doesn't report them back, skip.+ info = await async_sandbox.get_info()+ if info.network is None or "dns_servers" not in info.network:+ pytest.skip("the API doesn't report dns_servers")++[email protected]_debug()+async def test_empty_dns_servers_allows_no_dns_server(async_sandbox_factory):+ """dns_servers=[] blocks 8.8.8.8; the allowed domain stays reachable."""+ async_sandbox = await async_sandbox_factory(+ network={**DOMAIN_ONLY, "dns_servers": []}+ )+ await skip_unless_dns_servers_supported(async_sandbox)++ with pytest.raises(CommandExitException):+ await async_sandbox.commands.run(dns_probe_cmd("8.8.8.8"))+ with pytest.raises(CommandExitException):+ await async_sandbox.commands.run(+ "curl --connect-timeout 3 --max-time 5 -Is https://8.8.8.8"+ )++ # Allowed domains are matched by name, not by IP, so any public IP in+ # /etc/hosts works.+ await async_sandbox.commands.run(+ "echo '1.1.1.1 example.com' >> /etc/hosts", user="root"+ )+ result = await async_sandbox.commands.run(+ "curl -s -o /dev/null -w '%{http_code}' https://example.com"+ )+ assert result.stdout.strip() == "200"++ info = await async_sandbox.get_info()+ assert info.network is not None+ assert info.network.get("dns_servers") == []++[email protected]_debug()+async def test_dns_servers_allows_listed_servers_instead_of_8888(async_sandbox_factory):+ """dns_servers=["1.1.1.1"] opens 1.1.1.1 and closes 8.8.8.8."""+ async_sandbox = await async_sandbox_factory(+ network={**DOMAIN_ONLY, "dns_servers": ["1.1.1.1"]}+ )+ await skip_unless_dns_servers_supported(async_sandbox)++ assert (await async_sandbox.commands.run(dns_probe_cmd("1.1.1.1"))).exit_code == 0+ with pytest.raises(CommandExitException):+ await async_sandbox.commands.run(dns_probe_cmd("8.8.8.8"))++ info = await async_sandbox.get_info()+ assert info.network is not None+ assert info.network.get("dns_servers") == ["1.1.1.1"]++[email protected]_debug()+async def test_update_network_resets_dns_servers_when_omitted(async_sandbox_factory):+ """Leaving dns_servers out of update_network resets it to 8.8.8.8."""+ async_sandbox = await async_sandbox_factory(+ network={**DOMAIN_ONLY, "dns_servers": []}+ )+ await skip_unless_dns_servers_supported(async_sandbox)+ network = {"allow_out": ["example.com"], "deny_out": ["0.0.0.0/0"]}++ # Left out, so it goes back to the default (8.8.8.8).+ await async_sandbox.update_network(network)+ assert (await async_sandbox.commands.run(dns_probe_cmd("8.8.8.8"))).exit_code == 0+ info = await async_sandbox.get_info()+ assert info.network is not None+ assert "dns_servers" not in info.network++ await async_sandbox.update_network({**network, "dns_servers": []})+ with pytest.raises(CommandExitException):+ await async_sandbox.commands.run(dns_probe_cmd("8.8.8.8"))++ await async_sandbox.update_network({**network, "dns_servers": ["8.8.8.8"]})+ assert (await async_sandbox.commands.run(dns_probe_cmd("8.8.8.8"))).exit_code == 0++[email protected]_debug()+async def test_domain_allowlist_allows_8888_by_default(async_sandbox_factory):+ """Without dns_servers, a domain allowlist still resolves through 8.8.8.8."""+ async_sandbox = await async_sandbox_factory(network=DOMAIN_ONLY)++ assert (await async_sandbox.commands.run(dns_probe_cmd("8.8.8.8"))).exit_code == 0++ info = await async_sandbox.get_info()+ assert info.network is not None+ assert "dns_servers" not in info.network++@pytest.mark.skip_debug()async def test_https_ports(async_sandbox_factory):"""Test that a port listed in https_ports proxies to an HTTPS backend."""diff --git a/packages/python-sdk/tests/shared/sandbox/test_dns_servers.py b/packages/python-sdk/tests/shared/sandbox/test_dns_servers.pynew file mode 100644index 000000000..571385558--- /dev/null+++ b/packages/python-sdk/tests/shared/sandbox/test_dns_servers.py@@ -0,0 +1,103 @@+import pytest++from e2b import SandboxNetworkOpts, SandboxNetworkUpdate+from e2b.api.client.models import SandboxNetworkConfig+from e2b.sandbox.sandbox_api import (+ build_network_config,+ build_network_update_body,+ from_client_network_config,+)+++def _create_wire_body(network: SandboxNetworkOpts) -> dict:+ # Same construction the sync and async create paths use.+ body = build_network_config(network)+ assert body is not None+ return SandboxNetworkConfig(**body).to_dict()+++ "dns_servers",+ [[], ["1.1.1.1"], ["1.1.1.1", "9.9.9.9"]],+)+def test_create_sends_dns_servers(dns_servers):+ wire = _create_wire_body(+ {+ "allow_out": ["api.example.com"],+ "deny_out": lambda ctx: [ctx.all_traffic],+ "dns_servers": dns_servers,+ }+ )++ assert wire["allowOut"] == ["api.example.com"]+ assert wire["denyOut"] == ["0.0.0.0/0"]+ assert wire["dnsServers"] == dns_servers+++def test_create_omits_dns_servers_when_not_provided():+ wire = _create_wire_body({"allow_out": ["api.example.com"]})++ assert wire["allowOut"] == ["api.example.com"]+ assert "dnsServers" not in wire+++def test_create_treats_none_as_not_set():+ wire = _create_wire_body(+ {"allow_out": ["api.example.com"], "dns_servers": None} # type: ignore[typeddict-item]+ )++ assert wire["allowOut"] == ["api.example.com"]+ assert "dnsServers" not in wire+++def test_create_leaves_out_an_empty_network_config():+ # Both create paths skip the network field when this is empty.+ assert not build_network_config({})++[email protected]("dns_servers", [[], ["1.1.1.1"]])+def test_update_sends_dns_servers(dns_servers):+ network: SandboxNetworkUpdate = {+ "allow_out": ["api.example.com"],+ "dns_servers": dns_servers,+ }++ assert build_network_update_body(network).to_dict() == {+ "allowOut": ["api.example.com"],+ "dnsServers": dns_servers,+ }+++def test_update_omits_dns_servers_when_not_provided():+ assert build_network_update_body({"allow_out": ["api.example.com"]}).to_dict() == {+ "allowOut": ["api.example.com"],+ }+++def test_update_treats_none_as_not_set():+ network = {"allow_out": ["api.example.com"], "dns_servers": None}++ assert build_network_update_body(network).to_dict() == { # type: ignore[arg-type]+ "allowOut": ["api.example.com"],+ }++[email protected]("dns_servers", [[], ["1.1.1.1"]])+def test_get_info_reports_dns_servers(dns_servers):+ info = from_client_network_config(+ SandboxNetworkConfig.from_dict(+ {"allowOut": ["api.example.com"], "dnsServers": dns_servers}+ )+ )++ assert info is not None+ assert info["dns_servers"] == dns_servers+++def test_get_info_leaves_dns_servers_unset_when_the_api_omits_it():+ info = from_client_network_config(+ SandboxNetworkConfig.from_dict({"allowOut": ["api.example.com"]})+ )++ assert info is not None+ assert "dns_servers" not in infodiff --git a/packages/python-sdk/tests/sync/sandbox_sync/test_network.py b/packages/python-sdk/tests/sync/sandbox_sync/test_network.pyindex 4d3976503..e372f5b8d 100644--- a/packages/python-sdk/tests/sync/sandbox_sync/test_network.py+++ b/packages/python-sdk/tests/sync/sandbox_sync/test_network.py@@ -287,6 +287,108 @@ def test_update_network_clears_existing_rules(sandbox_factory):assert r2.exit_code == 0+def dns_probe_cmd(server: str) -> str:+ """Sends one DNS query for example.com to `server` over UDP. Fails if no reply comes back."""+ return f"""python3 -c "+import socket+q = bytes.fromhex('abcd01000001000000000000076578616d706c6503636f6d0000010001')+s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)+s.settimeout(3)+s.sendto(q, ('{server}', 53))+s.recv(512)+"+"""+++DOMAIN_ONLY = SandboxNetworkOpts(+ allow_out=["example.com"],+ deny_out=lambda ctx: [ctx.all_traffic],+)+++def skip_unless_dns_servers_supported(sandbox):+ # These tests need an API that supports dns_servers. Call this on a sandbox+ # created with dns_servers set: if get_info doesn't report them back, skip.+ info = sandbox.get_info()+ if info.network is None or "dns_servers" not in info.network:+ pytest.skip("the API doesn't report dns_servers")++[email protected]_debug()+def test_empty_dns_servers_allows_no_dns_server(sandbox_factory):+ """dns_servers=[] blocks 8.8.8.8; the allowed domain stays reachable."""+ sandbox = sandbox_factory(network={**DOMAIN_ONLY, "dns_servers": []})+ skip_unless_dns_servers_supported(sandbox)++ with pytest.raises(CommandExitException):+ sandbox.commands.run(dns_probe_cmd("8.8.8.8"))+ with pytest.raises(CommandExitException):+ sandbox.commands.run(+ "curl --connect-timeout 3 --max-time 5 -Is https://8.8.8.8"+ )++ # Allowed domains are matched by name, not by IP, so any public IP in+ # /etc/hosts works.+ sandbox.commands.run("echo '1.1.1.1 example.com' >> /etc/hosts", user="root")+ result = sandbox.commands.run(+ "curl -s -o /dev/null -w '%{http_code}' https://example.com"+ )+ assert result.stdout.strip() == "200"++ info = sandbox.get_info()+ assert info.network is not None+ assert info.network.get("dns_servers") == []++[email protected]_debug()+def test_dns_servers_allows_listed_servers_instead_of_8888(sandbox_factory):+ """dns_servers=["1.1.1.1"] opens 1.1.1.1 and closes 8.8.8.8."""+ sandbox = sandbox_factory(network={**DOMAIN_ONLY, "dns_servers": ["1.1.1.1"]})+ skip_unless_dns_servers_supported(sandbox)++ assert (sandbox.commands.run(dns_probe_cmd("1.1.1.1"))).exit_code == 0+ with pytest.raises(CommandExitException):+ sandbox.commands.run(dns_probe_cmd("8.8.8.8"))++ info = sandbox.get_info()+ assert info.network is not None+ assert info.network.get("dns_servers") == ["1.1.1.1"]++[email protected]_debug()+def test_update_network_resets_dns_servers_when_omitted(sandbox_factory):+ """Leaving dns_servers out of update_network resets it to 8.8.8.8."""+ sandbox = sandbox_factory(network={**DOMAIN_ONLY, "dns_servers": []})+ skip_unless_dns_servers_supported(sandbox)+ network = {"allow_out": ["example.com"], "deny_out": ["0.0.0.0/0"]}++ # Left out, so it goes back to the default (8.8.8.8).+ sandbox.update_network(network)+ assert (sandbox.commands.run(dns_probe_cmd("8.8.8.8"))).exit_code == 0+ info = sandbox.get_info()+ assert info.network is not None+ assert "dns_servers" not in info.network++ sandbox.update_network({**network, "dns_servers": []})+ with pytest.raises(CommandExitException):+ sandbox.commands.run(dns_probe_cmd("8.8.8.8"))++ sandbox.update_network({**network, "dns_servers": ["8.8.8.8"]})+ assert (sandbox.commands.run(dns_probe_cmd("8.8.8.8"))).exit_code == 0++[email protected]_debug()+def test_domain_allowlist_allows_8888_by_default(sandbox_factory):+ """Without dns_servers, a domain allowlist still resolves through 8.8.8.8."""+ sandbox = sandbox_factory(network=DOMAIN_ONLY)++ assert (sandbox.commands.run(dns_probe_cmd("8.8.8.8"))).exit_code == 0++ info = sandbox.get_info()+ assert info.network is not None+ assert "dns_servers" not in info.network++@pytest.mark.skip_debug()def test_https_ports(sandbox_factory):"""Test that a port listed in https_ports proxies to an HTTPS backend."""diff --git a/spec/envd/envd.yaml b/spec/envd/envd.yamlindex 670f8ac3f..935b1d3a2 100644--- a/spec/envd/envd.yaml+++ b/spec/envd/envd.yaml@@ -67,7 +67,10 @@ paths:timestamp:type: stringformat: date-time- description: The current timestamp in RFC3339 format+ description: >-+ The current timestamp in RFC3339 format. envd adds its own time from reading+ the request body to its clock gates, reported on+ X-Envd-Init-Clock-Correction, and applies its clock rules to the result.defaultUser:type: stringdescription: The default user to use for operations@@ -84,10 +87,53 @@ paths:Number of guest CPUs that should be online. envd attempts to bringthe set of requested CPUs online asynchronously; the outcome isreported on the X-Envd-Cpus header and on /metrics.+ thaw:+ type: string+ enum: [inline, skip]+ description: >-+ Whether this call thaws the workload cgroups a pre-pause freeze left+ frozen. Absent or "inline": it thaws them before it answers, as every envd+ before this field did, unless a freeze came after the call entered, which+ the call then leaves in place. "skip": it thaws nothing and answers X-Envd-Thaw:+ skip, leaving the workload frozen; only for a resume whose VM is discarded+ after the call, such as one that records which pages the resume touches. A+ value this envd does not know reads as inline, the side on which a guest+ is never left frozen.responses:"204":description: Env vars set, the time and metadata is synced with the host+ headers:+ X-Envd-Thaw:+ description: >-+ Present, with the value "skip", when the call carried thaw: "skip" and so+ thawed nothing; an authorized call that asked to skip and then failed carries+ it on its error response too. Absent on every other call, including one+ whose thaw a later freeze withheld, and on an envd predating the thaw field.+ schema:+ type: string+ enum: [skip]+ X-Envd-Init-Clock-Correction:+ description: >-+ The time, in whole milliseconds, truncated, that envd added to the request's+ timestamp: its own time from reading the request body to its clock gates.+ Present on every 204 to a request that carried a timestamp, whether or not the+ clock was then stepped; absent on an envd predating it.+ schema:+ type: integer+ minimum: 0+ X-Envd-Init-Unobserved:+ description: >-+ How many /init handlers ran their thaw and finished with their request+ context already done since the last 204 that carried this header or the last+ freeze, whichever came later: thaws that ran with no caller left to observe+ them. Present, zero included, on every 204 whose client was still connected+ when its headers were decided; absent on an error response and on an envd+ predating it. A handler that asked to skip the thaw, or whose thaw was+ withheld because a freeze came after it entered, is never counted.+ schema:+ type: integer+ minimum: 0/freeze:post:@@ -173,7 +219,7 @@ paths:/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.+ summary: Unfreeze user/pty cgroups. Intended for the orchestrator's pause-failure rollback path and the thaw after an in-place checkpoint; the normal resume thaw happens inside /init, not here.x-internal: truesecurity:- AccessTokenAuth: []diff --git a/spec/openapi.yml b/spec/openapi.ymlindex e10df0430..07b1832ce 100644--- a/spec/openapi.yml+++ b/spec/openapi.yml@@ -104,6 +104,79 @@ components:schema:type: stringdescription: Tag name+ tagQuery:+ name: tag+ in: query+ required: true+ description: Template tag name to check.+ schema:+ type: string+ minLength: 1+ tagAssignmentLimit:+ name: assignmentLimit+ in: query+ required: false+ description: Maximum number of ready assignment rows to return per tag.+ schema:+ type: integer+ format: int32+ minimum: 1+ maximum: 25+ default: 6+ tagGroupsLimit:+ name: tagsLimit+ in: query+ required: false+ description: Maximum number of distinct tags to return per page.+ schema:+ type: integer+ format: int32+ minimum: 1+ maximum: 100+ default: 25+ tagGroupsCursor:+ name: tagsCursor+ in: query+ required: false+ description: Cursor returned by the previous list response in `{sort}|{latest_assigned_at}|{tag}` format (sort-tagged, RFC3339Nano).+ schema:+ type: string+ tagGroupsSearch:+ name: search+ in: query+ required: false+ description: Substring filter on tag name. Allowed characters are `a-z`, `0-9`, `.`, `_`, `-`.+ schema:+ type: string+ maxLength: 64+ pattern: "^[a-z0-9._-]*$"+ tagGroupsSort:+ name: sort+ in: query+ required: false+ description: Sort order for the returned tag groups.+ schema:+ type: string+ enum: [latest_desc, latest_asc, name_asc, name_desc]+ default: latest_desc+ tagAssignmentsLimit:+ name: limit+ in: query+ required: false+ description: Maximum number of assignment rows to return per page.+ schema:+ type: integer+ format: int32+ minimum: 1+ maximum: 100+ default: 50+ tagAssignmentsCursor:+ name: cursor+ in: query+ required: false+ description: Cursor returned by the previous list response in `assigned_at|assignment_id` format.+ schema:+ type: stringpaginationLimit:name: limitin: query@@ -146,6 +219,18 @@ components:type: stringformat: uuidheaders:+ ShouldRetry:+ description: |+ Whether the condition behind this error may clear, so that retrying the request could+ succeed. true marks a transient failure such as missing capacity, a rate limit, or a+ creation still in progress: retry after Retry-After when present, otherwise with+ exponential backoff. false marks a failure a retry cannot fix, such as a malformed request+ or a configuration fault, or an outcome that is unknown, where a retry could create a+ second sandbox. Successful responses and errors without an explicit classification omit+ the header.+ required: false+ schema:+ type: booleanXNextToken:description: Cursor to fetch the next page of results, if more existschema:@@ -472,7 +557,7 @@ components:description: Specify if the sandbox URLs should be accessible only with authentication.allowOut:type: array- description: 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.+ description: 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. When allowOut contains a domain, the servers in dnsServers (8.8.8.8 by default) are also allowed.items:type: stringdenyOut:@@ -480,6 +565,12 @@ components:description: List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules.items:type: string+ dnsServers:+ type: array+ maxItems: 10+ description: DNS servers the sandbox can reach when allowOut contains a domain. Each entry must be an IPv4 address, and all traffic to it is allowed. Omit it to allow the default nameserver 8.8.8.8, or pass an empty list to allow none. This does not change the sandbox's /etc/resolv.conf.+ items:+ type: stringegressProxy:$ref: "#/components/schemas/SandboxEgressProxyConfig"maskRequestHost:@@ -517,7 +608,7 @@ components:properties:allowOut:type: array- description: 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.+ description: 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. When allowOut contains a domain, the servers in dnsServers (8.8.8.8 by default) are also allowed.items:type: stringdenyOut:@@ -525,6 +616,12 @@ components:description: List of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules.items:type: string+ dnsServers:+ type: array+ maxItems: 10+ description: DNS servers the sandbox can reach when allowOut contains a domain. Each entry must be an IPv4 address, and all traffic to it is allowed. Omit it to reset to the default nameserver 8.8.8.8, or pass an empty list to allow none. This does not change the sandbox's /etc/resolv.conf.+ items:+ type: stringegressProxy:$ref: "#/components/schemas/SandboxEgressProxyConfig"rules:@@ -664,6 +761,18 @@ components:onTimeout:$ref: "#/components/schemas/SandboxOnTimeout"+ SandboxPauseMode:+ type: string+ description: >-+ What the sandbox's latest pause saved. `full` saved the filesystem and+ the memory, and resuming restores the sandbox where it left off.+ `filesystem` saved only the filesystem, and resuming reboots the+ sandbox from disk. Returned for a paused sandbox once its pause has+ finished, and omitted while it is still pausing.+ enum:+ - full+ - filesystem+SandboxLog:description: Log entry with timestamp and linerequired:@@ -885,6 +994,8 @@ components:$ref: "#/components/schemas/SandboxNetworkConfig"lifecycle:$ref: "#/components/schemas/SandboxLifecycle"+ pauseMode:+ $ref: "#/components/schemas/SandboxPauseMode"volumeMounts:type: arrayitems:@@ -981,7 +1092,8 @@ components:$ref: "#/components/schemas/SandboxAutoResumeConfig"secure:type: boolean- description: Secure all system communication with sandbox+ deprecated: true+ description: "Ignored. All system communication with the sandbox is always secured; the template's envd version must support secured access."allow_internet_access:type: booleandescription:@@ -1274,6 +1386,90 @@ components:type: numberdescription: The maximum value of the requested metric in the given interval+ TeamStatusResponse:+ required:+ - isBanned+ - isBlocked+ - blockedReason+ properties:+ isBanned:+ type: boolean+ description: Whether the team is banned+ isBlocked:+ type: boolean+ description: Whether the team is blocked+ blockedReason:+ type: string+ nullable: true+ description: Why the team is blocked, if a reason was recorded++ TeamLimits:+ description: The team's effective resource limits+ required:+ - maxLengthHours+ - concurrentSandboxes+ - concurrentTemplateBuilds+ - maxVcpu+ - maxRamMb+ - diskMb+ - eventsTtlDays+ - defaultFreeDiskSizeMb+ - maxFreeDiskSizeMb+ - apiTeamRpsList+ - apiTeamRpsDelete+ properties:+ maxLengthHours:+ type: integer+ format: int64+ description: Maximum sandbox lifetime, in hours+ concurrentSandboxes:+ type: integer+ format: int64+ description: Maximum number of sandboxes running at once+ concurrentTemplateBuilds:+ type: integer+ format: int64+ description: Maximum number of template builds running at once+ maxVcpu:+ type: integer+ format: int64+ description: Maximum vCPUs per sandbox+ maxRamMb:+ type: integer+ format: int64+ description: Maximum memory per sandbox, in MiB+ diskMb:+ type: integer+ format: int64+ description: Disk size per sandbox, in MiB+ eventsTtlDays:+ type: integer+ format: int64+ description: Number of days sandbox events are kept+ defaultFreeDiskSizeMb:+ type: integer+ format: int64+ description: Free disk space a template build gets when it requests none, in MiB+ maxFreeDiskSizeMb:+ type: integer+ format: int64+ description: Maximum free disk space a template build may request, in MiB+ apiTeamRpsList:+ type: integer+ format: int64+ description: Requests per second the team may make to list endpoints+ apiTeamRpsDelete:+ type: integer+ format: int64+ description: Requests per second the team may make to delete endpoints++ TeamLimitsResponse:+ required:+ - limits+ properties:+ limits:+ $ref: "#/components/schemas/TeamLimits"+AdminSandboxKillResult:required:- killedCount@@ -1286,6 +1482,35 @@ components:type: integerdescription: Number of sandboxes that failed to kill+ AdminSandbox:+ type: object+ required:+ - sandboxID+ - teamID+ - state+ properties:+ sandboxID:+ type: string+ description: Identifier of the sandbox+ teamID:+ type: string+ format: uuid+ description: Identifier of the team that owns the sandbox+ state:+ $ref: "#/components/schemas/AdminSandboxState"++ AdminSandboxState:+ type: string+ description: State after the sandbox's latest create, resume, pause or kill event+ enum:+ - running+ - paused+ - killed+ x-enum-varnames:+ - AdminSandboxStateRunning+ - AdminSandboxStatePaused+ - AdminSandboxStateKilled+AdminTeamRunningSandboxCounts:type: objectdescription: |@@ -1309,6 +1534,185 @@ components:type: integerdescription: Number of builds that failed to cancel+ AdminTeamListRequest:+ type: object+ properties:+ projectIds:+ type: array+ description: Only list these teams. An empty list matches no team; omit it to list every team.+ items:+ type: string+ format: uuid+ search:+ type: string+ description: A team ID, as a UUID or public project ID, matches that team exactly. Any other text matches a substring of the email, name or slug, ignoring case.+ hideBanned:+ type: boolean+ default: false+ description: Leave out banned teams+ hideBlocked:+ type: boolean+ default: false+ description: Leave out blocked teams+ createdAfter:+ type: string+ format: date-time+ description: Only list teams created at or after this time+ createdBefore:+ type: string+ format: date-time+ description: Only list teams created at or before this time+ sortBy:+ $ref: "#/components/schemas/AdminTeamListSortField"+ sortOrder:+ allOf:+ - $ref: "#/components/schemas/OrderDirection"+ description: Ignored when `sortBy` is omitted.+ limit:+ type: integer+ format: int32+ minimum: 1+ maximum: 100+ default: 50+ description: Maximum number of teams to return+ offset:+ type: integer+ format: int32+ minimum: 0+ default: 0+ description: Number of matching teams to skip++ AdminTeamListSortField:+ type: string+ description: |+ Column to order by, with newer teams first among equal values. Omit it+ to list enterprise tiers first, then pro tiers, then the rest, each+ newest first.+ enum:+ - name+ - createdAt+ - runningSandboxes+ x-enum-varnames:+ - AdminTeamListSortFieldName+ - AdminTeamListSortFieldEmail+ - AdminTeamListSortFieldCreatedAt+ - AdminTeamListSortFieldRunningSandboxes++ AdminTeamList:+ type: object+ required:+ - items+ - total+ properties:+ items:+ type: array+ items:+ $ref: "#/components/schemas/AdminTeamListItem"+ total:+ type: integer+ format: int64+ description: Number of teams matching the filters, ignoring limit and offset++ AdminTeamListItem:+ type: object+ required:+ - id+ - name+ - tier+ - isBanned+ - isBlocked+ - createdAt+ - memberCount+ properties:+ id:+ type: string+ format: uuid+ email:+ type: string+ name:+ type: string+ tier:+ type: string+ isBanned:+ type: boolean+ isBlocked:+ type: boolean+ createdAt:+ type: string+ format: date-time+ memberCount:+ type: integer+ format: int64+ description: Number of users in the team+ runningSandboxCount:+ type: integer+ format: int64+ minimum: 0+ description: Running sandboxes from the same cached snapshot as `GET /admin/sandboxes/running-counts`. Present only when the list is sorted by `runningSandboxes`.++ AdminTeam:+ type: object+ required:+ - id+ - name+ - slug+ - tier+ - createdAt+ - isBlocked+ - isBanned+ - sandboxSchedulingLabels+ properties:+ id:+ type: string+ format: uuid+ email:+ type: string+ name:+ type: string+ slug:+ type: string+ tier:+ type: string+ createdAt:+ type: string+ format: date-time+ isBlocked:+ type: boolean+ isBanned:+ type: boolean+ blockedReason:+ type: string+ nullable: true+ sandboxSchedulingLabels:+ type: array+ items:+ type: string+ clusterId:+ type: string+ format: uuid+ nullable: true+ clusterName:+ type: string+ nullable: true++ AdminTeamSchedulingLabels:+ type: object+ required:+ - labels+ properties:+ labels:+ type: array+ maxItems: 20+ description: The team's full set of labels. A request's labels replace the current ones.+ items:+ type: string+ minLength: 1+ maxLength: 63+ pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$+VolumeToken:type: objectproperties:@@ -1391,6 +1795,15 @@ components:$ref: "#/components/schemas/EnvdVersion"buildStatus:$ref: "#/components/schemas/TemplateBuildStatus"+ isDefault:+ type: boolean+ description: >+ Whether the template is one of the platform's default templates. A default template+ owned by another team carries zero or null usage fields (`spawnCount`, `buildCount`,+ `lastSpawnedAt`, `createdBy`).+ description:+ type: string+ description: Description of the templateTemplateRequestResponseV3:required:@@ -1464,16 +1877,22 @@ components:$ref: "#/components/schemas/EnvdVersion"TemplateWithBuilds:+ allOf:+ - $ref: "#/components/schemas/Template"+ - type: object+ required:+ - builds+ properties:+ builds:+ type: array+ description: List of builds for the template+ items:+ $ref: "#/components/schemas/TemplateBuild"++ TemplateAliasResponse:required:- templateID- public- - aliases- - names- - createdAt- - updatedAt- - lastSpawnedAt- - spawnCount- - buildsproperties:templateID:type: string@@ -1481,67 +1900,22 @@ components:public:type: booleandescription: Whether the template is public or only accessible by the team- aliases:- type: array- description: Aliases of the template- deprecated: true- items:- type: string- names:++ TemplateStep:+ description: Step in the template build process+ required:+ - type+ properties:+ type:+ type: string+ description: Type of the step+ args:+ default: []type: array- description: Names of the template (namespace/alias format when namespaced)+ description: Arguments for the stepitems:type: string- createdAt:- type: string- format: date-time- description: Time when the template was created- updatedAt:- type: string- format: date-time- description: Time when the template was last updated- lastSpawnedAt:- type: string- nullable: true- format: date-time- description: Time when the template was last used- spawnCount:- type: integer- format: int64- description: Number of times the template was used- builds:- type: array- description: List of builds for the template- items:- $ref: "#/components/schemas/TemplateBuild"-- TemplateAliasResponse:- required:- - templateID- - public- properties:- templateID:- type: string- description: Identifier of the template- public:- type: boolean- description: Whether the template is public or only accessible by the team-- TemplateStep:- description: Step in the template build process- required:- - type- properties:- type:- type: string- description: Type of the step- args:- default: []- type: array- description: Arguments for the step- items:- type: string- filesHash:+ filesHash:type: stringpattern: "^[0-9a-f]{64}$"description: Hash of the files used in the step (lowercase hex SHA-256)@@ -2190,6 +2564,110 @@ components:format: date-timedescription: Time when the tag was assigned+ TemplateTagAssignment:+ type: object+ required:+ - assignmentId+ - buildId+ - assignedAt+ - buildCreatedAt+ - buildFinishedAt+ properties:+ assignmentId:+ type: string+ format: uuid+ description: Identifier of the tag assignment event.+ buildId:+ type: string+ format: uuid+ description: Identifier of the assigned build.+ assignedAt:+ type: string+ format: date-time+ description: Time when the tag was assigned to the build.+ buildCreatedAt:+ type: string+ format: date-time+ description: Time when the assigned build was created.+ buildFinishedAt:+ type: string+ format: date-time+ nullable: true+ description: Time when the assigned build finished.++ TemplateTagGroup:+ type: object+ required:+ - tag+ - assignments+ - hasMore+ properties:+ tag:+ type: string+ description: Template tag name.+ assignments:+ type: array+ description: Ready assignment events for this tag, sorted latest first.+ items:+ $ref: "#/components/schemas/TemplateTagAssignment"+ hasMore:+ type: boolean+ description: Whether more ready assignment events exist beyond the requested assignment limit.++ TemplateTagGroupsResponse:+ type: object+ required:+ - tags+ - nextCursor+ properties:+ tags:+ type: array+ items:+ $ref: "#/components/schemas/TemplateTagGroup"+ nextCursor:+ type: string+ nullable: true+ description: Cursor to pass as `tagsCursor` for the next page, or `null` if there is no next page.++ TemplateTagsCountResponse:+ type: object+ required:+ - total+ properties:+ total:+ type: integer+ format: int64+ description: Total distinct ready tags for the template.++ TemplateTagExistsResponse:+ type: object+ required:+ - exists+ - normalizedTag+ properties:+ exists:+ type: boolean+ description: Whether the template tag has at least one ready assignment.+ normalizedTag:+ type: string+ description: Normalized template tag name.++ TemplateTagAssignmentsResponse:+ type: object+ required:+ - data+ - nextCursor+ properties:+ data:+ type: array+ description: Ready assignment events for the tag, sorted latest first.+ items:+ $ref: "#/components/schemas/TemplateTagAssignment"+ nextCursor:+ type: string+ nullable: true+ description: Cursor to pass to the next list request, or `null` if there is no next page.+AssignTemplateTagsRequest:required:- target@@ -2232,8 +2710,13 @@ components:description: >-Machine-readable semantic error code. Not a closed set; initial values:sandbox_capacity_unavailable, sandbox_placement_timeout,- sandbox_no_compatible_node, sandbox_create_failed, internal_server_error,- secret_limit_reached.+ sandbox_no_compatible_node, sandbox_create_failed (a node could not+ create the sandbox this time; retry), sandbox_create_refused (a node+ refused the sandbox for a reason no retry changes, such as a vcpu+ count out of bounds in the stored build; a server error, since no+ request field reaches that check), internal_server_error,+ secret_limit_reached, idempotency_request_mismatch, idempotency_in_progress,+ idempotency_outcome_unknown.message:type: stringdescription: Error@@ -2873,6 +3356,70 @@ paths:"500":$ref: "#/components/responses/500"+ /teams/{teamID}/status:+ get:+ summary: Get team access status+ description: Returns whether the team is banned or blocked, and why it is blocked. A team-authenticated request may read only its own team.+ tags: [auth]+ security:+ - AuthProviderBearerAuth: []+ AuthProviderTeamAuth: []+ - AdminApiKeyAuth: []+ - AdminJWTAuth: []+ parameters:+ - $ref: "#/components/parameters/teamID"+ responses:+ "200":+ description: Successfully returned the team access status+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/TeamStatusResponse"+ "400":+ $ref: "#/components/responses/400"+ "401":+ $ref: "#/components/responses/401"+ "403":+ $ref: "#/components/responses/403"+ "404":+ $ref: "#/components/responses/404"+ "429":+ $ref: "#/components/responses/429"+ "500":+ $ref: "#/components/responses/500"++ /teams/{teamID}/limits:+ get:+ summary: Get team limits+ description: Returns the team's effective resource limits. A team-authenticated request may read only its own team.+ tags: [auth]+ security:+ - AuthProviderBearerAuth: []+ AuthProviderTeamAuth: []+ - AdminApiKeyAuth: []+ - AdminJWTAuth: []+ parameters:+ - $ref: "#/components/parameters/teamID"+ responses:+ "200":+ description: Successfully returned the team limits+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/TeamLimitsResponse"+ "400":+ $ref: "#/components/responses/400"+ "401":+ $ref: "#/components/responses/401"+ "403":+ $ref: "#/components/responses/403"+ "404":+ $ref: "#/components/responses/404"+ "429":+ $ref: "#/components/responses/429"+ "500":+ $ref: "#/components/responses/500"+/sandboxes:get:summary: List running sandboxes@@ -2914,7 +3461,7 @@ paths:$ref: "#/components/responses/500"post:summary: Create sandbox- description: Create a sandbox from the template. Use POST /v2/sandboxes instead.+ description: Create a sandbox from the template. All system communication with the sandbox is secured. Use POST /v2/sandboxes instead.deprecated: truetags: [sandboxes]security:@@ -2955,6 +3502,23 @@ paths:post:summary: Create sandbox (v2)description: Create a sandbox from the template. All system communication with the sandbox is secured.+ parameters:+ - name: Idempotency-Key+ in: header+ required: false+ description: |+ Optional team-scoped key for retrying sandbox creation. Use 1 to 255 lowercase ASCII+ letters, digits, or hyphens (a-z, 0-9, -), such as a lowercase UUID. When idempotency is enabled,+ matching retries replay the original status and body, including errors, for the retention period.+ Different request parameters return 409 with error_code idempotency_request_mismatch.+ An in-progress request returns 409 with error_code idempotency_in_progress; an unknown+ outcome returns 422 with error_code idempotency_outcome_unknown. These retries do not execute the request again.+ Retries do not extend retention. After the key expires, it can start a new creation.+ schema:+ type: string+ minLength: 1+ maxLength: 255+ pattern: '^[a-z0-9-]+$'tags: [sandboxes]security:- ApiKeyAuth: []@@ -2980,15 +3544,93 @@ paths:"401":$ref: "#/components/responses/401""400":- $ref: "#/components/responses/400"+ description: Bad request+ headers:+ Should-Retry:+ $ref: "#/components/headers/ShouldRetry"+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/Error"+ "403":+ description: Forbidden+ headers:+ Should-Retry:+ $ref: "#/components/headers/ShouldRetry"+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/Error"+ "404":+ description: Not found+ headers:+ Should-Retry:+ $ref: "#/components/headers/ShouldRetry"+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/Error"+ "409":+ description: The Idempotency-Key conflicts with a different request (error_code idempotency_request_mismatch), or the matching original request has no recorded response yet and is within its expected response window (error_code idempotency_in_progress); this request was not executed again+ headers:+ Should-Retry:+ $ref: "#/components/headers/ShouldRetry"+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/Error"+ "422":+ description: The matching original request has no recorded response and its expected response deadline has passed or is unknown (error_code idempotency_outcome_unknown); this request was not executed again+ headers:+ Should-Retry:+ $ref: "#/components/headers/ShouldRetry"+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/Error""429":- $ref: "#/components/responses/429"+ description: Too many requests+ headers:+ Should-Retry:+ $ref: "#/components/headers/ShouldRetry"+ Retry-After:+ description: When present, the number of seconds to wait before retrying the request.+ required: false+ schema:+ type: integer+ minimum: 0+ example: 30+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/Error""500":- $ref: "#/components/responses/500"+ description: Server error+ headers:+ Should-Retry:+ $ref: "#/components/headers/ShouldRetry"+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/Error""503":- $ref: "#/components/responses/503"+ description: Service unavailable+ headers:+ Should-Retry:+ $ref: "#/components/headers/ShouldRetry"+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/Error""504":- $ref: "#/components/responses/504"+ description: Backend timeout+ headers:+ Should-Retry:+ $ref: "#/components/headers/ShouldRetry"+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/Error"get:summary: List sandboxes (v2)x-api-group: list@@ -3248,6 +3890,7 @@ paths:delete:summary: Kill sandbox+ x-api-group: deletedescription: Kill a sandboxtags: [sandboxes]security:@@ -3913,6 +4556,39 @@ paths:"500":$ref: "#/components/responses/500"+ /default-templates:+ get:+ summary: List default templates+ description: >+ Lists the platform's default templates, ordered by template ID. Deleted templates are left+ out. Templates that are not public are listed only to their own team and to admin callers.+ The build, resources and envd version are those of the newest ready build tagged+ `default`, the one a sandbox started from the template runs, and are zero or empty when+ there is none; `buildStatus` describes the newest build tagged `default` in any state.+ Usage fields (`spawnCount`, `buildCount`, `lastSpawnedAt`, `createdBy`) are+ reported only for the caller's own templates and to admin callers.+ tags: [templates]+ security:+ - ApiKeyAuth: []+ - AuthProviderBearerAuth: []+ - AdminApiKeyAuth: []+ - AdminJWTAuth: []+ responses:+ "200":+ description: Successfully returned the default templates+ content:+ application/json:+ schema:+ type: array+ items:+ $ref: "#/components/schemas/Template"+ "401":+ $ref: "#/components/responses/401"+ "429":+ $ref: "#/components/responses/429"+ "500":+ $ref: "#/components/responses/500"+/templates/{templateID}:get:summary: List template builds@@ -3949,6 +4625,7 @@ paths:$ref: "#/components/responses/500"delete:summary: Delete template+ x-api-group: deletedescription: Delete a templatetags: [templates]security:@@ -4292,6 +4969,162 @@ paths:"500":$ref: "#/components/responses/500"+ /templates/{templateID}/tags/groups:+ get:+ summary: List template tag groups+ description: >+ Lists the template's tags that have at least one ready build, each with its most recent+ ready assignments, paginated over tags with a keyset cursor. Returns 404 when the template+ does not exist or belongs to another team.+ tags: [tags]+ security:+ - ApiKeyAuth: []+ - AuthProviderBearerAuth: []+ AuthProviderTeamAuth: []+ - AdminApiKeyAuth: []+ AdminTeamAuth: []+ - AdminJWTAuth: []+ AdminTeamAuth: []+ parameters:+ - $ref: "#/components/parameters/templateID"+ - $ref: "#/components/parameters/tagAssignmentLimit"+ - $ref: "#/components/parameters/tagGroupsLimit"+ - $ref: "#/components/parameters/tagGroupsCursor"+ - $ref: "#/components/parameters/tagGroupsSearch"+ - $ref: "#/components/parameters/tagGroupsSort"+ responses:+ "200":+ description: Successfully returned template tag groups+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/TemplateTagGroupsResponse"+ "400":+ $ref: "#/components/responses/400"+ "401":+ $ref: "#/components/responses/401"+ "403":+ $ref: "#/components/responses/403"+ "404":+ $ref: "#/components/responses/404"+ "429":+ $ref: "#/components/responses/429"+ "500":+ $ref: "#/components/responses/500"++ /templates/{templateID}/tags/count:+ get:+ summary: Count template tags+ description: >+ Returns the number of distinct tags of the template that have at least one ready build.+ Returns 404 when the template does not exist or belongs to another team.+ tags: [tags]+ security:+ - ApiKeyAuth: []+ - AuthProviderBearerAuth: []+ AuthProviderTeamAuth: []+ - AdminApiKeyAuth: []+ AdminTeamAuth: []+ - AdminJWTAuth: []+ AdminTeamAuth: []+ parameters:+ - $ref: "#/components/parameters/templateID"+ responses:+ "200":+ description: Successfully returned the tag count+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/TemplateTagsCountResponse"+ "401":+ $ref: "#/components/responses/401"+ "403":+ $ref: "#/components/responses/403"+ "404":+ $ref: "#/components/responses/404"+ "429":+ $ref: "#/components/responses/429"+ "500":+ $ref: "#/components/responses/500"++ /templates/{templateID}/tags/exists:+ get:+ summary: Check template tag+ description: >+ Checks whether a tag of the template has at least one ready build. Returns 404 when the+ template does not exist or belongs to another team.+ tags: [tags]+ security:+ - ApiKeyAuth: []+ - AuthProviderBearerAuth: []+ AuthProviderTeamAuth: []+ - AdminApiKeyAuth: []+ AdminTeamAuth: []+ - AdminJWTAuth: []+ AdminTeamAuth: []+ parameters:+ - $ref: "#/components/parameters/templateID"+ - $ref: "#/components/parameters/tagQuery"+ responses:+ "200":+ description: Successfully checked the tag+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/TemplateTagExistsResponse"+ "400":+ $ref: "#/components/responses/400"+ "401":+ $ref: "#/components/responses/401"+ "403":+ $ref: "#/components/responses/403"+ "404":+ $ref: "#/components/responses/404"+ "429":+ $ref: "#/components/responses/429"+ "500":+ $ref: "#/components/responses/500"++ /templates/{templateID}/tags/{tag}/assignments:+ get:+ summary: List template tag assignments+ description: >+ Lists the ready assignments of one tag of the template, newest first, with keyset cursor+ pagination. Returns 404 when the template does not exist or belongs to another team.+ tags: [tags]+ security:+ - ApiKeyAuth: []+ - AuthProviderBearerAuth: []+ AuthProviderTeamAuth: []+ - AdminApiKeyAuth: []+ AdminTeamAuth: []+ - AdminJWTAuth: []+ AdminTeamAuth: []+ parameters:+ - $ref: "#/components/parameters/templateID"+ - $ref: "#/components/parameters/tag"+ - $ref: "#/components/parameters/tagAssignmentsCursor"+ - $ref: "#/components/parameters/tagAssignmentsLimit"+ responses:+ "200":+ description: Successfully returned the tag assignments+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/TemplateTagAssignmentsResponse"+ "400":+ $ref: "#/components/responses/400"+ "401":+ $ref: "#/components/responses/401"+ "403":+ $ref: "#/components/responses/403"+ "404":+ $ref: "#/components/responses/404"+ "429":+ $ref: "#/components/responses/429"+ "500":+ $ref: "#/components/responses/500"+/templates/aliases/{alias}:get:summary: Check template alias@@ -4478,6 +5311,37 @@ paths:"500":$ref: "#/components/responses/500"+ /admin/sandboxes/{sandboxID}:+ get:+ summary: Get a sandbox's team and state+ description: |+ Reads the team and state of a sandbox from its latest lifecycle event.+ The state lags the sandbox while that event is in flight. A sandbox+ whose events have expired is not found.+ tags: [admin]+ security:+ - AdminApiKeyAuth: []+ - AdminJWTAuth: []+ parameters:+ - $ref: "#/components/parameters/sandboxID"+ responses:+ "200":+ description: The sandbox, its team and its state+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/AdminSandbox"+ "400":+ $ref: "#/components/responses/400"+ "401":+ $ref: "#/components/responses/401"+ "404":+ $ref: "#/components/responses/404"+ "429":+ $ref: "#/components/responses/429"+ "500":+ $ref: "#/components/responses/500"+/admin/teams/{teamID}/builds/cancel:post:summary: Cancel all builds for a team@@ -4511,6 +5375,36 @@ paths:$ref: "#/components/responses/500"/admin/teams/{teamID}/api-keys:+ get:+ summary: List team API keys as admin+ description: Lists a team's API keys for internal service workflows. Unlike `GET /api-keys`, it does not resolve the team, so it also answers for a banned team.+ tags: [admin]+ security:+ - AdminApiKeyAuth: []+ - AdminJWTAuth: []+ parameters:+ - name: teamID+ in: path+ required: true+ schema:+ type: string+ format: uuid+ description: Team ID+ responses:+ "200":+ description: Successfully returned the team's API keys+ content:+ application/json:+ schema:+ type: array+ items:+ $ref: "#/components/schemas/TeamAPIKey"+ "400":+ $ref: "#/components/responses/400"+ "401":+ $ref: "#/components/responses/401"+ "500":+ $ref: "#/components/responses/500"post:summary: Create team API key as admindescription: Creates a team API key for internal service workflows.@@ -4583,6 +5477,116 @@ paths:"500":$ref: "#/components/responses/500"+ /admin/teams/query:+ post:+ summary: List teams as admin+ description: |+ Lists teams matching the filters in the request body, with each team's+ member count, and its running sandbox count when sorted by running+ sandboxes. A read despite the POST: the body carries a project ID list+ too long for a query string.+ tags: [admin]+ security:+ - AdminApiKeyAuth: []+ - AdminJWTAuth: []+ requestBody:+ required: true+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/AdminTeamListRequest"+ responses:+ "200":+ description: The page of matching teams and the number of all matching teams+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/AdminTeamList"+ "400":+ $ref: "#/components/responses/400"+ "401":+ $ref: "#/components/responses/401"+ "429":+ $ref: "#/components/responses/429"+ "500":+ $ref: "#/components/responses/500"++ /admin/teams/{teamID}:+ get:+ summary: Get a team as admin+ description: Returns a team with its sandbox scheduling labels and cluster. It also answers for a banned or blocked team.+ tags: [admin]+ security:+ - AdminApiKeyAuth: []+ - AdminJWTAuth: []+ parameters:+ - name: teamID+ in: path+ required: true+ schema:+ type: string+ format: uuid+ description: Team ID+ responses:+ "200":+ description: The team+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/AdminTeam"+ "400":+ $ref: "#/components/responses/400"+ "401":+ $ref: "#/components/responses/401"+ "404":+ $ref: "#/components/responses/404"+ "429":+ $ref: "#/components/responses/429"+ "500":+ $ref: "#/components/responses/500"++ /admin/teams/{teamID}/scheduling-labels:+ put:+ summary: Replace a team's sandbox scheduling labels+ description: |+ Replaces the labels that place the team's new sandboxes on matching+ nodes. Labels are deduplicated, keeping the first occurrence of each.+ tags: [admin]+ security:+ - AdminApiKeyAuth: []+ - AdminJWTAuth: []+ parameters:+ - name: teamID+ in: path+ required: true+ schema:+ type: string+ format: uuid+ description: Team ID+ requestBody:+ required: true+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/AdminTeamSchedulingLabels"+ responses:+ "200":+ description: The labels as written+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/AdminTeamSchedulingLabels"+ "400":+ $ref: "#/components/responses/400"+ "401":+ $ref: "#/components/responses/401"+ "404":+ $ref: "#/components/responses/404"+ "429":+ $ref: "#/components/responses/429"+ "500":+ $ref: "#/components/responses/500"+/api-keys:get:summary: List team API keysdiff --git a/spec/runtime-ref b/spec/runtime-refindex aa343f64d..91285abed 100644--- a/spec/runtime-ref+++ b/spec/runtime-ref@@ -1 +1 @@-9cc9ca757b7cfa011874b6a04b82deff7ca771cf+c0e3c5fabbfde1839f6bf08d3627d0401ba82908