---
canonical: https://amplience.com/developers/docs/apis/content-management-reference/search-indexes/
title: "Search indexes"
description: "API reference for search index endpoints. Covers Algolia search index configuration, content type assignment, and analytics."
audience: Developer
date_published: 2023-08-29
date_modified: 2026-06-16
---

# Search indexes

**Base URL:** `https://api.amplience.net/v2/content`

> **Note: Authorization and status codes**
> For authorization and status codes see the [API Reference overview](https://amplience.com/developers/docs/apis/content-management-reference/).

## Search indexes

| Method | Endpoint | Summary |
|--------|----------|---------|
| `GET` | `/algolia-search/{hubId}/indexes` | [List indexes](#list-indexes) |
| `POST` | `/algolia-search/{hubId}/indexes` | [Create an index](#create-an-index) |
| `GET` | `/algolia-search/{hubId}/indexes/{indexId}` | [Get an index](#get-an-index) |
| `PATCH` | `/algolia-search/{hubId}/indexes/{indexId}` | [Update an index](#update-an-index) |
| `DELETE` | `/algolia-search/{hubId}/indexes/{indexId}` | [Delete an index](#delete-an-index) |
| `POST` | `/algolia-search/{hubId}/indexes/{indexId}/archive` | [Archive an Algolia search index](#archive-an-algolia-search-index) |
| `GET` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/assigned-content-types` | [List assigned content types](#list-assigned-content-types) |
| `POST` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/assigned-content-types` | [Create an assigned content type](#create-an-assigned-content-type) |
| `GET` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/assigned-content-types/{contentTypeId}` | [Get assigned content type](#get-assigned-content-type) |
| `DELETE` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/assigned-content-types/{contentTypeId}` | [Delete an assigned content type](#delete-an-assigned-content-type) |
| `POST` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/assigned-content-types/{contentTypeId}/recreate-webhook` | [Recreate assigned content type webhook](#recreate-assigned-content-type-webhook) |
| `POST` | `/algolia-search/{hubId}/indexes/{indexId}/clear` | [Clear an index](#clear-an-index) |
| `GET` | `/algolia-search/{hubId}/indexes/{indexId}/keys/{keyId}` | [Get an API key](#get-an-api-key) |
| `DELETE` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/objects/{objectId}` | [Delete an index object](#delete-an-index-object) |
| `GET` | `/algolia-search/{hubId}/indexes/{indexId}/settings` | [Get search index settings](#get-search-index-settings) |
| `PATCH` | `/algolia-search/{hubId}/indexes/{indexId}/settings` | [Update search index settings](#update-search-index-settings) |
| `GET` | `/algolia-search/{hubId}/indexes/{indexId}/stats` | [Get search index statistics](#get-search-index-statistics) |
| `POST` | `/algolia-search/{hubId}/indexes/{indexId}/unarchive` | [Unarchive an Algolia search index](#unarchive-an-algolia-search-index) |

### List indexes

`GET /algolia-search/{hubId}/indexes`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes`</small>

List Algolia search indexes for a given hub

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `parentId` | query | string |  | Filter by the parentId.  An empty string will return all primary indexes.<br/>Example: `20` |
| `projection` | query | string (withSettings) |  | Project addition values in list response `withSettings` - includes the settings for each index |
| `size` | query | integer |  | Set the number of results per page<br/>Example: `20` |
| `page` | query | integer |  | Page number<br/>Example: `0` |
| `sort` | query | string |  | Sort parameter<br/>Example: `label,asc` |
| `status` | query | string |  | Comma seperated list of statuses<br/>Example: `ACTIVE,ARCHIVED` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | List of Algolia Search indexes for the given hub |

<details>
<summary>Response Example (200)</summary>

```json
{
  "_embedded": {
    "indexes": [
      {
        "id": "00112233445566778899aabb",
        "parentId": "00112233445566778899aabb",
        "replicaCount": 0,
        "name": "anya-finn.my-index",
        "suffix": "my-index",
        "label": "My Index",
        "assignedContentTypes": [],
        "createdDate": "2019-01-01T00:00:00.000Z",
        "lastModifiedDate": "2019-01-01T00:00:00.000Z",
        "status": "ACTIVE",
        "_links": {
          "self": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
          },
          "index": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes{/id}",
            "templated": true
          },
          "hub-search-key": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/keys/00112233445566778899aabb"
          },
          "update": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
          },
          "delete": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
          },
          "list-replicas": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes?parentId=00112233445566778899aabb{&projection,page,size,sort}",
            "templated": true
          },
          "hub": {
            "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb"
          },
          "settings": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings"
          },
          "update-settings": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings{?forwardToReplicas}",
            "templated": true
          },
          "assigned-content-types": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types"
          },
          "clear": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/clear"
          },
          "stats": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/stats{?period}",
            "templated": true
          },
          "top-searches": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches{?clickAnalytics,orderBy,direction,startDate,endDate,limit,offset,tags,includeReplicas}",
            "templated": true
          },
          "top-hits": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-hits{?search,startDate,endDate,limit,offset,tags,includeReplicas}",
            "templated": true
          },
          "searches-with-no-results": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-with-no-results{?startDate,endDate,limit,offset,tags,includeReplicas}",
            "templated": true
          },
          "top-filters-no-result-search": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-filters-no-result-search{?search,startDate,endDate,limit,offset,tags,includeReplicas}",
            "templated": true
          },
          "searches-count": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-count{?startDate,endDate,tags,includeReplicas}",
            "templated": true
          },
          "user-count": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/user-count{?startDate,endDate,tags,includeReplicas}",
            "templated": true
          },
          "no-results-rate": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/no-results-rate{?startDate,endDate,tags,includeReplicas}",
            "templated": true
          },
          "archive": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/archive"
          },
          "unarchive": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/unarchive"
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes?page=1&size=20&sort=indexName,asc"
    },
    "indexes": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes{?parentId,projection,page,size,sort}",
      "templated": true
    },
    "first": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes?page=0&size=20&sort=indexName,asc"
    },
    "next": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes?page=2&size=20&sort=indexName,asc"
    },
    "prev": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes?page=0&size=20&sort=indexName,asc"
    },
    "last": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes?page=2&size=20&sort=indexName,asc"
    }
  },
  "page": {
    "size": 20,
    "totalElements": 1,
    "totalPages": 1,
    "number": 0
  }
}
```

</details>

### Create an index

`POST /algolia-search/{hubId}/indexes`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes`</small>

