> For the complete documentation index, see [llms.txt](https://doc.batch.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.batch.com/developer/api/cep/catalogs/view.md).

# View catalog

{% hint style="info" %}
**Beta.** The `pending_replace` block is part of the Beta catalog replace feature. Batch returns it only when a replace session is open for the catalog. Batch also returns it only to callers that send the `Batch-Beta: catalog-replace` header on API version `2.11` or later.
{% endhint %}

Use `/catalogs/view` to view an existing catalog.

## View

> Get information about an existing catalog.

```json
{"openapi":"3.1.0","info":{"title":"Batch - REST API","version":"2.9"},"tags":[{"name":"Catalogs"}],"servers":[{"url":"https://api.batch.com/{version}","description":"production","variables":{"version":{"default":"2.12","description":"Version of the API"}}}],"security":[{"rest_key":[]}],"components":{"securitySchemes":{"rest_key":{"type":"http","scheme":"bearer","description":"## API Key Authentication\n\nAuthentication is required in order to interact with Batch's APIs.\n\nBatch implements authentication using API Keys, that we call the \"REST API Key\".\nYou can find it on your dashboard.\n\nPlease make sure that you keep this key secret. You should never use it in client apps to call APIs from there as it would\neasily be extractable.\n\n### How to authenticate\n\nIn order to authenticate your requests, add your REST API Key in the `Authorization` header and prefix it by `Bearer`. Example: `Authorization: Bearer bcd38d9rfb38ra28`.\n"}},"parameters":{"HeaderProjectKey":{"in":"header","name":"X-Batch-Project","description":"The unique project key, identifying a project on the Batch platform","schema":{"type":"string"},"required":true},"HeaderBatchBetaReplaceOptional":{"in":"header","name":"Batch-Beta","description":"Beta opt-in. This header is optional here, because the endpoint is stable. If you send the `catalog-replace` flag, the response also includes the Beta-only `pending_replace` block. If you do not send the flag, the response does not change.\n","schema":{"$ref":"#/components/schemas/BatchBetaFlags"},"required":false}},"schemas":{"BatchBetaFlags":{"description":"Value of the `Batch-Beta` header. It is a comma-separated list of Beta contract flags. Thus one request can opt into more than one Beta contract at the same time (`first-flag, second-flag`). Flags are lowercase and case-sensitive, and the order does not matter. Batch rejects an unknown flag with a `400` on any endpoint. When a contract becomes generally available, Batch continues to accept its flag but the flag has no more effect. Thus you never need to remove it.\n","type":"string"},"catalog":{"description":"A catalog represents a structured collection of items and associated fields that define the schema of those items.","type":"object","required":["name","fields","items","size","created","updated"],"properties":{"name":{"type":"string","description":"Unique identifier for the catalog, used for referencing in API calls."},"fields":{"type":"array","description":"List of fields that define the schema of items in the catalog.","items":{"$ref":"#/components/schemas/field"},"minItems":1,"maxItems":25},"items":{"type":"integer","description":"Total number of items currently stored in this catalog."},"size":{"type":"integer","description":"Size of the catalog data in bytes."},"created":{"type":"string","format":"date-time","description":"RFC 3339 UTC date indicating when the catalog was created."},"updated":{"type":"string","format":"date-time","description":"RFC 3339 UTC date of the last update to the catalog."},"indexing_state":{"type":"string","enum":["IN_PROGRESS","APPLIED"],"description":"Indicates the current indexing state of the catalog items."},"pending_replace":{"$ref":"#/components/schemas/pending_replace"}}},"field":{"description":"A field defines a single attribute type that items in the catalog can have. Each field has a unique name and a type.","type":"object","required":["name","type"],"properties":{"name":{"type":"string","description":"The name of the field as it will appear on catalog items.","pattern":"[a-z0-9_]+$","minLength":1,"maxLength":250},"type":{"$ref":"#/components/schemas/field_type","description":"The data type for this field, such as integer or string."}}},"field_type":{"type":"string","description":"Enumerates the possible data types allowed for catalog fields.","enum":["array","bool","date","float","integer","string","url"]},"pending_replace":{"type":"object","description":"**Beta.** Progress of the pending revision of an open replace. Use it to see when the revision is ready to apply. Batch returns this block only while a replace session is open for the catalog. Batch also returns it only to callers that send `Batch-Beta: catalog-replace` on API version `2.11` or later.\n","required":["replace_token","indexing_state","items","size"],"properties":{"replace_token":{"type":"string","description":"Token that identifies the open replace session. Use it to send more items to the session or to complete it."},"indexing_state":{"type":"string","enum":["IN_PROGRESS","APPLIED"],"description":"Indexing state of the pending revision. It must be `APPLIED` before you can complete the replace."},"items":{"type":"integer","description":"Number of items in the pending revision now."},"size":{"type":"integer","description":"Size of the pending revision data in bytes."}}},"Error":{"type":"object","required":["error_message","error_code"],"properties":{"error_message":{"description":"A human readable error message","type":"string"},"error_code":{"description":"Error code","type":"string"}}}},"responses":{"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Batch's services are under maintenance. Please try again later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/catalogs/view":{"get":{"operationId":"catalog_view","summary":"View","description":"Get information about an existing catalog.","tags":["Catalogs"],"parameters":[{"$ref":"#/components/parameters/HeaderProjectKey"},{"$ref":"#/components/parameters/HeaderBatchBetaReplaceOptional"},{"name":"name","in":"query","required":true,"schema":{"type":"string"},"description":"Catalog identifier to retrieve."},{"name":"indexing_token","in":"query","required":false,"schema":{"type":"string"},"description":"Optional token used for indexing state tracking."}],"responses":{"200":{"description":"Successfully retrieved the catalog metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/catalog"}}}},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}}}}
```

### Request structure

#### Route

The Catalog API exposes a GET endpoint that allows to get information about an existing catalog:

`/catalogs/view`

#### Headers and authentication

See [Overview → Using Project APIs](/developer/api/cep.md#request-headers-and-authentication).

#### Query parameters

See the API Description.

## Responses

### Success

If the GET to the API endpoint is successful you will receive an **HTTP 200** confirmation and information about your catalog.

```json
{
    "name": "MOVIES",
    "items": 8807,
    "size": 7746977,
    "created": "2025-07-14T16:27:14Z",
    "updated": "2025-07-21T09:20:44Z",
    "fields": [
        {
            "name": "director",
            "type": "string"
        },
        {
            "name": "title",
            "type": "string"
        },
        {
            "name": "release_year",
            "type": "integer"
        },
        {
            "name": "cast",
            "type": "array"
        },
        {
            "name": "description",
            "type": "string"
        }
    ],
    "indexing_state": "APPLIED"
}
```

The indexing\_state is the processing status of updated catalog items that returned the given indexing\_token. If there is no indexing token provided, no indexing state will be returned.

2 values are possible for indexing state:

* `IN_PROGRESS` : catalog item update processing is in progress
* `APPLIED` : catalog item update processing is finished

While a replace session is open, the response also gives a `pending_replace` block. Use it to follow the pending revision. It shows you when the revision is ready to complete.

```json
{
    "name": "MOVIES",
    "items": 8807,
    "size": 7746977,
    "created": "2025-07-14T16:27:14Z",
    "updated": "2025-07-21T09:20:44Z",
    "fields": [ { "name": "title", "type": "string" } ],
    "indexing_state": "APPLIED",
    "pending_replace": {
        "replace_token": "eqRqTF7xFznYoG0MLs1sIqM1JhmhGLTZ7I5NtM5f",
        "indexing_state": "IN_PROGRESS",
        "items": 128,
        "size": 1048576
    }
}
```

The pending\_replace block has these fields:

* `replace_token` : the token that identifies the open replace session.
* `indexing_state` : the indexing state of the pending revision. It must be APPLIED before you complete the replace.
* `items` : the number of items in the pending revision now.
* `size` : the size of the pending revision data, in bytes.

### Failure

If the POST data does not meet the API requirements you will receive an actionable error message. Contact us at <support@batch.com> if you need further support.

{% hint style="info" %}
Reach out to your Customer Success Manager if you need the limits described on this page adjusted for your use case.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.batch.com/developer/api/cep/catalogs/view.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
