> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anonalabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List template builds

> List all builds for a template



## OpenAPI

````yaml /compute/api-reference/e2b-openapi.yaml get /templates/{templateID}
openapi: 3.0.0
info:
  title: Anona Compute API (E2B-compatible routes)
  version: 0.1.0
  description: >-
    The E2B API operations the Anona Compute gateway serves, from the E2B spec
    pinned at e2b SDK 2.61.0 (`gateway/third_party/specs/e2b/openapi.yml`).
    Generated by `docs-site/scripts/gen_e2b_openapi.py`; do not edit by hand.
servers:
  - url: https://api.compute.anonalabs.com
security: []
tags:
  - name: sandboxes
paths:
  /templates/{templateID}:
    get:
      tags:
        - templates
      summary: List template builds
      description: List all builds for a template
      parameters:
        - $ref: '#/components/parameters/templateID'
        - $ref: '#/components/parameters/paginationNextToken'
        - $ref: '#/components/parameters/paginationLimit'
      responses:
        '200':
          description: Successfully returned the template with its builds
          headers:
            X-Next-Token:
              $ref: '#/components/headers/XNextToken'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateWithBuilds'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    templateID:
      name: templateID
      in: path
      required: true
      schema:
        type: string
    paginationNextToken:
      name: nextToken
      in: query
      description: Cursor to start the list from
      required: false
      schema:
        type: string
    paginationLimit:
      name: limit
      in: query
      description: Maximum number of items to return per page
      required: false
      schema:
        type: integer
        format: int32
        minimum: 1
        default: 100
        maximum: 100
  headers:
    XNextToken:
      description: Cursor to fetch the next page of results, if more exist
      schema:
        type: string
  schemas:
    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'
    Template:
      required:
        - templateID
        - buildID
        - cpuCount
        - memoryMB
        - diskSizeMB
        - public
        - createdAt
        - updatedAt
        - createdBy
        - lastSpawnedAt
        - spawnCount
        - buildCount
        - envdVersion
        - aliases
        - names
        - buildStatus
      properties:
        templateID:
          type: string
          description: Identifier of the template
        buildID:
          type: string
          description: Identifier of the last successful build for given template
        cpuCount:
          $ref: '#/components/schemas/CPUCount'
        memoryMB:
          $ref: '#/components/schemas/MemoryMB'
        diskSizeMB:
          $ref: '#/components/schemas/DiskSizeMB'
        public:
          type: boolean
          description: 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:
          type: array
          description: Names of the template (namespace/alias format when namespaced)
          items:
            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
        createdBy:
          allOf:
            - $ref: '#/components/schemas/TeamUser'
          nullable: true
        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
        buildCount:
          type: integer
          format: int32
          description: Number of times the template was built
        envdVersion:
          $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 template
    TemplateBuild:
      required:
        - buildID
        - status
        - createdAt
        - updatedAt
        - cpuCount
        - memoryMB
      properties:
        buildID:
          type: string
          format: uuid
          description: Identifier of the build
        status:
          $ref: '#/components/schemas/TemplateBuildStatus'
        createdAt:
          type: string
          format: date-time
          description: Time when the build was created
        updatedAt:
          type: string
          format: date-time
          description: Time when the build was last updated
        finishedAt:
          type: string
          format: date-time
          description: Time when the build was finished
        cpuCount:
          $ref: '#/components/schemas/CPUCount'
        memoryMB:
          $ref: '#/components/schemas/MemoryMB'
        diskSizeMB:
          $ref: '#/components/schemas/DiskSizeMB'
        envdVersion:
          $ref: '#/components/schemas/EnvdVersion'
    Error:
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: Error code
        error_code:
          type: string
          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.
        message:
          type: string
          description: Error
    CPUCount:
      type: integer
      format: int32
      minimum: 1
      description: CPU cores for the sandbox
    MemoryMB:
      type: integer
      format: int32
      minimum: 128
      description: Memory for the sandbox in MiB
    DiskSizeMB:
      type: integer
      format: int32
      minimum: 0
      description: Disk size for the sandbox in MiB
    TeamUser:
      required:
        - id
        - email
      properties:
        id:
          type: string
          format: uuid
          description: Identifier of the user
        email:
          type: string
          nullable: true
          deprecated: true
          default: null
          description: Email of the user
    EnvdVersion:
      type: string
      description: Version of the envd running in the sandbox
    TemplateBuildStatus:
      type: string
      description: Status of the template build
      enum:
        - building
        - waiting
        - ready
        - error
  responses:
    '401':
      description: Authentication error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '404':
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '429':
      description: Too many requests
      headers:
        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':
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.