GET /indexes

Use the GET /indexes endpoint to return a list of indexes.

Prerequisites

  1. Add an API key.

  2. Generate an access token.

Base URL

Direct all requests to the GET /indexes endpoint to the following base URL:

https://{tenant-id}.amperity.com/api/indexes/

Rate limit

A rate limit is the number of requests that may be made to the Amperity API in a given time period.

Requests

A request to the GET /indexes endpoint is similar to:

curl --request GET \
       'https://tenant.amperity.com/api/indexes \
     --header 'amperity-tenant: {tenant}' \
     --header 'api-version: 2025-07-31' \
     --header 'Authorization: Bearer {token}'

(This example is formatted for readability in a narrow page layout.)

Request parameters

The following table describes the parameters that may be used with the GET /indexes endpoint.

Parameter

Description

limit

Integer. Optional.

The maximum number of records to include in a single page of results. Default value: 25.

next_token

String. Optional.

An opaque token that is used to paginate results. Omit the next_token property to return the first page. Use the cursor value for next_token that was returned in a response to view the next page of results.

For example: ABCd1fghIJk2l3M

Note

The possible values for next_token are returned within the 200 response.

Important

The value for next_token cannot be NULL.

with_total

Boolean. Optional.

Set this value to true to include a total count of all results. Default value: false.

Note

Obtaining the total count of all results can be an expensive operation when there is a high number of pages in the results set.

Request examples

The following examples show how to send requests to the GET /indexes endpoint.

The following example shows how to use cURL to send a request to the GET /indexes endpoint.

curl --request GET \
       'https://tenant.amperity.com/api/indexes \
       --header 'amperity-tenant: {tenant}' \
       --header 'api-version: 2025-07-31' \
       --header 'Authorization: Bearer {token}'

(This example is formatted for readability in a narrow page layout.)

Responses

A response from the GET /indexes endpoint will match an HTTP status code. A 200 response will contain the results set. A 4xx response indicates an issue with the configuration of your request. A 5xx response indicates that the endpoint is unavailable.

200 OK

The 200 response returns a list of indexes.

 1{
 2  "data": [
 3    {
 4      "id": "{id}",
 5      "name": "{name of index}",
 6      "description": "{description of index}",
 7      "created_at": "{timestamp}",
 8      "updated_at": "{timestamp}"
 9    }
10  ],
11  "next_token": "string",
12  "total": 0
13}

For example:

 1{
 2  "data": [
 3    {
 4      "id": "idx-xyz789",
 5      "name": "loyalty_members",
 6      "description": "Profiles from the loyalty program",
 7      "created_at": "2025-07-30T22:16:04.409Z",
 8      "updated_at": "2025-07-30T22:16:04.409Z"
 9    }
10  ],
11  "next_token": "string",
12  "total": 0
13}

Response parameters

A 200 OK response contains the following parameters.

Parameter

Description

data

A JSON array of data for an index.

For example:

 1{
 2  "data": [
 3    {
 4      "id": "idx-xyz789",
 5      "name": "loyalty_members",
 6      "description": "Profiles from the loyalty program",
 7      "created_at": "2025-07-30T22:16:04.409Z",
 8      "updated_at": "2025-07-30T22:16:04.409Z"
 9    }
10  ],
11  "next_token": "string",
12  "total": 0
13}
created_at

The timestamp at which the index was created.

description

The description of the index.

id

The unique ID for the index.

name

The name of the index.

updated_at

The timestamp at which the index was last updated.

next_token

The cursor value to use in a subsequent request to return the next page of results.

Note

When the value for next_token is empty, the last page in the results set has been returned.

total

The total number of returned indexes.

400

1{
2  "status": 400,
3  "message": "A human-readable summary of the error.",
4  "request_id": "3fa85f64-1234-5678-901a-2c9asdfa6",
5  "trace_id": "string"
6}