Create a new Algolia search index

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `suffix` | string | ✓ | Index suffix |
| `label` | string | ✓ | User defined index label |
| `type` | string (PRODUCTION, STAGING) | ✓ | Type of index |
| `assignedContentTypes` | array | ✓ | Assigned Content Types |

<details>
<summary>Request example</summary>

```json
{
  "suffix": "my-index",
  "label": "My Index",
  "assignedContentTypes": [
    {
      "id": "00112233445566778899aabb",
      "contentTypeUri": "http://deliver.bigcontent.io/schema/banner-type.json",
      "createdDate": "2019-01-01T00:00:00.000Z",
      "lastModifiedDate": "2019-01-01T00:00:00.000Z"
    }
  ]
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 201 | Algolia Search Index |

<details>
<summary>Response Example (201)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "parentId": "00112233445566778899aabb",
  "replicaCount": 0,
  "name": "anya-finn.my-index",
  "suffix": "my-index",
  "label": "My Index",
  "assignedContentTypes": [
    {
      "id": "00112233445566778899aabb",
      "contentTypeUri": "http://deliver.bigcontent.io/schema/banner-type.json",
      "createdDate": "2019-01-01T00:00:00.000Z",
      "lastModifiedDate": "2019-01-01T00:00:00.000Z",
      "_links": {
        "self": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
        },
        "assigned-content-type": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types{/id}",
          "templated": true
        },
        "content-type": {
          "href": "https://api.amplience.net/v2/content-types/00112233445566778899aabb"
        },
        "unassign": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
        },
        "webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook"
        },
        "active-content-webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-active-content-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=active"
        },
        "archived-content-webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-archived-content-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=archived"
        }
      }
    }
  ],
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "status": "ACTIVE",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes{/id}",
      "templated": true
    },
    "hub-search-key": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/keys/00112233445566778899aabb"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "delete": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "list-replicas": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes?parentId=00112233445566778899aabb{&projection,page,size,sort}",
      "templated": true
    },
    "hub": {
      "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb"
    },
    "settings": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings"
    },
    "update-settings": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings{?forwardToReplicas}",
      "templated": true
    },
    "assigned-content-types": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types"
    },
    "clear": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/clear"
    },
    "stats": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/stats{?period}",
      "templated": true
    },
    "top-searches": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches{?clickAnalytics,orderBy,direction,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "top-hits": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-hits{?search,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "searches-with-no-results": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-with-no-results{?startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "top-filters-no-result-search": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-filters-no-result-search{?search,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "searches-count": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-count{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "user-count": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/user-count{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "no-results-rate": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/no-results-rate{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "archive": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/archive"
    },
    "unarchive": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/unarchive"
    }
  }
}
```

</details>

### Get an index

