## Get the retrieval index status of a dataset

**get** `/api/v1/datasets/{dataset_id}/retrieval-index`

Poll after POST /datasets/{dataset_id}/retrieval-index. Once `status` is `succeeded`, the dataset can be searched with `file_search` on POST /responses. A `failed` index carries an `error`; repeat the POST to retry it.

### Path Parameters

- `dataset_id: string`

### Returns

- `RetrievalIndex object { dataset_id, status, error }`

  - `dataset_id: string`

  - `status: "pending" or "running" or "succeeded" or "failed"`

    The dataset can be searched with `file_search` once this is `succeeded`.

    - `"pending"`

    - `"running"`

    - `"succeeded"`

    - `"failed"`

  - `error: optional string`

    Why indexing failed. Present only when `status` is `failed`.

### Example

```http
curl https://api.prod.adaptionlabs.ai/api/v1/datasets/$DATASET_ID/retrieval-index \
    -H "Authorization: Bearer $ADAPTION_API_KEY"
```

#### Response

```json
{
  "dataset_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "status": "pending",
  "error": "error"
}
```
