> ## 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 volumes

> Returns one row per volume in the namespace, each with its tags, head version, and version counts. Pass namespace to choose the namespace, which is required because the volume service has no cross-namespace inventory. Versions live on the versions sub-resource, so this response stays a fixed size per volume no matter how long a volume's history is.



## OpenAPI

````yaml get /v1/volumes
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:
    get:
      summary: Gets the volumes in a namespace
      description: >-
        Returns one row per volume in the namespace, each with its tags, head
        version, and version counts. Pass namespace to choose the namespace,
        which is required because the volume service has no cross-namespace
        inventory. Versions live on the versions sub-resource, so this response
        stays a fixed size per volume no matter how long a volume's history is.
      parameters:
        - name: cursor
          in: query
          required: false
          description: >-
            Opaque cursor returned by a previous page. Omit to fetch the first
            page.
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
            title: Cursor
        - name: limit
          in: query
          required: false
          description: Maximum number of volumes to return.
          schema:
            default: 100
            maximum: 1000
            minimum: 1
            title: Limit
            type: integer
        - name: namespace
          in: query
          required: true
          description: >-
            Namespace to list volumes in. Required, because the volume service
            has no cross-namespace inventory.
          schema:
            title: Namespace
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListVolumesResponseV1'
      x-codeSamples:
        - lang: bash
          source: |
            curl --request GET \
            --url https://api.baseten.co/v1/volumes \
            --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"

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

            response = requests.request(
                "GET",
                url,
                headers=headers,
                params={'cursor': None, 'namespace': None}
            )

            print(response.text)
components:
  schemas:
    ListVolumesResponseV1:
      description: A page of volumes in one namespace.
      properties:
        items:
          description: Items in this page.
          items:
            $ref: '#/components/schemas/VolumeV1'
          title: Items
          type: array
        pagination:
          $ref: '#/components/schemas/PaginationResponseV1'
          description: Pagination metadata for the page.
      required:
        - items
        - pagination
      title: ListVolumesResponseV1
      type: object
    VolumeV1:
      properties:
        namespace:
          description: Namespace the volume belongs to, in lowercase.
          title: Namespace
          type: string
        name:
          description: Name of the volume, in lowercase.
          title: Name
          type: string
        version_ref:
          description: >-
            Full address of the volume, as `bdn:<namespace>/<volume>`. Paste
            this into the `bdn.mounts` section of a config.yaml.
          title: Version Ref
          type: string
        sequence:
          description: >-
            Revision counter for the volume, incremented on every commit and tag
            change. Use it to detect that a volume changed.
          title: Sequence
          type: integer
        updated_at:
          description: When the volume last changed, in ISO 8601 format.
          format: date-time
          title: Updated At
          type: string
        head:
          anyOf:
            - $ref: '#/components/schemas/VolumeVersionSummaryV1'
            - type: 'null'
          description: >-
            Version that the reserved `head` tag points at, which a reference
            with no tag or digest resolves to. Null when the volume has no head,
            or when your API key cannot read it.
        tags:
          description: Tags on the volume that your API key can read.
          items:
            $ref: '#/components/schemas/VolumeTagV1'
          title: Tags
          type: array
        tag_count:
          description: >-
            Total number of tags on the volume, which can exceed the length of
            `tags` when your API key cannot read all of them.
          title: Tag Count
          type: integer
        versions_alive:
          description: Number of versions that have not been deleted.
          title: Versions Alive
          type: integer
        versions_tombstoned:
          description: Number of versions that have been deleted.
          title: Versions Tombstoned
          type: integer
        versions_untagged:
          description: Number of versions that no tag points at.
          title: Versions Untagged
          type: integer
      required:
        - namespace
        - name
        - version_ref
        - sequence
        - updated_at
        - head
        - tags
        - tag_count
        - versions_alive
        - versions_tombstoned
        - versions_untagged
      title: VolumeV1
      type: object
    PaginationResponseV1:
      properties:
        has_more:
          description: Whether more items exist after this page.
          title: Has More
          type: boolean
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Opaque cursor to pass into the next request. Null when there is no
            next page.
          title: Cursor
      required:
        - has_more
      title: PaginationResponseV1
      type: object
    VolumeVersionSummaryV1:
      properties:
        digest:
          description: Content digest of the version, as `b3:<hex>`.
          title: Digest
          type: string
        total_size_bytes:
          description: Total size of the version's files in bytes.
          title: Total Size Bytes
          type: integer
        created_at:
          description: When the version was committed, in ISO 8601 format.
          format: date-time
          title: Created At
          type: string
      required:
        - digest
        - total_size_bytes
        - created_at
      title: VolumeVersionSummaryV1
      type: object
    VolumeTagV1:
      properties:
        name:
          description: Tag name. Tags are case-sensitive.
          title: Name
          type: string
        digest:
          description: Digest of the version the tag points at, as `b3:<hex>`.
          title: Digest
          type: string
      required:
        - name
        - digest
      title: VolumeTagV1
      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.

````