`GET /algolia-search/{hubId}/indexes/{indexId}`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}`</small>

Get an Algolia search index for a given hub

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Get Algolia Search indexes for the given hub |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "parentId": "00112233445566778899aabb",
  "replicaCount": 0,
  "name": "anya-finn.my-index",
  "suffix": "my-index",
  "label": "My Index",
  "assignedContentTypes": [
    {
      "id": "00112233445566778899aabb",
      "contentTypeUri": "http://deliver.bigcontent.io/schema/banner-type.json",
      "createdDate": "2019-01-01T00:00:00.000Z",
      "lastModifiedDate": "2019-01-01T00:00:00.000Z",
      "_links": {
        "self": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
        },
        "assigned-content-type": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types{/id}",
          "templated": true
        },
        "content-type": {
          "href": "https://api.amplience.net/v2/content-types/00112233445566778899aabb"
        },
        "unassign": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
        },
        "webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook"
        },
        "active-content-webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-active-content-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=active"
        },
        "archived-content-webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-archived-content-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=archived"
        }
      }
    }
  ],
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "status": "ACTIVE",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes{/id}",
      "templated": true
    },
    "hub-search-key": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/keys/00112233445566778899aabb"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "delete": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "list-replicas": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes?parentId=00112233445566778899aabb{&projection,page,size,sort}",
      "templated": true
    },
    "hub": {
      "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb"
    },
    "settings": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings"
    },
    "update-settings": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings{?forwardToReplicas}",
      "templated": true
    },
    "assigned-content-types": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types"
    },
    "clear": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/clear"
    },
    "stats": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/stats{?period}",
      "templated": true
    },
    "top-searches": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches{?clickAnalytics,orderBy,direction,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "top-hits": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-hits{?search,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "searches-with-no-results": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-with-no-results{?startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "top-filters-no-result-search": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-filters-no-result-search{?search,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "searches-count": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-count{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "user-count": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/user-count{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "no-results-rate": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/no-results-rate{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "archive": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/archive"
    },
    "unarchive": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/unarchive"
    }
  }
}
```

</details>

### Update an index

