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

# List volume versions

> Returns every live version of the volume, newest first, each with its digest, size, lifecycle, and the tags pointing at it. Pass include_tombstoned to list deleted versions alongside them.



## OpenAPI

````yaml get /v1/volumes/{volume_namespace}/{volume_name}/versions
openapi: 3.1.0
info:
  description: REST API for management of Baseten resources
  title: Baseten management API
  version: 1.0.0
servers:
  - url: https://api.baseten.co
security:
  - BearerAuth: []
paths:
  /v1/volumes/{volume_namespace}/{volume_name}/versions:
    parameters:
      - $ref: '#/components/parameters/volume_namespace'
      - $ref: '#/components/parameters/volume_name'
    get:
      summary: Gets the versions of a volume
      description: >-
        Returns every live version of the volume, newest first, each with its
        digest, size, lifecycle, and the tags pointing at it. Pass
        include_tombstoned to list deleted versions alongside them.
      parameters:
        - name: include_tombstoned
          in: query
          required: false
          description: >-
            Whether to include deleted versions. A deleted version carries a
            TOMBSTONED lifecycle and stays restorable until its recovery
            deadline passes.
          schema:
            default: false
            title: Include Tombstoned
            type: boolean
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListVolumeVersionsResponseV1'
      x-codeSamples:
        - lang: bash
          source: >
            curl --request GET \

            --url
            https://api.baseten.co/v1/volumes/{volume_namespace}/{volume_name}/versions
            \

            --header "Authorization: Bearer $BASETEN_API_KEY"
        - lang: python
          source: >-
            import requests

            import os

            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")

            url =
            "https://api.baseten.co/v1/volumes/{volume_namespace}/{volume_name}/versions"


            headers = {"Authorization": f"Bearer {API_KEY}"}


            response = requests.request(
                "GET",
                url,
                headers=headers,
                params={}
            )


            print(response.text)
components:
  parameters:
    volume_namespace:
      schema:
        type: string
      name: volume_namespace
      in: path
      required: true
    volume_name:
      schema:
        type: string
      name: volume_name
      in: path
      required: true
  schemas:
    ListVolumeVersionsResponseV1:
      description: |-
        Every version of a volume, newest first.

        Unpaginated: `limit` and `cursor` are absent rather than accepted and
        ignored, so adding them once the volume service pages this listing is a
        purely additive change.
      properties:
        versions:
          description: Versions of the volume, newest first.
          items:
            $ref: '#/components/schemas/VolumeVersionV1'
          title: Versions
          type: array
        volume_sequence:
          description: >-
            Revision of the volume as a whole when the versions were read. Pass
            it as expected_sequence on a later delete to make that delete
            conditional on the volume not having changed since. Distinct from
            the per-version sequence, which is the revision a version was
            committed at.
          title: Volume Sequence
          type: integer
      required:
        - versions
        - volume_sequence
      title: ListVolumeVersionsResponseV1
      type: object
    VolumeVersionV1:
      properties:
        namespace:
          description: Namespace the volume belongs to, in lowercase.
          title: Namespace
          type: string
        volume:
          description: Name of the volume, in lowercase.
          title: Volume
          type: string
        version_ref:
          description: >-
            Full address of this version, as
            `bdn:<namespace>/<volume>@<digest>`. Paste this into the
            `bdn.mounts` section of a config.yaml to pin to it.
          title: Version Ref
          type: string
        digest:
          description: Content digest of the version, as `b3:<hex>`.
          title: Digest
          type: string
        sequence:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Revision the version was committed at. Null for versions committed
            before the volume service recorded it.
          title: Sequence
        lifecycle:
          description: Lifecycle state of the version, for example ALIVE or TOMBSTONED.
          title: Lifecycle
          type: string
        is_head:
          description: Whether the reserved `head` tag points at this version.
          title: Is Head
          type: boolean
        tags:
          description: Tags pointing at this version that your API key can read.
          items:
            type: string
          title: Tags
          type: array
        total_size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          description: Total size of the version's files in bytes. Null when not recorded.
          title: Total Size Bytes
        created_at:
          description: When the version was committed, in ISO 8601 format.
          format: date-time
          title: Created At
          type: string
        tombstoned_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            When the version was deleted, in ISO 8601 format. Null unless the
            lifecycle is TOMBSTONED.
          title: Tombstoned At
        delete_after:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            When the version stops being restorable, in ISO 8601 format. Null
            unless the lifecycle is TOMBSTONED.
          title: Delete After
      required:
        - namespace
        - volume
        - version_ref
        - digest
        - sequence
        - lifecycle
        - is_head
        - tags
        - total_size_bytes
        - created_at
        - tombstoned_at
        - delete_after
      title: VolumeVersionV1
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````