openapi: 3.0.0 info: version: 0.1.0 title: E2B access-tokens admin API servers: - url: https://api.e2b.app tags: - name: admin paths: /nodes: get: description: List all nodes tags: - admin security: - AdminTokenAuth: [] responses: '200': description: Successfully returned all nodes content: application/json: schema: type: array items: allOf: - $ref: '#/components/schemas/Node' '401': $ref: '#/components/responses/401' '500': $ref: '#/components/responses/500' /nodes/{nodeID}: get: description: Get node info tags: - admin security: - AdminTokenAuth: [] parameters: - $ref: '#/components/parameters/nodeID' - in: query name: clusterID description: Identifier of the cluster required: false schema: type: string format: uuid responses: '200': description: Successfully returned the node content: application/json: schema: $ref: '#/components/schemas/NodeDetail' '401': $ref: '#/components/responses/401' '404': $ref: '#/components/responses/404' '500': $ref: '#/components/responses/500' post: description: Change status of a node tags: - admin security: - AdminTokenAuth: [] parameters: - $ref: '#/components/parameters/nodeID' requestBody: content: application/json: schema: $ref: '#/components/schemas/NodeStatusChange' responses: '204': description: The node status was changed successfully '401': $ref: '#/components/responses/401' '404': $ref: '#/components/responses/404' '500': $ref: '#/components/responses/500' /admin/teams/{teamID}/sandboxes/kill: post: summary: Kill all sandboxes for a team description: Kills all sandboxes for the specified team tags: - admin security: - AdminTokenAuth: [] parameters: - name: teamID in: path required: true schema: type: string format: uuid description: Team ID responses: '200': description: Successfully killed sandboxes content: application/json: schema: $ref: '#/components/schemas/AdminSandboxKillResult' '401': $ref: '#/components/responses/401' '404': $ref: '#/components/responses/404' '500': $ref: '#/components/responses/500' /admin/teams/{teamID}/builds/cancel: post: summary: Cancel all builds for a team description: Cancels all in-progress and pending builds for the specified team tags: - admin security: - AdminTokenAuth: [] parameters: - name: teamID in: path required: true schema: type: string format: uuid description: Team ID responses: '200': description: Successfully cancelled builds content: application/json: schema: $ref: '#/components/schemas/AdminBuildCancelResult' '401': $ref: '#/components/responses/401' '404': $ref: '#/components/responses/404' '500': $ref: '#/components/responses/500' components: parameters: nodeID: name: nodeID in: path required: true schema: type: string schemas: DiskMetrics: required: - mountPoint - device - filesystemType - usedBytes - totalBytes properties: mountPoint: type: string description: Mount point of the disk device: type: string description: Device name filesystemType: type: string description: Filesystem type (e.g., ext4, xfs) usedBytes: type: integer format: uint64 description: Used space in bytes totalBytes: type: integer format: uint64 description: Total space in bytes NodeStatus: type: string description: Status of the node enum: - ready - draining - connecting - unhealthy x-enum-varnames: - NodeStatusReady - NodeStatusDraining - NodeStatusConnecting - NodeStatusUnhealthy NodeStatusChange: required: - status properties: clusterID: type: string format: uuid description: Identifier of the cluster status: $ref: '#/components/schemas/NodeStatus' NodeMetrics: description: Node metrics required: - allocatedCPU - allocatedMemoryBytes - cpuPercent - memoryUsedBytes - cpuCount - memoryTotalBytes - disks properties: allocatedCPU: type: integer format: uint32 description: Number of allocated CPU cores cpuPercent: type: integer format: uint32 description: Node CPU usage percentage cpuCount: type: integer format: uint32 description: Total number of CPU cores on the node allocatedMemoryBytes: type: integer format: uint64 description: Amount of allocated memory in bytes memoryUsedBytes: type: integer format: uint64 description: Node memory used in bytes memoryTotalBytes: type: integer format: uint64 description: Total node memory in bytes disks: type: array description: Detailed metrics for each disk/mount point items: $ref: '#/components/schemas/DiskMetrics' Node: required: - id - serviceInstanceID - clusterID - status - sandboxCount - metrics - createSuccesses - createFails - sandboxStartingCount - version - commit - machineInfo properties: version: type: string description: Version of the orchestrator commit: type: string description: Commit of the orchestrator id: type: string description: Identifier of the node serviceInstanceID: type: string description: Service instance identifier of the node clusterID: type: string description: Identifier of the cluster machineInfo: $ref: '#/components/schemas/MachineInfo' status: $ref: '#/components/schemas/NodeStatus' sandboxCount: type: integer format: uint32 description: Number of sandboxes running on the node metrics: $ref: '#/components/schemas/NodeMetrics' createSuccesses: type: integer format: uint64 description: Number of sandbox create successes createFails: type: integer format: uint64 description: Number of sandbox create fails sandboxStartingCount: type: integer format: int description: Number of starting Sandboxes AdminSandboxKillResult: required: - killedCount - failedCount properties: killedCount: type: integer description: Number of sandboxes successfully killed failedCount: type: integer description: Number of sandboxes that failed to kill NodeDetail: required: - id - serviceInstanceID - clusterID - status - sandboxCount - cachedBuilds - createSuccesses - createFails - version - commit - metrics - machineInfo properties: clusterID: type: string description: Identifier of the cluster version: type: string description: Version of the orchestrator commit: type: string description: Commit of the orchestrator id: type: string description: Identifier of the node serviceInstanceID: type: string description: Service instance identifier of the node machineInfo: $ref: '#/components/schemas/MachineInfo' status: $ref: '#/components/schemas/NodeStatus' sandboxCount: type: integer format: uint32 description: Number of sandboxes running on the node metrics: $ref: '#/components/schemas/NodeMetrics' cachedBuilds: type: array description: List of cached builds id on the node items: type: string createSuccesses: type: integer format: uint64 description: Number of sandbox create successes createFails: type: integer format: uint64 description: Number of sandbox create fails MachineInfo: required: - cpuFamily - cpuModel - cpuModelName - cpuArchitecture properties: cpuFamily: type: string description: CPU family of the node cpuModel: type: string description: CPU model of the node cpuModelName: type: string description: CPU model name of the node cpuArchitecture: type: string description: CPU architecture of the node AdminBuildCancelResult: required: - cancelledCount - failedCount properties: cancelledCount: type: integer description: Number of builds successfully cancelled failedCount: type: integer description: Number of builds that failed to cancel Error: required: - code - message properties: code: type: integer format: int32 description: Error code message: type: string description: Error responses: '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Authentication error content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-API-Key AccessTokenAuth: type: http scheme: bearer bearerFormat: access_token Supabase1TokenAuth: type: apiKey in: header name: X-Supabase-Token Supabase2TeamAuth: type: apiKey in: header name: X-Supabase-Team AdminTokenAuth: type: apiKey in: header name: X-Admin-Token