`PATCH /algolia-search/{hubId}/indexes/{indexId}`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}`</small>

Update an active Algolia search index.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `label` | string |  | User defined index label |

<details>
<summary>Request example</summary>

```json
{
  "label": "My Index"
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Algolia Search Index Update Response |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "parentId": "00112233445566778899aabb",
  "replicaCount": 0,
  "name": "anya-finn.my-index",
  "suffix": "my-index",
  "label": "My Index",
  "assignedContentTypes": [
    {
      "id": "00112233445566778899aabb",
      "contentTypeUri": "http://deliver.bigcontent.io/schema/banner-type.json",
      "createdDate": "2019-01-01T00:00:00.000Z",
      "lastModifiedDate": "2019-01-01T00:00:00.000Z",
      "_links": {
        "self": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
        },
        "assigned-content-type": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types{/id}",
          "templated": true
        },
        "content-type": {
          "href": "https://api.amplience.net/v2/content-types/00112233445566778899aabb"
        },
        "unassign": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
        },
        "webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook"
        },
        "active-content-webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-active-content-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=active"
        },
        "archived-content-webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-archived-content-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=archived"
        }
      }
    }
  ],
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "status": "ACTIVE",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes{/id}",
      "templated": true
    },
    "hub-search-key": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/keys/00112233445566778899aabb"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "delete": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "list-replicas": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes?parentId=00112233445566778899aabb{&projection,page,size,sort}",
      "templated": true
    },
    "hub": {
      "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb"
    },
    "settings": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings"
    },
    "update-settings": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings{?forwardToReplicas}",
      "templated": true
    },
    "assigned-content-types": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types"
    },
    "clear": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/clear"
    },
    "stats": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/stats{?period}",
      "templated": true
    },
    "top-searches": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches{?clickAnalytics,orderBy,direction,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "top-hits": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-hits{?search,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "searches-with-no-results": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-with-no-results{?startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "top-filters-no-result-search": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-filters-no-result-search{?search,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "searches-count": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-count{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "user-count": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/user-count{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "no-results-rate": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/no-results-rate{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "archive": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/archive"
    },
    "unarchive": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/unarchive"
    }
  }
}
```

</details>

### Delete an index

`DELETE /algolia-search/{hubId}/indexes/{indexId}`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}`</small>

Delete an Algolia search index for a given hub

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 204 | Delete Algolia Search index for the given hub |

### Archive an Algolia search index

`POST /algolia-search/{hubId}/indexes/{indexId}/archive`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/archive`</small>

Archive an Algolia Search Index

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Archived Algolia Search Index |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "parentId": "00112233445566778899aabb",
  "replicaCount": 0,
  "name": "anya-finn.my-index",
  "suffix": "my-index",
  "label": "My Index",
  "assignedContentTypes": [
    {
      "id": "00112233445566778899aabb",
      "contentTypeUri": "http://deliver.bigcontent.io/schema/banner-type.json",
      "createdDate": "2019-01-01T00:00:00.000Z",
      "lastModifiedDate": "2019-01-01T00:00:00.000Z",
      "_links": {
        "self": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
        },
        "assigned-content-type": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types{/id}",
          "templated": true
        },
        "content-type": {
          "href": "https://api.amplience.net/v2/content-types/00112233445566778899aabb"
        },
        "unassign": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
        },
        "webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook"
        },
        "active-content-webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-active-content-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=active"
        },
        "archived-content-webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-archived-content-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=archived"
        }
      }
    }
  ],
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "status": "ARCHIVED",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes{/id}",
      "templated": true
    },
    "hub-search-key": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/keys/00112233445566778899aabb"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "delete": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "list-replicas": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes?parentId=00112233445566778899aabb{&projection,page,size,sort}",
      "templated": true
    },
    "hub": {
      "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb"
    },
    "settings": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings"
    },
    "update-settings": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings{?forwardToReplicas}",
      "templated": true
    },
    "assigned-content-types": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types"
    },
    "clear": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/clear"
    },
    "stats": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/stats{?period}",
      "templated": true
    },
    "top-searches": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches{?clickAnalytics,orderBy,direction,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "top-hits": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-hits{?search,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "searches-with-no-results": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-with-no-results{?startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "top-filters-no-result-search": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-filters-no-result-search{?search,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "searches-count": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-count{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "user-count": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/user-count{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "no-results-rate": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/no-results-rate{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "archive": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/archive"
    },
    "unarchive": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/unarchive"
    }
  }
}
```

</details>

### List assigned content types

`GET /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/assigned-content-types`</small>

List all content types assigned to a search index. Each content type should have an associated webhook, which updates the index with content item data.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `size` | query | integer |  | Set the number of results per page<br/>Example: `20` |
| `page` | query | integer |  | Page number<br/>Example: `0` |
| `sort` | query | string |  | Sort parameter<br/>Example: `createdDate,asc` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Algolia Search Index |

<details>
<summary>Response Example (200)</summary>

```json
{
  "_embedded": {
    "assigned-content-types": [
      {
        "id": "00112233445566778899aabb",
        "contentTypeUri": "http://deliver.bigcontent.io/schema/banner-type.json",
        "createdDate": "2019-01-01T00:00:00.000Z",
        "lastModifiedDate": "2019-01-01T00:00:00.000Z",
        "_links": {
          "self": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
          },
          "assigned-content-type": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types{/id}",
            "templated": true
          },
          "content-type": {
            "href": "https://api.amplience.net/v2/content-types/00112233445566778899aabb"
          },
          "unassign": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
          },
          "webhook": {
            "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
          },
          "recreate-webhook": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook"
          },
          "active-content-webhook": {
            "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
          },
          "recreate-active-content-webhook": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=active"
          },
          "archived-content-webhook": {
            "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
          },
          "recreate-archived-content-webhook": {
            "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=archived"
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types?page=1&size=20&sort=createdDate,asc"
    },
    "first": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types?page=0&size=20&sort=createdDate,asc"
    },
    "next": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types?page=2&size=20&sort=createdDate,asc"
    },
    "prev": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types?page=0&size=20&sort=createdDate,asc"
    },
    "last": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types?page=2&size=20&sort=createdDate,asc"
    }
  },
  "page": {
    "size": 20,
    "totalElements": 1,
    "totalPages": 1,
    "number": 0
  }
}
```

</details>

### Create an assigned content type

`POST /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/assigned-content-types`</small>

Assign content type to a search index. Assigning a content type will create an associated webhook, which updates the index with content item data.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `contentTypeUri` | string | ✓ | Registered Content Type Schema |

<details>
<summary>Request example</summary>

```json
{
  "contentTypeUri": "http://deliver.bigcontent.io/schema/banner-type.json"
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 201 | Algolia Search Index |

<details>
<summary>Response Example (201)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "contentTypeUri": "http://deliver.bigcontent.io/schema/banner-type.json",
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
    },
    "assigned-content-type": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types{/id}",
      "templated": true
    },
    "content-type": {
      "href": "https://api.amplience.net/v2/content-types/00112233445566778899aabb"
    },
    "unassign": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
    },
    "webhook": {
      "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
    },
    "recreate-webhook": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook"
    },
    "active-content-webhook": {
      "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
    },
    "recreate-active-content-webhook": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=active"
    },
    "archived-content-webhook": {
      "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
    },
    "recreate-archived-content-webhook": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=archived"
    }
  }
}
```

</details>

### Get assigned content type

`GET /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}`</small>

Get an assigned content type for a search index.  A content type should have an associated webhook, which updates the index with content item data.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `contentTypeId` | path | string | ✓ | Assigned Content Type ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Algolia Search Index |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "contentTypeUri": "http://deliver.bigcontent.io/schema/banner-type.json",
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
    },
    "assigned-content-type": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types{/id}",
      "templated": true
    },
    "content-type": {
      "href": "https://api.amplience.net/v2/content-types/00112233445566778899aabb"
    },
    "unassign": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
    },
    "webhook": {
      "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
    },
    "recreate-webhook": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook"
    },
    "active-content-webhook": {
      "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
    },
    "recreate-active-content-webhook": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=active"
    },
    "archived-content-webhook": {
      "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
    },
    "recreate-archived-content-webhook": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=archived"
    }
  }
}
```

</details>

### Delete an assigned content type

`DELETE /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}`</small>

Delete an assigned content type for a search index.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `contentTypeId` | path | string | ✓ | Assigned Content Type ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 204 | Successfully deleted an assigned content type for a search index. |

### Recreate assigned content type webhook

`POST /algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}/recreate-webhook`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/assigned-content-types/{contentTypeId}/recreate-webhook`</small>

