Skip to main content
This page documents an earlier version of the API client. For the latest version, see List indices.
Required ACL: listIndexes This method retrieves a list of all indices associated with a given application ID. The returned list includes the names of the indices as well as their associated metadata, such as the number of records, size, and last build time. The list of indices follows any ACL restrictions of the API key used to retrieve it. For example, if you call this method with an API key that can only access some indices, you will only retrieve records from those.

Examples

// Use an API key with `listIndexes` ACL
var client = new SearchClient("YourApplicationID", "YourAPIKey");
var indices = client.ListIndices().Items;

// Asynchronous
await client.ListIndicesAsync();

Parameters

This method doesn’t accept any input parameters.

Response

items
object[]
nbPages
integer
The value is always 1. There is no pagination for this method. All indices are returned on the first call.

Response as JSON

This section shows the JSON response returned by the API. Each API client wraps this response in language-specific objects, so the structure may vary. To view the response, use the getLogs method. Don’t rely on the order of properties—JSON objects don’t preserve key order.
JSON
{
  "items": [
    {
      "name": "movies",
      "createdAt": "2022-09-19T16:36:44.471Z",
      "updatedAt": "2022-09-19T18:02:30.996Z",
      "entries": 100,
      "dataSize": 48450,
      "fileSize": 112927,
      "lastBuildTimeS": 3,
      "numberOfPendingTasks": 0,
      "pendingTask": false
    }
  ],
  "nbPages": 1
}
I