---
agentTools:
  projectIndex: https://docs.cancergenomicscloud.org/llms.txt
---

# Get details of a file within a volume

This call lists the details of a file (object) in 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`).

## Request

```text Path
https://cgc-api.sbgenomics.com/v2/storage/volumes/{volume_id}/{object_id}
```

## Example request

```http
GET /v2/storage/volumes/rfranklin/my-first-volume/{object_id} HTTP/1.1
Host: cgc-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
```
```curl cURL
curl  -s -H "X-SBG-Auth-Token: 6282d5e2121d43e7900e9d52b15845e7" -H "Content-type: application/json" -X GET "https://cgc-api.sbgenomics.com/storage/volumes/rfranklin/my-first-volume/{object_id}"
```

### Header Fields

[block:parameters]
{
  "data": {
    "h-0": "Key",
    "h-1": "Description of value",
    "0-0": "`X-SBG-Auth-Token`  \n_required_",
    "0-1": "Your CGC [authentication token](https://docs.cancergenomicscloud.org/docs/get-your-authentication-token).",
    "1-0": "`Content-type`  \n_required_",
    "1-1": "`application/json`"
  },
  "cols": 2,
  "rows": 2,
  "align": [
    "left",
    "left"
  ]
}
[/block]

### Path parameters

[block:parameters]
{
  "data": {
    "h-0": "Key",
    "h-1": "Data type of value",
    "h-2": "Description of value",
    "0-0": "`volume_id`  \n_required_",
    "0-1": "String",
    "0-2": "The volume that you want to query, which consists of username of the volume owner and volume name, for example `rfranklin/my-first-volume`.",
    "1-0": "`object_id`  \n_required_",
    "1-1": "String",
    "1-2": "This is the `href` from the request to [list the contents of a volume](https://docs.cancergenomicscloud.org/reference/list-the-contents-of-a-volume)."
  },
  "cols": 3,
  "rows": 2,
  "align": [
    "left",
    "left",
    "left"
  ]
}
[/block]

## Response

[See a list of CGC-specific response codes that may be contained in the body of the response.](https://docs.cancergenomicscloud.org/reference/api-status-codes)

## Example response body

```json
{
  "href": "https://gcp-api.sbgenomics.com/v2/storage/volumes/rfranklin/my-first-volume/object?location=20.intervals",
  "location": "20.intervals",
  "volume": "rfranklin/my-first-volume",
  "type": "gcs",
  "metadata": {
    "bucket": "example-bucket",
    "contentType": "binary/octet-stream",
    "crc32c": "P1RVmQ==",
    "etag": "CNjexsvWvc0CEAE=",
    "generation": 1463468676135000,
    "id": "example-bucket/input-files/20.intervals/1463468676135000",
    "kind": "storage#object",
    "md5Hash": "0SgvPL/j5a/TOHXpzkfX0A==",
    "mediaLink": "https://www.googleapis.com/download/storage/*********",
    "metageneration": 1,
    "name": "input-files/20.intervals",
    "selfLink": "https://www.googleapis.com/storage/v1/b/example-bucket/o/input-files%2F20.intervals",
    "size": 9,
    "storageClass": "STANDARD",
    "timeCreated": {
      "value": 1466668676132,
      "dateOnly": false,
      "timeZoneShift": 0
    },
    "updated": {
      "value": 1466668676132,
      "dateOnly": false,
      "timeZoneShift": 0
    },
    "timeStorageClassUpdated": "2016-06-23T07:57:56.132Z"
  }
}
```

## Interpreting the response body

* `href`: Use the information contained in the `href` to make another [request](https://docs.cancergenomicscloud.org/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": "API Settings",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://cgc-api.sbgenomics.com/v2"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/v2/storage/volumes/{volume_id}/{object_id}": {
      "get": {
        "summary": "Get details of a file within a volume",
        "description": "",
        "operationId": "get-details-of-a-file-within-a-volume",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true,
  "_id": "63066bb306c271335b0a59cb:5931c1c886334d000fcaabe7"
}
```