Recreate the webhook for this assigned content type

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `contentTypeId` | path | string | ✓ | Assigned Content Type ID<br/>Example: `00112233445566778899aabb` |
| `type` | query | string (active, archived) | ✓ | Type of webhook to create<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

**Responses**

| Status | Description |
|--------|-------------|
| 204 | Successfully recreated the webhook |

### Clear an index

`POST /algolia-search/{hubId}/indexes/{indexId}/clear`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/clear`</small>

Remove all objects from an Algolia search index

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |

**Request Body**

Content-Type: `application/json`

**Responses**

| Status | Description |
|--------|-------------|
| 204 | Successfully cleared the Algolia search index |

### Get an API key

`GET /algolia-search/{hubId}/indexes/{indexId}/keys/{keyId}`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/keys/{keyId}`</small>

Get Algolia search API key for a given index/hub

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `keyId` | path | string | ✓ | Key ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Get search key by id |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "type": "HUB_SEARCH",
  "key": "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz",
  "applicationId": "AaBbCcDdEeFfGg",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/keys/00112233445566778899aabb"
    }
  }
}
```

</details>

### Delete an index object

`DELETE /algolia-search/{hubId}/indexes/{indexId}/objects/{objectId}`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/objects/{objectId}`</small>

Delete an object from a search index

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `objectId` | path | string | ✓ | Object ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 204 | Successfully deleted an object from a search index |

### Get search index settings

`GET /algolia-search/{hubId}/indexes/{indexId}/settings`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/settings`</small>

Get Algolia search index settings

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Algolia Search index settings for the given hub |

<details>
<summary>Response Example (200)</summary>

```json
{
  "replicas": [],
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings"
    },
    "settings": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings"
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    }
  }
}
```

</details>

### Update search index settings

`PATCH /algolia-search/{hubId}/indexes/{indexId}/settings`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/settings`</small>

Update settings on an active Algolia search index.

For a complete list of index settings visit the [Algolia settings documentation](https://www.algolia.com/doc/api-reference/settings-api-parameters).

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `forwardToReplicas` | query | boolean |  | Forward to replicas<br/>Example: `True` |

**Request Body**

Content-Type: `application/json`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `replicas` | array |  | Index replicas that are managed by Dynamic Content should follow the naming convention `<hubName>`.`<replicaName>` - e.g. anyafinn.womens-clothing-replica |

<details>
<summary>Request example</summary>

```json
{
  "replicas": []
}
```

</details>

**Responses**

| Status | Description |
|--------|-------------|
| 204 | Successfully updated Algolia search index settings |

### Get search index statistics

`GET /algolia-search/{hubId}/indexes/{indexId}/stats`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/stats`</small>

Get Algolia search index statistics

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Algolia Search index statistics for the given hub |

<details>
<summary>Response Example (200)</summary>

```json
{
  "totalRecords": 546,
  "totalRecordSize": 256,
  "averageRecordSize": 56,
  "usage": {
    "averageResponseTime": {
      "unit": "DAYS",
      "duration": 30,
      "value": 1.25
    },
    "numberOfSearches": {
      "unit": "DAYS",
      "duration": 30,
      "value": 150
    }
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/stats"
    },
    "stats": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/stats{?period}",
      "templated": true
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    }
  }
}
```

</details>

### Unarchive an Algolia search index

`POST /algolia-search/{hubId}/indexes/{indexId}/unarchive`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/unarchive`</small>

Unarchive an Algolia Search Index

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Unarchived Algolia Search Index |

<details>
<summary>Response Example (200)</summary>

```json
{
  "id": "00112233445566778899aabb",
  "parentId": "00112233445566778899aabb",
  "replicaCount": 0,
  "name": "anya-finn.my-index",
  "suffix": "my-index",
  "label": "My Index",
  "assignedContentTypes": [
    {
      "id": "00112233445566778899aabb",
      "contentTypeUri": "http://deliver.bigcontent.io/schema/banner-type.json",
      "createdDate": "2019-01-01T00:00:00.000Z",
      "lastModifiedDate": "2019-01-01T00:00:00.000Z",
      "_links": {
        "self": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
        },
        "assigned-content-type": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types{/id}",
          "templated": true
        },
        "content-type": {
          "href": "https://api.amplience.net/v2/content-types/00112233445566778899aabb"
        },
        "unassign": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb"
        },
        "webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook"
        },
        "active-content-webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-active-content-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=active"
        },
        "archived-content-webhook": {
          "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb/webhook/00112233445566778899aabb"
        },
        "recreate-archived-content-webhook": {
          "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types/00112233445566778899aabb/recreate-webhook?type=archived"
        }
      }
    }
  ],
  "createdDate": "2019-01-01T00:00:00.000Z",
  "lastModifiedDate": "2019-01-01T00:00:00.000Z",
  "status": "ACTIVE",
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes{/id}",
      "templated": true
    },
    "hub-search-key": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/keys/00112233445566778899aabb"
    },
    "update": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "delete": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    },
    "list-replicas": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes?parentId=00112233445566778899aabb{&projection,page,size,sort}",
      "templated": true
    },
    "hub": {
      "href": "https://api.amplience.net/v2/hubs/00112233445566778899aabb"
    },
    "settings": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings"
    },
    "update-settings": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/settings{?forwardToReplicas}",
      "templated": true
    },
    "assigned-content-types": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/assigned-content-types"
    },
    "clear": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/clear"
    },
    "stats": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/stats{?period}",
      "templated": true
    },
    "top-searches": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches{?clickAnalytics,orderBy,direction,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "top-hits": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-hits{?search,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "searches-with-no-results": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-with-no-results{?startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "top-filters-no-result-search": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-filters-no-result-search{?search,startDate,endDate,limit,offset,tags,includeReplicas}",
      "templated": true
    },
    "searches-count": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-count{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "user-count": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/user-count{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "no-results-rate": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/no-results-rate{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "archive": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/archive"
    },
    "unarchive": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/unarchive"
    }
  }
}
```

