# Query volume reference

Returns the current results of the volume reference query.

```text
POST $CLOUDSIGMA_API_BASE/catalog/volume/ref_list
```

## Before you call this API

Configure the [regional API endpoint and authentication](https://omnifabric.cloudsigma.com/docs/developer/endpoints-and-authentication.html.md), and select the target workspace.

First [query the object](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/catalog/list-database-objects.html.md) in the database to obtain the target volume ID.

Set the operation-specific values used in the request:

- `$VOLUME_ID`: The referenced volume ID is to be queried.

## Request example

```bash
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/volume/ref_list" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
    "id": '"$VOLUME_ID"'
  }'
```

## Request body

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | Yes | Volume ID. |

## Successful response

Returns `200` on success. The current implementation returns an empty array, and this result cannot be used to confirm that the volume is not referenced; the actual result of the delete operation is subject to the delete interface response.

```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "list": []
  }
}
```

The response fields are as follows.

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | `OK` on success. |
| `msg` | string | `OK` on success. |
| `data.list` | array | It is currently fixed to an empty array and cannot be used to determine whether a reference exists. |

## Error response

```json
{
  "code": "ErrParamInvalid",
  "msg": "id 无效",
  "data": null
}
```

### Common HTTP errors

```{list-table}
:header-rows: 1
:widths: 12 22 32 34

* - HTTP status code
  - error code
  - Common causes
  - Recommended actions
* - `400`
  - `ErrParamInvalid`
  - `id` is missing or in an invalid format.
  - Pass in a valid volume ID.
* - `403`
  - `ErrForbidden`
  - The current identity does not have read permission for the volume.
  - Use credentials with read access, or contact your administrator for authorization.
* - `500`
  - `ErrServer`
  - The service cannot read the reference information.
  - Record the request time and error message and try again; if it continues to fail, contact support.
```
