openapi: 3.0.0 info: version: 0.1.0 title: E2B access-tokens volumes API servers: - url: https://api.e2b.app tags: - name: volumes paths: /volumes: get: description: List all team volumes tags: - volumes security: - ApiKeyAuth: [] - Supabase1TokenAuth: [] Supabase2TeamAuth: [] responses: '200': description: Successfully listed all team volumes content: application/json: schema: type: array items: $ref: '#/components/schemas/Volume' '401': $ref: '#/components/responses/401' '500': $ref: '#/components/responses/500' post: description: Create a new team volume tags: - volumes security: - ApiKeyAuth: [] - Supabase1TokenAuth: [] Supabase2TeamAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/NewVolume' responses: '201': description: Successfully created a new team volume content: application/json: schema: $ref: '#/components/schemas/VolumeAndToken' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '500': $ref: '#/components/responses/500' /volumes/{volumeID}: get: description: Get team volume info tags: - volumes security: - ApiKeyAuth: [] - Supabase1TokenAuth: [] Supabase2TeamAuth: [] parameters: - $ref: '#/components/parameters/volumeID' responses: '200': description: Successfully retrieved a team volume content: application/json: schema: $ref: '#/components/schemas/VolumeAndToken' '401': $ref: '#/components/responses/401' '404': $ref: '#/components/responses/404' '500': $ref: '#/components/responses/500' delete: description: Delete a team volume tags: - volumes security: - ApiKeyAuth: [] - Supabase1TokenAuth: [] Supabase2TeamAuth: [] parameters: - $ref: '#/components/parameters/volumeID' responses: '204': description: Successfully deleted a team volume '401': $ref: '#/components/responses/401' '404': $ref: '#/components/responses/404' '500': $ref: '#/components/responses/500' /volumecontent/{volumeID}/path: get: description: Get path information tags: - volumes parameters: - $ref: '#/components/parameters/volumeID' - $ref: '#/components/parameters/path' responses: '200': description: Successfully retrieved path information content: application/json: schema: $ref: '#/components/schemas/VolumeEntryStat' '404': $ref: '#/components/responses/404' patch: description: Update path metadata tags: - volumes parameters: - $ref: '#/components/parameters/volumeID' - $ref: '#/components/parameters/path' requestBody: required: true content: application/json: schema: type: object properties: uid: type: integer format: uint32 gid: type: integer format: uint32 mode: type: integer format: uint32 responses: '200': description: Successfully updated a file's metadata content: application/json: schema: $ref: '#/components/schemas/VolumeEntryStat' '400': description: Invalid metadata provided '404': description: path not found '500': description: Internal server error delete: description: Delete a path tags: - volumes parameters: - $ref: '#/components/parameters/volumeID' - $ref: '#/components/parameters/path' responses: '204': description: Successfully deleted a path '404': $ref: '#/components/responses/404' /volumecontent/{volumeID}/dir: get: description: List directory contents tags: - volumes parameters: - $ref: '#/components/parameters/volumeID' - $ref: '#/components/parameters/path' - name: depth in: query description: Number of layers deep to recurse into the directory schema: type: integer format: uint32 default: 1 responses: '200': description: Successfully retrieved a directory listing content: application/json: schema: $ref: '#/components/schemas/VolumeDirectoryListing' '400': description: Invalid path provided '404': description: path not found '500': $ref: '#/components/responses/500' post: description: Create a directory tags: - volumes parameters: - $ref: '#/components/parameters/volumeID' - $ref: '#/components/parameters/path' - name: uid in: query description: User ID of the created directory schema: type: integer format: uint32 - name: gid in: query description: Group ID of the created directory schema: type: integer format: uint32 - name: mode in: query description: Mode of the created directory schema: type: integer format: uint32 - name: force in: query description: Create the parents of a directory if they don't exist schema: type: boolean responses: '201': description: Successfully created a directory content: application/json: schema: $ref: '#/components/schemas/VolumeEntryStat' '404': description: path not found '500': $ref: '#/components/responses/500' /volumecontent/{volumeID}/file: get: description: Download file tags: - volumes parameters: - $ref: '#/components/parameters/volumeID' - $ref: '#/components/parameters/path' responses: '200': description: Successfully downloaded a file content: application/octet-stream: schema: type: string format: binary '404': description: path not found '500': $ref: '#/components/responses/500' put: description: Upload file tags: - volumes parameters: - $ref: '#/components/parameters/volumeID' - $ref: '#/components/parameters/path' - name: uid in: query description: User ID of the uploaded file schema: type: integer format: uint32 - name: gid in: query description: Group ID of the uploaded file schema: type: integer format: uint32 - name: mode in: query description: Mode of the uploaded file schema: type: integer format: uint32 - name: force in: query description: Force overwrite of an existing file schema: type: boolean requestBody: content: application/octet-stream: schema: type: string format: binary responses: '201': description: Successfully created a file content: application/json: schema: $ref: '#/components/schemas/VolumeEntryStat' '404': description: path not found '500': $ref: '#/components/responses/500' components: parameters: path: name: path in: query required: true schema: type: string volumeID: name: volumeID in: path required: true schema: type: string schemas: NewVolume: type: object properties: name: type: string description: Name of the volume pattern: ^[a-zA-Z0-9_-]+$ required: - name VolumeAndToken: type: object properties: volumeID: type: string description: ID of the volume name: type: string description: Name of the volume token: type: string description: Auth token to use for interacting with volume content required: - volumeID - name - token Volume: type: object properties: volumeID: type: string description: ID of the volume name: type: string description: Name of the volume required: - volumeID - name VolumeEntryStat: type: object properties: name: type: string type: type: string enum: - unknown - file - directory - symlink path: type: string size: type: integer format: int64 mode: type: integer format: uint32 uid: type: integer format: uint32 gid: type: integer format: uint32 atime: type: string format: date-time mtime: type: string format: date-time ctime: type: string format: date-time target: type: string required: - name - type - path - size - mode - uid - gid - atime - mtime - ctime Error: required: - code - message properties: code: type: integer format: int32 description: Error code message: type: string description: Error VolumeDirectoryListing: type: array items: $ref: '#/components/schemas/VolumeEntryStat' responses: '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad request 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