</details>

## Search indexes - Analytics

| Method | Endpoint | Summary |
|--------|----------|---------|
| `GET` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/analytics/no-results-rate` | [Get rate of no results for an index](#get-rate-of-no-results-for-an-index) |
| `GET` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/analytics/searches-count` | [Get count of searches for an index](#get-count-of-searches-for-an-index) |
| `GET` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/analytics/searches-with-no-results` | [Get top searches with no results](#get-top-searches-with-no-results) |
| `GET` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/analytics/top-filters-no-result-search` | [Get top filters no result search](#get-top-filters-no-result-search) |
| `GET` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/analytics/top-hits` | [Get top hits for an index](#get-top-hits-for-an-index) |
| `GET` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/analytics/top-searches` | [Get top searches for an index](#get-top-searches-for-an-index) |
| `GET` | `/algolia-search/{hubId}`<br/>`/indexes/{indexId}/analytics/user-count` | [Get count of users](#get-count-of-users) |

### Get rate of no results for an index

`GET /algolia-search/{hubId}/indexes/{indexId}/analytics/no-results-rate`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/no-results-rate`</small>

Returns the rate at which searches did not return any results. A value is returned for the whole range. Values per days are also returned. Additionally, the search count and the count of searches without results, used to compute the rates, are returned as well.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `startDate` | query | string |  | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC<br/>Example: `2020-07-16` |
| `endDate` | query | string |  | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC<br/>Example: `2020-07-23` |
| `tags` | query | string |  | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: `“lang:fr OR lang:en”`* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)<br/>Example: `platform:ios` |
| `includeReplicas` | query | boolean |  | Include replica data in the results (Can only be used in conjunction with primary indexes).<br/>Example: `True` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Rate of no results for a given index |

<details>
<summary>Response Example (200)</summary>

```json
{
  "rate": 0.5,
  "count": 10,
  "noResultCount": 5,
  "dates": [
    {
      "date": "2020-08-24",
      "rate": 0.5,
      "count": 10,
      "noResultCount": 5
    }
  ],
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/no-results-rate?startDate=2020-08-24&endDate=2020-08-24"
    },
    "no-results-rate": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/no-results-rate{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    }
  }
}
```

</details>

### Get count of searches for an index

`GET /algolia-search/{hubId}/indexes/{indexId}/analytics/searches-count`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/searches-count`</small>

Returns the number of searches across the given time range. A value is returned for the whole range. Additionally, values for each day are returned.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `startDate` | query | string |  | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC<br/>Example: `2020-07-16` |
| `endDate` | query | string |  | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC<br/>Example: `2020-07-23` |
| `tags` | query | string |  | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: `“lang:fr OR lang:en”`* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)<br/>Example: `platform:ios` |
| `includeReplicas` | query | boolean |  | Include replica data in the results (Can only be used in conjunction with primary indexes).<br/>Example: `True` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Count of searches for a given index |

<details>
<summary>Response Example (200)</summary>

```json
{
  "count": 3,
  "dates": [
    {
      "date": "2020-08-24",
      "count": 3
    }
  ],
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-count?startDate=2020-08-24&endDate=2020-08-24"
    },
    "searches-count": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-count{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    }
  }
}
```

</details>

### Get top searches with no results

`GET /algolia-search/{hubId}/indexes/{indexId}/analytics/searches-with-no-results`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/searches-with-no-results`</small>

Returns top searches that did not return any results. Limited to the 1000 most frequent.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `startDate` | query | string |  | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC<br/>Example: `2020-07-16` |
| `endDate` | query | string |  | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC<br/>Example: `2020-07-23` |
| `limit` | query | number |  | How many items to fetch.<br/>Example: `10` |
| `offset` | query | number |  | From which position to start retrieving results.<br/>Example: `0` |
| `tags` | query | string |  | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: `“lang:fr OR lang:en”`* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)<br/>Example: `platform:ios` |
| `includeReplicas` | query | boolean |  | Include replica data in the results (Can only be used in conjunction with primary indexes).<br/>Example: `True` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Top searches that did not return any results |

<details>
<summary>Response Example (200)</summary>

```json
{
  "_embedded": {
    "searches-with-no-results": [
      {
        "search": "q0",
        "count": 3,
        "withFilterCount": 10
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-with-no-results?startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=20"
    },
    "searches-with-no-results": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-with-no-results{?startDate,endDate,limit,offset,tags}",
      "templated": true
    },
    "first": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-with-no-results?startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=0"
    },
    "next": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-with-no-results?startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=30"
    },
    "prev": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/searches-with-no-results?startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=10"
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    }
  }
}
```

</details>

### Get top filters no result search

`GET /algolia-search/{hubId}/indexes/{indexId}/analytics/top-filters-no-result-search`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/top-filters-no-result-search`</small>

