---
title: "List all indexes of a collection"
method: GET
path: "/_fabric/{fabric}/_api/index"
tags: ["Indexes"]
---

# List all indexes of a collection

`GET /_fabric/{fabric}/_api/index`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_fabric/:fabric/_api/index/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetch the list of all indexes of a collection.

## Path parameters

- `fabric` string, string, required

## Query parameters

- `collection` string, required

## Response `200`

Successfully fetched indexes.

- ApiIndexGetHttpExamplesRc200
  - `code` integer: HTTP response code.
  - `error` boolean: Flag if there is an error in response. *False* for this response.
  - `indexes` ApiIndexHttp200Help[]: The array of indexes.
    - `fields` string[]: HTTP response code.
    - `id` string: Index identifier.
    - `name` string: Name of the index.
    - `selectivityEstimate` number: The selectivity estimate of index.
    - `sparse` boolean: *True* if the index is sparse type.
    - `type` string: Index type.
    - `unique` boolean: *True* if the index is unique.
  - `identifiers` object: The object of indexes with index id as key.
    - `global_demo/0` ApiIndexHttp200Help
      - `fields` string[]: HTTP response code.
      - `id` string: Index identifier.
      - `name` string: Name of the index.
      - `selectivityEstimate` number: The selectivity estimate of index.
      - `sparse` boolean: *True* if the index is sparse type.
      - `type` string: Index type.
      - `unique` boolean: *True* if the index is unique.

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `403`: Failed because you do not have access to the server.
- `404`: Failed to find specified collection.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
