# Query Catalog details

Query the details of a Catalog by ID.

```text
POST https://moi.matrixorigin.cn/newmoi/catalog/info
```

## Preparation before calling

First [query the catalog list](list-catalogs.md) to obtain the target catalog ID. Prepare the personal access token, target workspace ID, and Catalog ID that have access to the target workspace.

The example below uses:

- `$AI_STUDIO_API_KEY`: The actual personal access token, passed through the `X-API-Key` Header.
- `$WORKSPACE_ID`: Target workspace ID, passed through `X-Workspace-ID` Header.
- `$CATALOG_ID`: Catalog ID to be queried.

## Request example

```bash
curl -X POST "https://moi.matrixorigin.cn/newmoi/catalog/info" \
  -H "X-API-Key: $AI_STUDIO_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` and Catalog details on success.

```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "catalog": {
      "id": 1,
      "name": "sales",
      "display_name": "sales",
      "description": "销售数据",
      "display_description": "销售数据"
    }
  }
}
```

The response fields are as follows.

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | `OK` on success. |
| `msg` | string | `OK` on success. |
| `data.catalog.id` | integer | Catalog ID. |
| `data.catalog.name` | string | Catalog original name. |
| `data.catalog.description` | string | Catalog description. |
| `data.catalog.display_name` | string | Catalog display name; returned if there is a value. |
| `data.catalog.display_description` | string | Catalog Display description; return if there is a value. |

## Error response

```json
{
  "code": "ErrObjectNotFound",
  "msg": "Catalog 不存在",
  "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 cannot be parsed or `id` is invalid.
  - Positive integer IDs returned using a list.
* - `403`
  - `ErrForbidden`
  - The current identity does not have Catalog read permission.
  - Requesting permission to `catalog.read`.
* - `404`
  - `ErrObjectNotFound`
  - Catalog does not exist or cannot be read.
  - Verify Catalog ID and workspace.
* - `500`
  - `ErrServer`
  - The server failed to read the details.
  - Try again later.
```

## Follow-up operations

When modifications are needed [Update Catalog](update-catalog.md). When returning the list [Query file products](list-file-artifacts.md).
