# Query Catalog reference

Returns the current results of the Catalog reference query.

```text
POST $CLOUDSIGMA_API_BASE/catalog/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 catalog list](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/catalog/list-catalogs.html.md) to obtain the target catalog ID.

Set the operation-specific values used in the request:

- `$CATALOG_ID`: The Catalog ID of the reference is to be queried.

## Request example

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

## Request body

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

## Successful response

Returns `200` on success. The current implementation returns an empty array, and this result cannot be used to confirm that the Catalog has no references; the actual result of the deletion operation is subject to the deletion 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` | object[] | Is currently fixed to an empty array and cannot be used to determine whether a reference exists. |

`[]` after a type means an array. For example, `object[]` is an array of objects.

## Error response

```json
{
  "code": "ErrServer",
  "msg": "服务器内部错误",
  "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`
  - The request body or Catalog ID is invalid.
  - Positive integer IDs returned using a list.
* - `403`
  - `ErrForbidden`
  - The current identity does not have read permission.
  - Requesting permission to `catalog.read`.
* - `500`
  - `ErrServer`
  - The server failed to query the reference.
  - Try again later.
```

## Follow-up operations

When you need to delete the Catalog, directly call [Delete Catalog](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/catalog/delete-catalog.html.md) and process the result according to its response.
