E2B

E2B tags API

The tags API from E2B — 2 operation(s) for tags.

OpenAPI Specification

e2b-dev-tags-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 0.1.0
  title: E2B access-tokens tags API
servers:
- url: https://api.e2b.app
tags:
- name: tags
paths:
  /templates/tags:
    post:
      description: Assign tag(s) to a template build
      tags:
      - tags
      security:
      - ApiKeyAuth: []
      - Supabase1TokenAuth: []
        Supabase2TeamAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssignTemplateTagsRequest'
      responses:
        '201':
          description: Tag assigned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssignedTemplateTags'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
    delete:
      description: Delete multiple tags from templates
      tags:
      - tags
      security:
      - ApiKeyAuth: []
      - Supabase1TokenAuth: []
        Supabase2TeamAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteTemplateTagsRequest'
      responses:
        '204':
          description: Tags deleted successfully
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
  /templates/{templateID}/tags:
    get:
      description: List all tags for a template
      tags:
      - tags
      security:
      - ApiKeyAuth: []
      - Supabase1TokenAuth: []
        Supabase2TeamAuth: []
      parameters:
      - $ref: '#/components/parameters/templateID'
      responses:
        '200':
          description: Successfully returned the template tags
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TemplateTag'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
components:
  parameters:
    templateID:
      name: templateID
      in: path
      required: true
      schema:
        type: string
  schemas:
    AssignTemplateTagsRequest:
      required:
      - target
      - tags
      properties:
        target:
          type: string
          description: Target template in "name:tag" format
        tags:
          description: Tags to assign to the template
          type: array
          items:
            type: string
    TemplateTag:
      required:
      - tag
      - buildID
      - createdAt
      properties:
        tag:
          type: string
          description: The tag name
        buildID:
          type: string
          format: uuid
          description: Identifier of the build associated with this tag
        createdAt:
          type: string
          format: date-time
          description: Time when the tag was assigned
    DeleteTemplateTagsRequest:
      required:
      - name
      - tags
      properties:
        name:
          type: string
          description: Name of the template
        tags:
          description: Tags to delete
          type: array
          items:
            type: string
    AssignedTemplateTags:
      required:
      - tags
      - buildID
      properties:
        tags:
          type: array
          items:
            type: string
          description: Assigned tags of the template
        buildID:
          type: string
          format: uuid
          description: Identifier of the build associated with these tags
    Error:
      required:
      - code
      - message
      properties:
        code:
          type: integer
          format: int32
          description: Error code
        message:
          type: string
          description: Error
  responses:
    '403':
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '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