Returns top filters that did not return any results for given search. Limited to the top 1000.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `search` | query | string | ✓ | The query term. Must match the exact user input<br/>Example: `q0` |
| `startDate` | query | string |  | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC<br/>Example: `2020-07-16` |
| `endDate` | query | string |  | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC<br/>Example: `2020-07-23` |
| `limit` | query | number |  | How many items to fetch.<br/>Example: `10` |
| `offset` | query | number |  | From which position to start retrieving results.<br/>Example: `0` |
| `tags` | query | string |  | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: `“lang:fr OR lang:en”`* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)<br/>Example: `platform:ios` |
| `includeReplicas` | query | boolean |  | Include replica data in the results (Can only be used in conjunction with primary indexes).<br/>Example: `True` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Top searches that did not return any results |

<details>
<summary>Response Example (200)</summary>

```json
{
  "_embedded": {
    "top-filters-no-result-search": [
      {
        "count": 3,
        "values": [
          {
            "attribute": "brand",
            "operator": ":",
            "value": "apple"
          }
        ]
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-filters-no-result-search?search=q0&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=20"
    },
    "top-filters-no-result-search": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-filters-no-result-search{?search,startDate,endDate,limit,offset,tags}",
      "templated": true
    },
    "first": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-filters-no-result-search?search=q0&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=0"
    },
    "next": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-filters-no-result-search?search=q0&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=30"
    },
    "prev": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-filters-no-result-search?search=q0&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=10"
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    }
  }
}
```

</details>

### Get top hits for an index

`GET /algolia-search/{hubId}/indexes/{indexId}/analytics/top-hits`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/top-hits`</small>

If `search` is supplied, the top hits for the given search.

If `search` is omitted, the overall top hits will be returned for this index.

Limited to the 1000 most frequent ones.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `search` | query | string |  | Get top hits for a given search. Must match the exact user input.<br/>Example: `term` |
| `startDate` | query | string |  | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC<br/>Example: `2020-07-16` |
| `endDate` | query | string |  | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC<br/>Example: `2020-07-23` |
| `limit` | query | number |  | How many items to fetch.<br/>Example: `10` |
| `offset` | query | number |  | From which position to start retrieving results.<br/>Example: `0` |
| `tags` | query | string |  | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: `“lang:fr OR lang:en”`* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)<br/>Example: `platform:ios` |
| `includeReplicas` | query | boolean |  | Include replica data in the results (Can only be used in conjunction with primary indexes).<br/>Example: `True` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Top hits for a given search term |

<details>
<summary>Response Example (200)</summary>

```json
{
  "_embedded": {
    "top-hits": [
      {
        "hit": "ObjectID",
        "count": 3
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-hits?search=term&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=20"
    },
    "top-hits": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-hits{?search,startDate,endDate,limit,offset,tags}",
      "templated": true
    },
    "first": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-hits?search=term&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=0"
    },
    "next": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-hits?search=term&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=30"
    },
    "prev": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-hits?search=term&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=10"
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    }
  }
}
```

</details>

### Get top searches for an index

`GET /algolia-search/{hubId}/indexes/{indexId}/analytics/top-searches`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/top-searches`</small>

Returns top searches. Limited to the 1000 most frequent ones. For each search, also returns the average number of hits returned.

If `clickAnalytics=true`, then for each search, also returns:

* the click through rate,
* the conversion rate,
* the average click position.

You can also order the results using `orderBy` and `direction`.

Distinguishing _no data_ vs 0% CTR, 0% CR, no average

* You have click analytics enabled but no queries were received with clickAnalytics=true
  * in that case CTR, CR and average will be `null`.
