How to get data from an index layer

An index layer is an index of the catalog data by attributes. You can query the index layer to get the data handles of data that meets your query criteria, and you can then use these data handles to get the corresponding data.

To get data from the index layer:

  1. Create the IndexLayerClient object.
  2. Call the getData method with the data model that contains the ID property (also used as the data handle).
📘

Note

You can find the data model in the partition metadata. For instructions, see [Get partition metadata from an index layer] (#get-partition-metadata-from-an-index-layer).

```typescript
const data = await indexLayerClient.getData(model);
You receive data from the requested partition.

In browser and Node.js, to abort requests before they have completed, you can create the `AbortController` object, and then add the `AbortController.signal` property to your requests. For more information, see the [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) documentation.

Example:

```typescript
const abortController = new AbortController();
const data = await indexLayerClient.getData(model, abortController.signal);