---
updatedAt: 2025-11-12T02:58:56.000Z
agentTools:
  projectIndex: https://docs.sevenbridges.com/llms.txt
---

# List the contents of a volume

This call lists the contents of a specific volume. The volume is specified as `volume_id` and consists of the owner and name of a volume (for example `rfranklin/my-first-volume`).

> 📘
>
> If you are using Seven Bridges Platform EU, please use the following endpoint: `https://eu-api.sbgenomics.com/v2/storage/volumes/{volume_owner}/{volume_name}/list`

Here's the list of available values for the `fields` query parameter and their descriptions:

| Value      | Description                                                                                                                                              |
| :--------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `href`     | Shows only the href of each returned item.                                                                                                               |
| `location` | Shows only the location (path) within the volume for each returned item.                                                                                 |
| `volume`   | Shows only the volume on which the returned item is located, in the `<user-name>/<volume-name>` format.                                                  |
| `type`     | Shows only the type of the returned item. Type is `s3` for items stored on an AWS S3 bucket and `gcp` for items stored on a Google Cloud Storage bucket. |
| `metadata` | Shows only the storage-provider-generated metadata for each of the returned items.                                                                       |
| `_all`     | Shows all standard fields for each returned item, with the addition of corresponding metadata.                                                           |

## Response

[See a list of Seven Bridges Platform-specific response codes that may be contained in the body of the response](https://docs.sevenbridges.com/reference/api-status-codes).

## Interpreting the response body

* `href`: Use the information contained in the `href` to make another [request](https://docs.sevenbridges.com/reference/get-details-of-a-file-within-a-volume) to obtain more details about a specific object within a volume.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "seven-bridges-platform",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.sbgenomics.com/v2"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/storage/volumes/{volume_owner}/{volume_name}/list": {
      "get": {
        "summary": "List the contents of a volume",
        "description": "This call lists the contents of a specific volume. The volume is specified as `volume_id` and consists of the owner and name of a volume (for example `rfranklin/my-first-volume`).",
        "operationId": "list-the-contents-of-a-volume",
        "parameters": [
          {
            "name": "volume_owner",
            "in": "path",
            "description": "The username of the volume owner.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-SBG-Auth-Token",
            "in": "header",
            "description": "Your Seven Bridges Platform [authentication token](doc:get-your-authentication-token). For security reasons, token will not be automatically populated in the generated code sample. Please replace `<your-token-here>` with your token before executing this call.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-type",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "prefix",
            "in": "query",
            "description": "The name of the folder in case you want to list the contents of a folder.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "Selector specifying a subset of fields to include in the response.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "volume_name",
            "in": "path",
            "description": "The name of the volume you want to query.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test/list?prefix=my-folder&limit=3\",\n    \"prefix\": \"my-folder\",\n    \"limit\": 3,\n    \"truncated\": false,\n    \"items\": [],\n    \"prefixes\": [\n        {\n            \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test/list?prefix=my-folder/\",\n            \"prefix\": \"my-folder/\",\n            \"volume\": \"rfranklin/sb_test\"\n        },\n        {\n            \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test/list?prefix=my-folder/preserve-structure\",\n            \"prefix\": \"my-folder/preserve-structure\",\n            \"volume\": \"rfranklin/sb_test\"\n        },\n        {\n            \"href\": \"https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test/list?prefix=my-folder/security\",\n            \"prefix\": \"my-folder/security\",\n            \"volume\": \"rfranklin/sb_test\"\n        }\n    ],\n    \"links\": []\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "href": {
                      "type": "string",
                      "example": "https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test/list?prefix=my-folder&limit=3"
                    },
                    "prefix": {
                      "type": "string",
                      "example": "my-folder"
                    },
                    "limit": {
                      "type": "integer",
                      "example": 3,
                      "default": 0
                    },
                    "truncated": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    },
                    "prefixes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "href": {
                            "type": "string",
                            "example": "https://api.sbgenomics.com/v2/storage/volumes/rfranklin/sb_test/list?prefix=my-folder/"
                          },
                          "prefix": {
                            "type": "string",
                            "example": "my-folder/"
                          },
                          "volume": {
                            "type": "string",
                            "example": "rfranklin/sb_test"
                          }
                        }
                      }
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "python",
              "code": "from sevenbridges import Api\n\napi = Api(url='https://api.sbgenomics.com/v2',\n          token='3210a98c1db9318fa9d9273156740f74')\n\nvolume = api.volumes.get(id='rfranklin/sb_test')\n\n# send GET request to SB API\nvolume_items = volume.list(prefix='my-folder')\n\nfor volume_object in volume_items:\n    print(volume_object.location)\nprint(volume_items.prefixes)"
            }
          ],
          "samples-languages": [
            "python"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "X-SBG-Auth-Token",
        "value": "<your-token-here>"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true
}
```