* You have click analytics enabled, we received queries with clickAnalytics=true
* CTR and CR are 0 until we receive click/conversion events
* average will stay null until we receive a click event

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `clickAnalytics` | query | boolean |  | If `true`, then for each search, also returns: `the click through rate,`* the conversion rate, * the average click position.<br/>Example: `False` |
| `orderBy` | query | string |  | You can reorder the results by passing one of the following: `searchCount`* clickThroughRate * conversionRate * averageClickPosition |
| `direction` | query | string (asc, desc) |  | Change the order of the results<br/>Example: `desc` |
| `startDate` | query | string |  | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC<br/>Example: `2020-07-16` |
| `endDate` | query | string |  | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC<br/>Example: `2020-07-23` |
| `limit` | query | number |  | How many items to fetch.<br/>Example: `10` |
| `offset` | query | number |  | From which position to start retrieving results.<br/>Example: `0` |
| `tags` | query | string |  | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: `“lang:fr OR lang:en”`* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)<br/>Example: `platform:ios` |
| `includeReplicas` | query | boolean |  | Include replica data in the results (Can only be used in conjunction with primary indexes).<br/>Example: `True` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Top searches for a given index |

<details>
<summary>Response example (200): clickAnalyticsFalse</summary>

```json
{
  "_embedded": {
    "searches": [
      {
        "search": "q0",
        "count": 3,
        "nbHits": 10
      },
      {
        "search": "q1",
        "count": 3,
        "nbHits": 10
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches?clickAnalytics=false&orderBy=searchCountc&direction=desc&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=20"
    },
    "searches": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches{?clickAnalytics,orderBy,direction,startDate,endDate,limit,offset,tags}",
      "templated": true
    },
    "first": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches?clickAnalytics=false&orderBy=searchCountc&direction=desc&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=0"
    },
    "next": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches?clickAnalytics=false&orderBy=searchCountc&direction=desc&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=30"
    },
    "prev": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches?clickAnalytics=false&orderBy=searchCountc&direction=desc&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=10"
    }
  }
}
```

</details>

<details>
<summary>Response example (200): clickAnalyticsTrue</summary>

```json
{
  "_embedded": {
    "searches": [
      {
        "search": "q0",
        "count": 3,
        "nbHits": 10,
        "clickThroughRate": 3,
        "averageClickPosition": 1,
        "conversionRate": 0.5,
        "trackedSearchCount": 2,
        "clickCount": 2,
        "conversionCount": 1
      },
      {
        "search": "q1",
        "count": 3,
        "nbHits": 10,
        "clickThroughRate": 3,
        "averageClickPosition": 1,
        "conversionRate": 0.5,
        "trackedSearchCount": 2,
        "clickCount": 2,
        "conversionCount": 1
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches?clickAnalytics=false&orderBy=searchCountc&direction=desc&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=20"
    },
    "searches": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches{?clickAnalytics,orderBy,direction,startDate,endDate,limit,offset,tags}",
      "templated": true
    },
    "first": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches?clickAnalytics=false&orderBy=searchCountc&direction=desc&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=0"
    },
    "next": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches?clickAnalytics=false&orderBy=searchCountc&direction=desc&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=30"
    },
    "prev": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/analytics/top-searches?clickAnalytics=false&orderBy=searchCountc&direction=desc&startDate=2020-07-16T00:00:00&endDate=2020-07-23T23:59:59limit=10&offset=10"
    }
  }
}
```

</details>

### Get count of users

`GET /algolia-search/{hubId}/indexes/{indexId}/analytics/user-count`

<small>`https://api.amplience.net/v2/content/algolia-search/{hubId}/indexes/{indexId}/analytics/user-count`</small>

Returns count of distinct user across the given time range.

**Parameters**

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hubId` | path | string | ✓ | Hub ID<br/>Example: `00112233445566778899aabb` |
| `indexId` | path | string | ✓ | Index ID<br/>Example: `00112233445566778899aabb` |
| `startDate` | query | string |  | The lower bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to 7 days ago, 00:00:00am, UTC<br/>Example: `2020-07-16` |
| `endDate` | query | string |  | The upper bound timestamp (a date, a string like “2006-01-02”) of the period to analyze. Defaults to Today, 23:59:59pm, UTC<br/>Example: `2020-07-23` |
| `includeReplicas` | query | boolean |  | Include replica data in the results (Can only be used in conjunction with primary indexes).<br/>Example: `True` |
| `tags` | query | string |  | Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. E.g: `“lang:fr OR lang:en”`* “platform:ios AND lang:en” * “(lang:fr OR lang:en) AND platform:android” * “device:mobile%20phone” (note the URL encoded)<br/>Example: `platform:ios` |

**Responses**

| Status | Description |
|--------|-------------|
| 200 | Count of distinct user across the given time range |

<details>
<summary>Response Example (200)</summary>

```json
{
  "count": 3,
  "dates": [
    {
      "date": "2020-01-01",
      "count": 1
    }
  ],
  "_links": {
    "self": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/user-count"
    },
    "user-count": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb/user-count{?startDate,endDate,tags,includeReplicas}",
      "templated": true
    },
    "index": {
      "href": "https://api.amplience.net/v2/content/algolia-search/00112233445566778899aabb/indexes/00112233445566778899aabb"
    }
  }
}
```

</details>
