openapi: 3.0.2
info:
  title: Search API
  description: >
    The Algolia Search API lets you search, configure, and mange your indices
    and records.


    ## Client libraries


    Use Algolia's API clients and libraries to reliably integrate Algolia's APIs
    with your apps.

    The official API clients are covered by Algolia's [Service Level
    Agreement](https://www.algolia.com/policies/sla/).


    See: [Algolia's
    ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/)


    ## Base URLs


    The base URLs for requests to the Search API are:


    - `https://{APPLICATION_ID}.algolia.net`

    - `https://{APPLICATION_ID}-dsn.algolia.net`.
      If your subscription includes a [Distributed Search Network](https://dashboard.algolia.com/infra),
      this ensures that requests are sent to servers closest to users.

    Both URLs provide high availability by distributing requests with load
    balancing.


    **All requests must use HTTPS.**


    ## Retry strategy


    To guarantee a high availability, implement a retry strategy for all API
    requests using the URLs of your servers as fallbacks:


    - `https://{APPLICATION_ID}-1.algolianet.com`

    - `https://{APPLICATION_ID}-2.algolianet.com`

    - `https://{APPLICATION_ID}-3.algolianet.com`


    These URLs use a different DNS provider than the primary URLs.

    You should randomize this list to ensure an even load across the three
    servers.


    All Algolia API clients implement this retry strategy.


    ## Authentication


    To authenticate your API requests, add these headers:


    - `x-algolia-application-id`. Your Algolia application ID.

    - `x-algolia-api-key`. An API key with the necessary permissions to make the
    request.
      The required access control list (ACL) to make a request is listed in each endpoint's reference.

    You can find your application ID and API key in the [Algolia
    dashboard](https://dashboard.algolia.com/account).


    ## Request format


    Depending on the endpoint, request bodies are either JSON objects or arrays
    of JSON objects,


    ## Parameters


    Parameters are passed as query parameters for GET and DELETE requests,

    and in the request body for POST and PUT requests.


    Query parameters must be
    [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding).

    Non-ASCII characters must be UTF-8 encoded.

    Plus characters (`+`) are interpreted as spaces.

    Arrays as query parameters must be one of:


    - A comma-separated string: `attributesToRetrieve=title,description`

    - A URL-encoded JSON array:
    `attributesToRetrieve=%5B%22title%22,%22description%22%D`


    ## Response status and errors


    The Search API returns JSON responses.

    Since JSON doesn't guarantee any specific ordering, don't rely on the order
    of attributes in the API response.


    Successful responses return a `2xx` status. Client errors return a `4xx`
    status. Server errors are indicated by a `5xx` status.

    Error responses have a `message` property with more information.


    ## Version


    The current version of the Search API is version 1, as indicated by the
    `/1/` in each endpoint's URL.
  version: 1.0.0
servers:
  - url: https://{appId}.algolia.net
    variables:
      appId:
        default: myAppId
  - url: https://{appId}-1.algolianet.com
    variables:
      appId:
        default: myAppId
  - url: https://{appId}-2.algolianet.com
    variables:
      appId:
        default: myAppId
  - url: https://{appId}-3.algolianet.com
    variables:
      appId:
        default: myAppId
  - url: https://{appId}-dsn.algolia.net
    variables:
      appId:
        default: myAppId
security:
  - appId: []
    apiKey: []
tags:
  - name: Advanced
    description: Query your logs.
  - name: Api Keys
    x-displayName: API keys
    description: >
      Manage your API keys.


      API requests must be authenticated with an API key.

      API keys can have permissions (access control lists, ACL) and
      restrictions.
    externalDocs:
      url: https://www.algolia.com/doc/guides/security/api-keys/
      description: |
        Related guide: API keys.
  - name: Clusters
    description: |
      Multi-cluster operations.

      Algolia no longer offers multi-cluster management.
    externalDocs:
      url: >-
        https://www.algolia.com/doc/guides/scaling/managing-multiple-clusters-mcm/
      description: |
        Related guide: Multi-cluster management.
  - name: Dictionaries
    description: >
      Manage your dictionaries.


      Customize language-specific settings, such as stop words, plurals, or word
      segmentation.


      Dictionaries are application-wide.
    externalDocs:
      url: >-
        https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/
      description: |
        Related guide: Natural languages.
  - name: Indices
    description: >
      Manage your indices and index settings.


      Indices are copies of your data that are stored on Algolia's servers.

      They're optimal data structures for fast search and are made up of records
      and settings.
    externalDocs:
      url: >-
        https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/
      description: |
        Related guide: Manage your indices.
  - name: Records
    description: >
      Add, update, and delete records from your indices.


      Records are individual items in your index.

      When they match a search query, they're returned as search results, in the
      order determined by your ranking.

      Records are schemaless JSON objects.
    externalDocs:
      url: >-
        https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/
      description: |
        Related guide: Prepare your records.
  - name: Rules
    description: >
      Create, update, delete, and search for rules.


      Rules are _if-then_ statements that you can use to curate search results.

      Rules have _conditions_ which can trigger _consequences_.

      Consequences are changes to the search results, such as changing the order
      of search results, or boosting a facet.

      This can be useful for tuning specific queries or for merchandising.
    externalDocs:
      url: >-
        https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/
      description: |
        Related guide: Rules.
  - name: Search
    description: Search one or more indices for matching records or facet values.
  - name: Synonyms
    description: |
      Create, update, delete, and search for synonyms.

      Synonyms are terms that the search engine should consider equal.
    externalDocs:
      url: >-
        https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/
      description: |
        Related guide: Synonyms.
  - name: Vaults
    description: >-
      Algolia Vault lets you restrict access to your clusters to specific IP
      addresses and provides disk-level encryption at rest.
    externalDocs:
      url: https://www.algolia.com/doc/guides/security/algolia-vault/
      description: |
        Related guide: Algolia Vault.
  - name: _model_index_settings
    x-displayName: Index settings
    description: |
      <SchemaDefinition schemaRef="#/components/schemas/indexSettings" />.
paths:
  /{path}:
    get:
      operationId: customGet
      summary: Send requests to the Algolia REST API
      description: This method allow you to send requests to the Algolia REST API.
      parameters:
        - $ref: '#/components/parameters/PathInPath'
        - $ref: '#/components/parameters/Parameters'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.CustomGetAsync("test/minimal");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.customGet(
              path: "test/minimal",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.CustomGet(client.NewApiCustomGetRequest(
              "test/minimal",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.customGet("test/minimal");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.customGet({ path: 'test/minimal' });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.customGet(
              path = "test/minimal",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->customGet(
                'test/minimal',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.custom_get(
                path="test/minimal",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.custom_get("test/minimal")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.customGet[JObject](
              path = "test/minimal"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.customGet(path: "test/minimal")
    post:
      operationId: customPost
      requestBody:
        description: Parameters to send with the custom request.
        content:
          application/json:
            schema:
              type: object
      summary: Send requests to the Algolia REST API
      description: This method allow you to send requests to the Algolia REST API.
      parameters:
        - $ref: '#/components/parameters/PathInPath'
        - $ref: '#/components/parameters/Parameters'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.CustomPostAsync("test/minimal");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.customPost(
              path: "test/minimal",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.CustomPost(client.NewApiCustomPostRequest(
              "test/minimal",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.customPost("test/minimal");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.customPost({ path: 'test/minimal' });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.customPost(
              path = "test/minimal",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->customPost(
                'test/minimal',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.custom_post(
                path="test/minimal",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.custom_post("test/minimal")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.customPost[JObject](
              path = "test/minimal"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.customPost(path: "test/minimal")
    put:
      operationId: customPut
      requestBody:
        description: Parameters to send with the custom request.
        content:
          application/json:
            schema:
              type: object
      summary: Send requests to the Algolia REST API
      description: This method allow you to send requests to the Algolia REST API.
      parameters:
        - $ref: '#/components/parameters/PathInPath'
        - $ref: '#/components/parameters/Parameters'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.CustomPutAsync("test/minimal");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.customPut(
              path: "test/minimal",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.CustomPut(client.NewApiCustomPutRequest(
              "test/minimal",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.customPut("test/minimal");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.customPut({ path: 'test/minimal' });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.customPut(
              path = "test/minimal",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->customPut(
                'test/minimal',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.custom_put(
                path="test/minimal",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.custom_put("test/minimal")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.customPut[JObject](
              path = "test/minimal"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.customPut(path: "test/minimal")
    delete:
      operationId: customDelete
      summary: Send requests to the Algolia REST API
      description: This method allow you to send requests to the Algolia REST API.
      parameters:
        - $ref: '#/components/parameters/PathInPath'
        - $ref: '#/components/parameters/Parameters'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.CustomDeleteAsync("test/minimal");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.customDelete(
              path: "test/minimal",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.CustomDelete(client.NewApiCustomDeleteRequest(
              "test/minimal",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.customDelete("test/minimal");
        - lang: javascript
          label: JavaScript
          source: >
            // Initialize the client

            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');


            // Call the API

            const response = await client.customDelete({ path: 'test/minimal'
            });


            // use typed response

            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.customDelete(
              path = "test/minimal",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->customDelete(
                'test/minimal',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.custom_delete(
                path="test/minimal",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.custom_delete("test/minimal")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.customDelete[JObject](
              path = "test/minimal"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.customDelete(path: "test/minimal")
  /1/indexes/{indexName}/query:
    post:
      tags:
        - Search
      operationId: searchSingleIndex
      x-use-read-transporter: true
      x-cacheable: true
      x-acl:
        - search
      summary: Search an index
      description: >
        Searches a single index and return matching search results (_hits_).


        This method lets you retrieve up to 1,000 hits.

        If you need more, use the [`browse`
        operation](#tag/Search/operation/browse) or increase the
        `paginatedLimitedTo` index setting.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/searchParams'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/searchResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await
            client.SearchSingleIndexAsync<Object>("indexName");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.searchSingleIndex(
              indexName: "indexName",
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client

            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.SearchSingleIndex(client.NewApiSearchSingleIndexRequest(
              "indexName",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.searchSingleIndex("indexName", Hit.class);
        - lang: javascript
          label: JavaScript
          source: >
            // Initialize the client

            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');


            // Call the API

            const response = await client.searchSingleIndex({ indexName:
            'indexName' });


            // use typed response

            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.searchSingleIndex(
              indexName = "indexName",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->searchSingleIndex(
                'indexName',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.search_single_index(
                index_name="indexName",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.search_single_index("indexName")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.searchSingleIndex(
              indexName = "indexName"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            let _: SearchResponse<Hit> = try await
            client.searchSingleIndex(indexName: "indexName")
  /1/indexes/*/queries:
    post:
      tags:
        - Search
      operationId: search
      x-use-read-transporter: true
      x-cacheable: true
      x-legacy-signature: true
      x-acl:
        - search
      summary: Search multiple indices
      description: >
        Sends multiple search request to one or more indices.


        This can be useful in these cases:


        - Different indices for different purposes, such as, one index for
        products, another one for marketing content.

        - Multiple searches to the same index—for example, with different
        filters.
      requestBody:
        required: true
        description: >-
          Muli-search request body. Results are returned in the same order as
          the requests.
        content:
          application/json:
            schema:
              title: searchMethodParams
              type: object
              additionalProperties: false
              properties:
                requests:
                  type: array
                  items:
                    $ref: '#/components/schemas/SearchQuery'
                strategy:
                  $ref: '#/components/schemas/searchStrategy'
              required:
                - requests
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: searchResponses
                type: object
                additionalProperties: false
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/searchResult'
                required:
                  - results
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SearchAsync<Object>(
              new SearchMethodParams
              {
                Requests = new List<SearchQuery>
                {
                  new SearchQuery(new SearchForHits { IndexName = "cts_e2e_search_empty_index", })
                },
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.search(
              searchMethodParams: SearchMethodParams(
                requests: [
                  SearchForHits(
                    indexName: "cts_e2e_search_empty_index",
                  ),
                ],
              ),
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.Search(client.NewApiSearchRequest(

              search.NewEmptySearchMethodParams().SetRequests(
                []search.SearchQuery{*search.SearchForHitsAsSearchQuery(
                  search.NewEmptySearchForHits().SetIndexName("cts_e2e_search_empty_index"))}),
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.search(new SearchMethodParams().setRequests(List.of(new
            SearchForHits().setIndexName("cts_e2e_search_empty_index"))),
            Hit.class);
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.search({
              requests: [{ indexName: 'cts_e2e_search_empty_index' }],
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.search(
              searchMethodParams = SearchMethodParams(
                requests = listOf(
                  SearchForHits(
                    indexName = "cts_e2e_search_empty_index",
                  ),
                ),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->search(
                ['requests' => [
                    ['indexName' => 'cts_e2e_search_empty_index',
                    ],
                ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.search(
                search_method_params={
                    "requests": [
                        {
                            "indexName": "cts_e2e_search_empty_index",
                        },
                    ],
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')


            # Call the API

            resp = client.search(SearchMethodParams.new(requests:
            [SearchForHits.new(index_name: "cts_e2e_search_empty_index")]))


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.search(
              searchMethodParams = SearchMethodParams(
                requests = Seq(
                  SearchForHits(
                    indexName = "cts_e2e_search_empty_index"
                  )
                )
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            let _: SearchResponses<Hit> = try await client
                .search(searchMethodParams: SearchMethodParams(requests: [
                    SearchQuery
                        .searchForHits(SearchForHits(indexName: "cts_e2e_search_empty_index")),
                ]))
  /1/indexes/{indexName}/facets/{facetName}/query:
    post:
      tags:
        - Search
      operationId: searchForFacetValues
      x-use-read-transporter: true
      x-cacheable: true
      x-acl:
        - search
      summary: Search for facet values
      description: >
        Searches for values of a specified facet attribute.


        - By default, facet values are sorted by decreasing count.
          You can adjust this with the `sortFacetValueBy` parameter.
        - Searching for facet values doesn't work if you have **more than 65
        searchable facets and searchable attributes combined**.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - name: facetName
          description: >
            Facet attribute in which to search for values.


            This attribute must be included in the `attributesForFaceting` index
            setting with the `searchable()` modifier.
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              title: searchForFacetValuesRequest
              type: object
              additionalProperties: false
              properties:
                params:
                  $ref: '#/components/schemas/paramsAsString'
                facetQuery:
                  $ref: '#/components/schemas/facetQuery'
                maxFacetHits:
                  $ref: '#/components/schemas/maxFacetHits'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/searchForFacetValuesResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SearchForFacetValuesAsync("indexName",
            "facetName");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.searchForFacetValues(
              indexName: "indexName",
              facetName: "facetName",
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client

            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.SearchForFacetValues(client.NewApiSearchForFacetValuesRequest(
              "indexName", "facetName",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.searchForFacetValues("indexName", "facetName");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.searchForFacetValues({
              indexName: 'indexName',
              facetName: 'facetName',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.searchForFacetValues(
              indexName = "indexName",
              facetName = "facetName",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->searchForFacetValues(
                'indexName',
                'facetName',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.search_for_facet_values(
                index_name="indexName",
                facet_name="facetName",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.search_for_facet_values("indexName", "facetName")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.searchForFacetValues(
              indexName = "indexName",
              facetName = "facetName"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.searchForFacetValues(indexName: "indexName",
            facetName: "facetName")
  /1/indexes/{indexName}/browse:
    post:
      tags:
        - Search
      operationId: browse
      x-acl:
        - browse
      summary: Browse for records
      description: >
        Retrieves records from an index, up to 1,000 per request.


        While searching retrieves _hits_ (records augmented with attributes for
        highlighting and ranking details),

        browsing _just_ returns matching records.

        This can be useful if you want to export your indices.


        - The Analytics API doesn't collect data when using `browse`.

        - Records are ranked by attributes and custom ranking.

        - Deduplication (`distinct`) is turned off.

        - There's no ranking for: typo-tolerance, number of matched words,
        proximity, geo distance.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/browseParams'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/browseResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.BrowseAsync<Object>("cts_e2e_browse");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.browse(
              indexName: "cts_e2e_browse",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.Browse(client.NewApiBrowseRequest(
              "cts_e2e_browse",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.browse("cts_e2e_browse", Hit.class);
        - lang: javascript
          label: JavaScript
          source: >
            // Initialize the client

            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');


            // Call the API

            const response = await client.browse({ indexName: 'cts_e2e_browse'
            });


            // use typed response

            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.browse(
              indexName = "cts_e2e_browse",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->browse(
                'cts_e2e_browse',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.browse(
                index_name="cts_e2e_browse",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.browse("cts_e2e_browse")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.browse(
              indexName = "cts_e2e_browse"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            let _: BrowseResponse<Hit> = try await client.browse(indexName:
            "cts_e2e_browse")
  /1/indexes/{indexName}:
    post:
      tags:
        - Records
      operationId: saveObject
      x-acl:
        - addObject
      description: >
        Adds a record to an index or replace it.


        - If the record doesn't have an object ID, a new record with an
        auto-generated object ID is added to your index.

        - If a record with the specified object ID exists, the existing record
        is replaced.

        - If a record with the specified object ID doesn't exist, a new record
        is added to your index.

        - If you add a record to an index that doesn't exist yet, a new index is
        created.


        To update _some_ attributes of a record, use the [`partial`
        operation](#tag/Records/operation/partial).

        To add, update, or replace multiple records, use the [`batch`
        operation](#tag/Records/operation/batch).
      summary: Add or replace a record
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        required: true
        description: >-
          The record, a schemaless object with attributes that are useful in the
          context of search and discovery.
        content:
          application/json:
            schema:
              type: object
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                title: saveObjectResponse
                type: object
                additionalProperties: false
                properties:
                  createdAt:
                    $ref: '#/components/schemas/createdAt'
                  taskID:
                    $ref: '#/components/schemas/taskID'
                  objectID:
                    $ref: '#/components/schemas/objectID'
                required:
                  - taskID
                  - createdAt
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SaveObjectAsync(
              "theIndexName",
              new Dictionary<string, string> { { "objectID", "id" }, { "test", "val" } }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.saveObject(
              indexName: "theIndexName",
              body: {
                'objectID': "id",
                'test': "val",
              },
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.SaveObject(client.NewApiSaveObjectRequest(
              "theIndexName", map[string]any{"objectID": "id", "test": "val"},
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.saveObject("theIndexName", Map.of("objectID", "id", "test",
            "val"));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.saveObject({
              indexName: 'theIndexName',
              body: { objectID: 'id', test: 'val' },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.saveObject(
              indexName = "theIndexName",
              body = buildJsonObject {
                put(
                  "objectID",
                  JsonPrimitive("id"),
                )
                put(
                  "test",
                  JsonPrimitive("val"),
                )
              },
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->saveObject(
                'theIndexName',
                ['objectID' => 'id',
                    'test' => 'val',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.save_object(
                index_name="theIndexName",
                body={
                    "objectID": "id",
                    "test": "val",
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')


            # Call the API

            resp = client.save_object("theIndexName", { objectID: "id", test:
            "val" })


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.saveObject(
              indexName = "theIndexName",
              body = JObject(List(JField("objectID", JString("id")), JField("test", JString("val"))))
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.saveObject(indexName: "theIndexName", body:
            ["objectID": "id", "test": "val"])
    delete:
      tags:
        - Indices
      operationId: deleteIndex
      x-acl:
        - deleteIndex
      summary: Delete an index
      description: >
        Deletes an index and all its settings.


        - Deleting an index doesn't delete its analytics data.

        - If you try to delete a non-existing index, the operation is ignored
        without warning.

        - If the index you want to delete has replica indices, the replicas
        become independent indices.

        - If the index you want to delete is a replica index, you must first
        unlink it from its primary index before you can delete it.
          For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/).
      externalDocs:
        url: >-
          https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/delete-indices/
        description: |
          Related guide: Delete indices.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      responses:
        '200':
          $ref: '#/components/responses/DeletedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.DeleteIndexAsync("theIndexName");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.deleteIndex(
              indexName: "theIndexName",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.DeleteIndex(client.NewApiDeleteIndexRequest(
              "theIndexName",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.deleteIndex("theIndexName");
        - lang: javascript
          label: JavaScript
          source: >
            // Initialize the client

            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');


            // Call the API

            const response = await client.deleteIndex({ indexName:
            'theIndexName' });


            // use typed response

            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.deleteIndex(
              indexName = "theIndexName",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->deleteIndex(
                'theIndexName',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.delete_index(
                index_name="theIndexName",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.delete_index("theIndexName")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.deleteIndex(
              indexName = "theIndexName"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.deleteIndex(indexName: "theIndexName")
  /1/indexes/{indexName}/{objectID}:
    get:
      tags:
        - Records
      operationId: getObject
      x-acl:
        - search
      summary: Retrieve a record
      description: >
        Retrieves one record by its object ID.


        To retrieve more than one record, use the [`objects`
        operation](#tag/Records/operation/getObjects).
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectID'
        - name: attributesToRetrieve
          in: query
          description: >
            Attributes to include with the records in the response.

            This is useful to reduce the size of the API response.

            By default, all retrievable attributes are returned.


            `objectID` is always retrieved.


            Attributes included in `unretrievableAttributes`

            won't be retrieved unless the request is authenticated with the
            admin API key.
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: getObjectResponse
                type: object
                description: The requested record.
                additionalProperties:
                  $ref: '#/components/schemas/attribute'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetObjectAsync(
              "theIndexName",
              "uniqueID",
              new List<string> { "attr1", "attr2" }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getObject(
              indexName: "theIndexName",
              objectID: "uniqueID",
              attributesToRetrieve: [
                "attr1",
                "attr2",
              ],
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetObject(client.NewApiGetObjectRequest(
              "theIndexName", "uniqueID",
            ).WithAttributesToRetrieve(
              []string{"attr1", "attr2"}))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getObject("theIndexName", "uniqueID", List.of("attr1",
            "attr2"));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.getObject({
              indexName: 'theIndexName',
              objectID: 'uniqueID',
              attributesToRetrieve: ['attr1', 'attr2'],
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getObject(
              indexName = "theIndexName",
              objectID = "uniqueID",
              attributesToRetrieve = listOf("attr1", "attr2"),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getObject(
                'theIndexName',
                'uniqueID',
                [
                    'attr1',

                    'attr2',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_object(
                index_name="theIndexName",
                object_id="uniqueID",
                attributes_to_retrieve=[
                    "attr1",
                    "attr2",
                ],
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')


            # Call the API

            resp = client.get_object("theIndexName", "uniqueID", ["attr1",
            "attr2"])


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getObject(
              indexName = "theIndexName",
              objectID = "uniqueID",
              attributesToRetrieve = Some(Seq("attr1", "attr2"))
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.getObject(
                indexName: "theIndexName",
                objectID: "uniqueID",
                attributesToRetrieve: ["attr1", "attr2"]
            )
    put:
      tags:
        - Records
      operationId: addOrUpdateObject
      x-acl:
        - addObject
      summary: Add or replace a record
      description: >
        If a record with the specified object ID exists, the existing record is
        replaced.

        Otherwise, a new record is added to the index.


        To update _some_ attributes of an existing record, use the [`partial`
        operation](#tag/Records/operation/partialUpdateObject) instead.

        To add, update, or replace multiple records, use the [`batch`
        operation](#tag/Records/operation/batch).
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectID'
      requestBody:
        required: true
        description: >-
          The record, a schemaless object with attributes that are useful in the
          context of search and discovery.
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          $ref: '#/components/responses/UpdatedAtWithObjectId'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.AddOrUpdateObjectAsync(
              "indexName",
              "uniqueID",
              new Dictionary<string, string> { { "key", "value" } }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.addOrUpdateObject(
              indexName: "indexName",
              objectID: "uniqueID",
              body: {
                'key': "value",
              },
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client

            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.AddOrUpdateObject(client.NewApiAddOrUpdateObjectRequest(
              "indexName", "uniqueID", map[string]any{"key": "value"},
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.addOrUpdateObject("indexName", "uniqueID", Map.of("key",
            "value"));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.addOrUpdateObject({
              indexName: 'indexName',
              objectID: 'uniqueID',
              body: { key: 'value' },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.addOrUpdateObject(
              indexName = "indexName",
              objectID = "uniqueID",
              body = buildJsonObject {
                put(
                  "key",
                  JsonPrimitive("value"),
                )
              },
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->addOrUpdateObject(
                'indexName',
                'uniqueID',
                ['key' => 'value',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.add_or_update_object(
                index_name="indexName",
                object_id="uniqueID",
                body={
                    "key": "value",
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')


            # Call the API

            resp = client.add_or_update_object("indexName", "uniqueID", { key:
            "value" })


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.addOrUpdateObject(
              indexName = "indexName",
              objectID = "uniqueID",
              body = JObject(List(JField("key", JString("value"))))
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.addOrUpdateObject(indexName: "indexName",
            objectID: "uniqueID", body: ["key": "value"])
    delete:
      tags:
        - Records
      operationId: deleteObject
      x-acl:
        - deleteObject
      summary: Delete a record
      description: >
        Deletes a record by its object ID.


        To delete more than one record, use the [`batch`
        operation](#tag/Records/operation/batch).

        To delete records matching a query, use the [`deleteByQuery`
        operation](#tag/Records/operation/deleteBy).
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectID'
      responses:
        '200':
          $ref: '#/components/responses/DeletedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.DeleteObjectAsync("theIndexName",
            "uniqueID");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.deleteObject(
              indexName: "theIndexName",
              objectID: "uniqueID",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.DeleteObject(client.NewApiDeleteObjectRequest(
              "theIndexName", "uniqueID",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.deleteObject("theIndexName", "uniqueID");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.deleteObject({
              indexName: 'theIndexName',
              objectID: 'uniqueID',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.deleteObject(
              indexName = "theIndexName",
              objectID = "uniqueID",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->deleteObject(
                'theIndexName',
                'uniqueID',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.delete_object(
                index_name="theIndexName",
                object_id="uniqueID",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.delete_object("theIndexName", "uniqueID")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.deleteObject(
              indexName = "theIndexName",
              objectID = "uniqueID"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.deleteObject(indexName: "theIndexName",
            objectID: "uniqueID")
  /1/indexes/{indexName}/deleteByQuery:
    post:
      tags:
        - Records
      operationId: deleteBy
      x-acl:
        - deleteIndex
      summary: Delete records matching a query
      description: >
        This operation doesn't accept empty queries or filters.


        It's more efficient to get a list of object IDs with the [`browse`
        operation](#tag/Search/operation/browse),

        and then delete the records using the [`batch`
        operation](tag/Records/operation/batch).
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/deleteByParams'
      responses:
        '200':
          $ref: '#/components/responses/DeletedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.DeleteByAsync(
              "theIndexName",
              new DeleteByParams { Filters = "brand:brandName", }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.deleteBy(
              indexName: "theIndexName",
              deleteByParams: DeleteByParams(
                filters: "brand:brandName",
              ),
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.DeleteBy(client.NewApiDeleteByRequest(
              "theIndexName",
              search.NewEmptyDeleteByParams().SetFilters("brand:brandName"),
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.deleteBy("theIndexName", new
            DeleteByParams().setFilters("brand:brandName"));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.deleteBy({
              indexName: 'theIndexName',
              deleteByParams: { filters: 'brand:brandName' },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.deleteBy(
              indexName = "theIndexName",
              deleteByParams = DeleteByParams(
                filters = "brand:brandName",
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->deleteBy(
                'theIndexName',
                ['filters' => 'brand:brandName',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.delete_by(
                index_name="theIndexName",
                delete_by_params={
                    "filters": "brand:brandName",
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')


            # Call the API

            resp = client.delete_by("theIndexName", DeleteByParams.new(filters:
            "brand:brandName"))


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.deleteBy(
              indexName = "theIndexName",
              deleteByParams = DeleteByParams(
                filters = Some("brand:brandName")
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.deleteBy(
                indexName: "theIndexName",
                deleteByParams: DeleteByParams(filters: "brand:brandName")
            )
  /1/indexes/{indexName}/clear:
    post:
      tags:
        - Records
      operationId: clearObjects
      x-acl:
        - deleteIndex
      summary: Delete all records from an index
      description: >-
        Deletes only the records from an index while keeping settings, synonyms,
        and rules.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      responses:
        '200':
          $ref: '#/components/responses/UpdatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.ClearObjectsAsync("theIndexName");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.clearObjects(
              indexName: "theIndexName",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.ClearObjects(client.NewApiClearObjectsRequest(
              "theIndexName",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.clearObjects("theIndexName");
        - lang: javascript
          label: JavaScript
          source: >
            // Initialize the client

            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');


            // Call the API

            const response = await client.clearObjects({ indexName:
            'theIndexName' });


            // use typed response

            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.clearObjects(
              indexName = "theIndexName",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->clearObjects(
                'theIndexName',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.clear_objects(
                index_name="theIndexName",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.clear_objects("theIndexName")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.clearObjects(
              indexName = "theIndexName"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.clearObjects(indexName: "theIndexName")
  /1/indexes/{indexName}/{objectID}/partial:
    post:
      tags:
        - Records
      operationId: partialUpdateObject
      x-acl:
        - addObject
      summary: Add or update attributes
      x-codegen-request-body-name: attributesToUpdate
      description: |
        Adds new attributes to a record, or update existing ones.

        - If a record with the specified object ID doesn't exist,
          a new record is added to the index **if** `createIfNotExists` is true.
        - If the index doesn't exist yet, this method creates a new index.
        - You can use any first-level attribute but not nested attributes.
          If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectID'
        - name: createIfNotExists
          description: Whether to create a new record if it doesn't exist.
          in: query
          schema:
            type: boolean
            default: true
      requestBody:
        required: true
        description: Attributes with their values.
        content:
          application/json:
            schema:
              type: object
              description: Attributes to update.
              additionalProperties:
                $ref: '#/components/schemas/attributeToUpdate'
      responses:
        '200':
          $ref: '#/components/responses/UpdatedAtWithObjectId'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.PartialUpdateObjectAsync(
              "theIndexName",
              "uniqueID",
              new Dictionary<string, AttributeToUpdate>
              {
                { "id1", new AttributeToUpdate("test") },
                {
                  "id2",
                  new AttributeToUpdate(
                    new BuiltInOperation
                    {
                      Operation = Enum.Parse<BuiltInOperationType>("AddUnique"),
                      Value = "test2",
                    }
                  )
                }
              },
              true
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.partialUpdateObject(
              indexName: "theIndexName",
              objectID: "uniqueID",
              attributesToUpdate: {
                'id1': "test",
                'id2': BuiltInOperation(
                  operation: BuiltInOperationType.fromJson("AddUnique"),
                  value: "test2",
                ),
              },
              createIfNotExists: true,
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client

            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.PartialUpdateObject(client.NewApiPartialUpdateObjectRequest(
              "theIndexName", "uniqueID", map[string]search.AttributeToUpdate{"id1": *search.StringAsAttributeToUpdate("test"), "id2": *search.BuiltInOperationAsAttributeToUpdate(
                search.NewEmptyBuiltInOperation().SetOperation(search.BuiltInOperationType("AddUnique")).SetValue("test2"))},
            ).WithCreateIfNotExists(true))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.partialUpdateObject(
              "theIndexName",
              "uniqueID",
              Map.of(
                "id1",
                AttributeToUpdate.of("test"),
                "id2",
                new BuiltInOperation().setOperation(BuiltInOperationType.fromValue("AddUnique")).setValue("test2")
              ),
              true
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.partialUpdateObject({
              indexName: 'theIndexName',
              objectID: 'uniqueID',
              attributesToUpdate: {
                id1: 'test',
                id2: { _operation: 'AddUnique', value: 'test2' },
              },
              createIfNotExists: true,
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.partialUpdateObject(
              indexName = "theIndexName",
              objectID = "uniqueID",
              attributesToUpdate = mapOf(
                "id1" to AttributeToUpdate.of("test"),
                "id2" to BuiltInOperation(
                  operation = BuiltInOperationType.entries.first { it.value == "AddUnique" },
                  value = "test2",
                ),
              ),
              createIfNotExists = true,
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->partialUpdateObject(
                'theIndexName',
                'uniqueID',
                ['id1' => 'test',
                    'id2' => ['_operation' => 'AddUnique',
                        'value' => 'test2',
                    ],
                ],
                true,
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.partial_update_object(
                index_name="theIndexName",
                object_id="uniqueID",
                attributes_to_update={
                    "id1": "test",
                    "id2": {
                        "_operation": "AddUnique",
                        "value": "test2",
                    },
                },
                create_if_not_exists=True,
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.partial_update_object(
              "theIndexName",
              "uniqueID",
              { id1: "test", id2: BuiltInOperation.new(_operation: 'AddUnique', value: "test2") },
              true
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.partialUpdateObject(
              indexName = "theIndexName",
              objectID = "uniqueID",
              attributesToUpdate = Map(
                "id1" -> AttributeToUpdate("test"),
                "id2" -> BuiltInOperation(
                  _operation = BuiltInOperationType.withName("AddUnique"),
                  value = "test2"
                )
              ),
              createIfNotExists = Some(true)
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.partialUpdateObject(
                indexName: "theIndexName",
                objectID: "uniqueID",
                attributesToUpdate: [
                    "id1": AttributeToUpdate.string("test"),
                    "id2": AttributeToUpdate
                        .builtInOperation(BuiltInOperation(operation: BuiltInOperationType.addUnique, value: "test2")),
                ],
                createIfNotExists: true
            )
  /1/indexes/{indexName}/batch:
    post:
      tags:
        - Records
      operationId: batch
      summary: Batch indexing operations on one index
      description: >
        Adds, updates, or deletes records in one index with a single API
        request.


        Batching index updates reduces latency and increases data integrity.


        - Actions are applied in the order they're specified.

        - Actions are equivalent to the individual API requests of the same
        name.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: batchWriteParams
              description: Batch parameters.
              type: object
              additionalProperties: false
              properties:
                requests:
                  type: array
                  items:
                    title: batchRequest
                    type: object
                    additionalProperties: false
                    properties:
                      action:
                        $ref: '#/components/schemas/action'
                      body:
                        type: object
                        description: Operation arguments (varies with specified `action`).
                        example:
                          name: Betty Jane McCamey
                          company: Vita Foods Inc.
                          email: betty@mccamey.com
                    required:
                      - action
                      - body
              required:
                - requests
            examples:
              batch:
                summary: Batch indexing request
                value:
                  requests:
                    - action: addObject
                      body:
                        name: Betty Jane McCamey
                        company: Vita Foods Inc.
                        email: betty@mccamey.com
                    - action: addObject
                      body:
                        name: Gayla geimer
                        company: Ortman McCain Co.
                        email: gayla@geimer.com
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: batchResponse
                type: object
                additionalProperties: false
                properties:
                  taskID:
                    $ref: '#/components/schemas/taskID'
                  objectIDs:
                    $ref: '#/components/schemas/objectIDs'
                required:
                  - taskID
                  - objectIDs
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.BatchAsync(
              "theIndexName",
              new BatchWriteParams
              {
                Requests = new List<BatchRequest>
                {
                  new BatchRequest
                  {
                    Action = Enum.Parse<Action>("AddObject"),
                    Body = new Dictionary<string, string> { { "key", "value" } },
                  }
                },
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.batch(
              indexName: "theIndexName",
              batchWriteParams: BatchWriteParams(
                requests: [
                  BatchRequest(
                    action: Action.fromJson("addObject"),
                    body: {
                      'key': "value",
                    },
                  ),
                ],
              ),
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.Batch(client.NewApiBatchRequest(
              "theIndexName",
              search.NewEmptyBatchWriteParams().SetRequests(
                []search.BatchRequest{*search.NewEmptyBatchRequest().SetAction(search.Action("addObject")).SetBody(map[string]any{"key": "value"})}),
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.batch(
              "theIndexName",
              new BatchWriteParams()
                .setRequests(List.of(new BatchRequest().setAction(Action.fromValue("addObject")).setBody(Map.of("key", "value"))))
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.batch({
              indexName: 'theIndexName',
              batchWriteParams: {
                requests: [{ action: 'addObject', body: { key: 'value' } }],
              },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.batch(
              indexName = "theIndexName",
              batchWriteParams = BatchWriteParams(
                requests = listOf(
                  BatchRequest(
                    action = Action.entries.first { it.value == "addObject" },
                    body = buildJsonObject {
                      put(
                        "key",
                        JsonPrimitive("value"),
                      )
                    },
                  ),
                ),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->batch(
                'theIndexName',
                ['requests' => [
                    ['action' => 'addObject',
                        'body' => ['key' => 'value',
                        ],
                    ],
                ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.batch(
                index_name="theIndexName",
                batch_write_params={
                    "requests": [
                        {
                            "action": "addObject",
                            "body": {
                                "key": "value",
                            },
                        },
                    ],
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.batch(
              "theIndexName",
              BatchWriteParams.new(requests: [BatchRequest.new(action: 'addObject', body: { key: "value" })])
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.batch(
              indexName = "theIndexName",
              batchWriteParams = BatchWriteParams(
                requests = Seq(
                  BatchRequest(
                    action = Action.withName("addObject"),
                    body = JObject(List(JField("key", JString("value"))))
                  )
                )
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.batch(
                indexName: "theIndexName",
                batchWriteParams: BatchWriteParams(requests: [BatchRequest(
                    action: Action.addObject,
                    body: ["key": "value"]
                )])
            )
  /1/indexes/*/batch:
    post:
      tags:
        - Records
      operationId: multipleBatch
      description: >
        Adds, updates, or deletes records in multiple indices with a single API
        request.


        - Actions are applied in the order they are specified.

        - Actions are equivalent to the individual API requests of the same
        name.
      summary: Batch indexing operations on multiple indices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: batchParams
              description: Batch parameters.
              type: object
              additionalProperties: false
              properties:
                requests:
                  type: array
                  items:
                    title: multipleBatchRequest
                    type: object
                    additionalProperties: false
                    properties:
                      action:
                        $ref: '#/components/schemas/action'
                      body:
                        type: object
                        description: Operation arguments (varies with specified `action`).
                      indexName:
                        $ref: '#/components/schemas/indexName'
                    required:
                      - action
                      - body
                      - indexName
              required:
                - requests
            examples:
              batch:
                summary: Batch indexing request to two indices
                value:
                  requests:
                    - action: addObject
                      indexName: contacts
                      body:
                        name: Betty Jane McCamey
                        company: Vita Foods Inc.
                        email: betty@mccamey.com
                    - action: addObject
                      indexName: public_contacts
                      body:
                        name: Gayla Geimer
                        company: Ortman McCain Co.
                        email: gayla@geimer.com
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: multipleBatchResponse
                type: object
                additionalProperties: false
                properties:
                  taskID:
                    type: object
                    description: Task IDs. One for each index.
                    additionalProperties:
                      $ref: '#/components/schemas/taskID'
                  objectIDs:
                    $ref: '#/components/schemas/objectIDs'
                required:
                  - taskID
                  - objectIDs
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.MultipleBatchAsync(
              new BatchParams
              {
                Requests = new List<MultipleBatchRequest>
                {
                  new MultipleBatchRequest
                  {
                    Action = Enum.Parse<Action>("AddObject"),
                    Body = new Dictionary<string, string> { { "key", "value" } },
                    IndexName = "theIndexName",
                  }
                },
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.multipleBatch(
              batchParams: BatchParams(
                requests: [
                  MultipleBatchRequest(
                    action: Action.fromJson("addObject"),
                    body: {
                      'key': "value",
                    },
                    indexName: "theIndexName",
                  ),
                ],
              ),
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.MultipleBatch(client.NewApiMultipleBatchRequest(

              search.NewEmptyBatchParams().SetRequests(
                []search.MultipleBatchRequest{*search.NewEmptyMultipleBatchRequest().SetAction(search.Action("addObject")).SetBody(map[string]any{"key": "value"}).SetIndexName("theIndexName")}),
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.multipleBatch(
              new BatchParams()
                .setRequests(
                  List.of(
                    new MultipleBatchRequest().setAction(Action.fromValue("addObject")).setBody(Map.of("key", "value")).setIndexName("theIndexName")
                  )
                )
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.multipleBatch({
              requests: [
                {
                  action: 'addObject',
                  body: { key: 'value' },
                  indexName: 'theIndexName',
                },
              ],
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.multipleBatch(
              batchParams = BatchParams(
                requests = listOf(
                  MultipleBatchRequest(
                    action = Action.entries.first { it.value == "addObject" },
                    body = buildJsonObject {
                      put(
                        "key",
                        JsonPrimitive("value"),
                      )
                    },
                    indexName = "theIndexName",
                  ),
                ),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->multipleBatch(
                ['requests' => [
                    ['action' => 'addObject',
                        'body' => ['key' => 'value',
                        ],
                        'indexName' => 'theIndexName',
                    ],
                ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.multiple_batch(
                batch_params={
                    "requests": [
                        {
                            "action": "addObject",
                            "body": {
                                "key": "value",
                            },
                            "indexName": "theIndexName",
                        },
                    ],
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.multiple_batch(
              BatchParams.new(
                requests: [MultipleBatchRequest.new(
                  action: 'addObject', body: { key: "value" }, index_name: "theIndexName"
                )]
              )
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.multipleBatch(
              batchParams = BatchParams(
                requests = Seq(
                  MultipleBatchRequest(
                    action = Action.withName("addObject"),
                    body = JObject(List(JField("key", JString("value")))),
                    indexName = "theIndexName"
                  )
                )
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.multipleBatch(batchParams:
            BatchParams(requests: [MultipleBatchRequest(
                action: Action.addObject,
                body: ["key": "value"],
                indexName: "theIndexName"
            )]))
  /1/indexes/*/objects:
    post:
      tags:
        - Records
      operationId: getObjects
      x-use-read-transporter: true
      x-cacheable: true
      x-acl:
        - search
      summary: Retrieve records
      description: |
        Retrieves one or more records, potentially from different indices.

        Records are returned in the same order as the requests.
      requestBody:
        required: true
        description: Request object.
        content:
          application/json:
            schema:
              title: getObjectsParams
              description: Request parameters.
              type: object
              additionalProperties: false
              properties:
                requests:
                  type: array
                  items:
                    description: Request body for retrieving records.
                    title: getObjectsRequest
                    type: object
                    additionalProperties: false
                    required:
                      - objectID
                      - indexName
                    properties:
                      attributesToRetrieve:
                        type: array
                        items:
                          type: string
                        description: >
                          Attributes to retrieve.

                          If not specified, all retrievable attributes are
                          returned.
                        example:
                          - author
                          - title
                          - content
                      objectID:
                        type: string
                        description: Object ID for the record to retrieve.
                        example: product-1
                      indexName:
                        type: string
                        description: Index from which to retrieve the records.
                        example: books
              required:
                - requests
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: getObjectsResponse
                type: object
                additionalProperties: false
                properties:
                  results:
                    type: array
                    description: Retrieved records.
                    items:
                      type: object
                      description: Retrieved record.
                      x-is-generic: true
                required:
                  - results
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetObjectsAsync<Object>(
              new GetObjectsParams
              {
                Requests = new List<GetObjectsRequest>
                {
                  new GetObjectsRequest
                  {
                    AttributesToRetrieve = new List<string> { "attr1", "attr2" },
                    ObjectID = "uniqueID",
                    IndexName = "theIndexName",
                  }
                },
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getObjects(
              getObjectsParams: GetObjectsParams(
                requests: [
                  GetObjectsRequest(
                    attributesToRetrieve: [
                      "attr1",
                      "attr2",
                    ],
                    objectID: "uniqueID",
                    indexName: "theIndexName",
                  ),
                ],
              ),
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetObjects(client.NewApiGetObjectsRequest(

              search.NewEmptyGetObjectsParams().SetRequests(
                []search.GetObjectsRequest{*search.NewEmptyGetObjectsRequest().SetAttributesToRetrieve(
                  []string{"attr1", "attr2"}).SetObjectID("uniqueID").SetIndexName("theIndexName")}),
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getObjects(
              new GetObjectsParams()
                .setRequests(
                  List.of(
                    new GetObjectsRequest().setAttributesToRetrieve(List.of("attr1", "attr2")).setObjectID("uniqueID").setIndexName("theIndexName")
                  )
                ),
              Hit.class
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.getObjects({
              requests: [
                {
                  attributesToRetrieve: ['attr1', 'attr2'],
                  objectID: 'uniqueID',
                  indexName: 'theIndexName',
                },
              ],
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getObjects(
              getObjectsParams = GetObjectsParams(
                requests = listOf(
                  GetObjectsRequest(
                    attributesToRetrieve = listOf("attr1", "attr2"),
                    objectID = "uniqueID",
                    indexName = "theIndexName",
                  ),
                ),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getObjects(
                ['requests' => [
                    ['attributesToRetrieve' => [
                        'attr1',

                        'attr2',
                    ],
                        'objectID' => 'uniqueID',
                        'indexName' => 'theIndexName',
                    ],
                ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_objects(
                get_objects_params={
                    "requests": [
                        {
                            "attributesToRetrieve": [
                                "attr1",
                                "attr2",
                            ],
                            "objectID": "uniqueID",
                            "indexName": "theIndexName",
                        },
                    ],
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.get_objects(
              GetObjectsParams.new(
                requests: [GetObjectsRequest.new(
                  attributes_to_retrieve: ["attr1",
                    "attr2"],
                  object_id: "uniqueID",
                  index_name: "theIndexName"
                )]
              )
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getObjects(
              getObjectsParams = GetObjectsParams(
                requests = Seq(
                  GetObjectsRequest(
                    attributesToRetrieve = Some(Seq("attr1", "attr2")),
                    objectID = "uniqueID",
                    indexName = "theIndexName"
                  )
                )
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            let _: GetObjectsResponse<Hit> = try await client
                .getObjects(getObjectsParams: GetObjectsParams(requests: [GetObjectsRequest(
                    attributesToRetrieve: ["attr1", "attr2"],
                    objectID: "uniqueID",
                    indexName: "theIndexName"
                )]))
  /1/indexes/{indexName}/settings:
    get:
      tags:
        - Indices
      operationId: getSettings
      x-acl:
        - search
      description: Retrieves an object with non-null index settings.
      summary: Retrieve index settings
      parameters:
        - $ref: '#/components/parameters/IndexName'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/indexSettings'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetSettingsAsync("cts_e2e_settings");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getSettings(
              indexName: "cts_e2e_settings",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetSettings(client.NewApiGetSettingsRequest(
              "cts_e2e_settings",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getSettings("cts_e2e_settings");
        - lang: javascript
          label: JavaScript
          source: >
            // Initialize the client

            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');


            // Call the API

            const response = await client.getSettings({ indexName:
            'cts_e2e_settings' });


            // use typed response

            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getSettings(
              indexName = "cts_e2e_settings",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getSettings(
                'cts_e2e_settings',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_settings(
                index_name="cts_e2e_settings",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.get_settings("cts_e2e_settings")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getSettings(
              indexName = "cts_e2e_settings"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.getSettings(indexName: "cts_e2e_settings")
    put:
      tags:
        - Indices
      operationId: setSettings
      x-acl:
        - editSettings
      description: >
        Update the specified index settings.


        Index settings that you don't specify are left unchanged.

        Specify `null` to reset a setting to its default value.


        For best performance, update the index settings before you add new
        records to your index.
      summary: Update index settings
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ForwardToReplicas'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/indexSettings'
      responses:
        '200':
          $ref: '#/components/responses/UpdatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SetSettingsAsync(
              "cts_e2e_settings",
              new IndexSettings { PaginationLimitedTo = 10, },
              true
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.setSettings(
              indexName: "cts_e2e_settings",
              indexSettings: IndexSettings(
                paginationLimitedTo: 10,
              ),
              forwardToReplicas: true,
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.SetSettings(client.NewApiSetSettingsRequest(
              "cts_e2e_settings",
              search.NewEmptyIndexSettings().SetPaginationLimitedTo(10),
            ).WithForwardToReplicas(true))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.setSettings("cts_e2e_settings", new
            IndexSettings().setPaginationLimitedTo(10), true);
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.setSettings({
              indexName: 'cts_e2e_settings',
              indexSettings: { paginationLimitedTo: 10 },
              forwardToReplicas: true,
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.setSettings(
              indexName = "cts_e2e_settings",
              indexSettings = IndexSettings(
                paginationLimitedTo = 10,
              ),
              forwardToReplicas = true,
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->setSettings(
                'cts_e2e_settings',
                ['paginationLimitedTo' => 10,
                ],
                true,
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.set_settings(
                index_name="cts_e2e_settings",
                index_settings={
                    "paginationLimitedTo": 10,
                },
                forward_to_replicas=True,
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.set_settings(
              "cts_e2e_settings",
              IndexSettings.new(pagination_limited_to: 10),
              true
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.setSettings(
              indexName = "cts_e2e_settings",
              indexSettings = IndexSettings(
                paginationLimitedTo = Some(10)
              ),
              forwardToReplicas = Some(true)
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.setSettings(
                indexName: "cts_e2e_settings",
                indexSettings: IndexSettings(paginationLimitedTo: 10),
                forwardToReplicas: true
            )
  /1/indexes/{indexName}/synonyms/{objectID}:
    get:
      tags:
        - Synonyms
      operationId: getSynonym
      x-acl:
        - settings
      summary: Retrieve a synonym
      description: |
        Retrieves a syonym by its ID.
        To find the object IDs for your synonyms,
        use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/parameters_ObjectID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/synonymHit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetSynonymAsync("indexName", "id1");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getSynonym(
              indexName: "indexName",
              objectID: "id1",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetSynonym(client.NewApiGetSynonymRequest(
              "indexName", "id1",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getSynonym("indexName", "id1");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.getSynonym({
              indexName: 'indexName',
              objectID: 'id1',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getSynonym(
              indexName = "indexName",
              objectID = "id1",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getSynonym(
                'indexName',
                'id1',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_synonym(
                index_name="indexName",
                object_id="id1",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.get_synonym("indexName", "id1")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getSynonym(
              indexName = "indexName",
              objectID = "id1"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.getSynonym(indexName: "indexName", objectID:
            "id1")
    put:
      tags:
        - Synonyms
      operationId: saveSynonym
      x-acl:
        - editSettings
      summary: Create or replace a synonym
      description: >
        If a synonym with the specified object ID doesn't exist, Algolia adds a
        new one.

        Otherwise, the existing synonym is replaced.

        To add multiple synonyms in a single API request, use the [`batch`
        operation](#tag/Synonyms/operation/saveSynonyms).
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/parameters_ObjectID'
        - $ref: '#/components/parameters/ForwardToReplicas'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/synonymHit'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: saveSynonymResponse
                type: object
                additionalProperties: false
                properties:
                  taskID:
                    $ref: '#/components/schemas/taskID'
                  updatedAt:
                    $ref: '#/components/schemas/updatedAt'
                  id:
                    $ref: '#/components/schemas/id'
                required:
                  - taskID
                  - updatedAt
                  - id
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SaveSynonymAsync(
              "indexName",
              "id1",
              new SynonymHit
              {
                ObjectID = "id1",
                Type = Enum.Parse<SynonymType>("Synonym"),
                Synonyms = new List<string> { "car", "vehicule", "auto" },
              },
              true
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.saveSynonym(
              indexName: "indexName",
              objectID: "id1",
              synonymHit: SynonymHit(
                objectID: "id1",
                type: SynonymType.fromJson("synonym"),
                synonyms: [
                  "car",
                  "vehicule",
                  "auto",
                ],
              ),
              forwardToReplicas: true,
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.SaveSynonym(client.NewApiSaveSynonymRequest(
              "indexName", "id1",
              search.NewEmptySynonymHit().SetObjectID("id1").SetType(search.SynonymType("synonym")).SetSynonyms(
                []string{"car", "vehicule", "auto"}),
            ).WithForwardToReplicas(true))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.saveSynonym(
              "indexName",
              "id1",
              new SynonymHit().setObjectID("id1").setType(SynonymType.fromValue("synonym")).setSynonyms(List.of("car", "vehicule", "auto")),
              true
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.saveSynonym({
              indexName: 'indexName',
              objectID: 'id1',
              synonymHit: {
                objectID: 'id1',
                type: 'synonym',
                synonyms: ['car', 'vehicule', 'auto'],
              },
              forwardToReplicas: true,
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.saveSynonym(
              indexName = "indexName",
              objectID = "id1",
              synonymHit = SynonymHit(
                objectID = "id1",
                type = SynonymType.entries.first { it.value == "synonym" },
                synonyms = listOf("car", "vehicule", "auto"),
              ),
              forwardToReplicas = true,
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->saveSynonym(
                'indexName',
                'id1',
                ['objectID' => 'id1',
                    'type' => 'synonym',
                    'synonyms' => [
                        'car',

                        'vehicule',

                        'auto',
                    ],
                ],
                true,
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.save_synonym(
                index_name="indexName",
                object_id="id1",
                synonym_hit={
                    "objectID": "id1",
                    "type": "synonym",
                    "synonyms": [
                        "car",
                        "vehicule",
                        "auto",
                    ],
                },
                forward_to_replicas=True,
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.save_synonym(
              "indexName",
              "id1",
              SynonymHit.new(object_id: "id1", type: 'synonym', synonyms: ["car", "vehicule", "auto"]),
              true
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.saveSynonym(
              indexName = "indexName",
              objectID = "id1",
              synonymHit = SynonymHit(
                objectID = "id1",
                `type` = SynonymType.withName("synonym"),
                synonyms = Some(Seq("car", "vehicule", "auto"))
              ),
              forwardToReplicas = Some(true)
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.saveSynonym(
                indexName: "indexName",
                objectID: "id1",
                synonymHit: SynonymHit(objectID: "id1", type: SynonymType.synonym, synonyms: ["car", "vehicule", "auto"]),
                forwardToReplicas: true
            )
    delete:
      tags:
        - Synonyms
      operationId: deleteSynonym
      x-acl:
        - editSettings
      summary: Delete a synonym
      description: >
        Deletes a synonym by its ID.

        To find the object IDs of your synonyms, use the [`search`
        operation](#tag/Synonyms/operation/searchSynonyms).
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/parameters_ObjectID'
        - $ref: '#/components/parameters/ForwardToReplicas'
      responses:
        '200':
          $ref: '#/components/responses/DeletedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.DeleteSynonymAsync("indexName", "id1");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.deleteSynonym(
              indexName: "indexName",
              objectID: "id1",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.DeleteSynonym(client.NewApiDeleteSynonymRequest(
              "indexName", "id1",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.deleteSynonym("indexName", "id1");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.deleteSynonym({
              indexName: 'indexName',
              objectID: 'id1',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.deleteSynonym(
              indexName = "indexName",
              objectID = "id1",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->deleteSynonym(
                'indexName',
                'id1',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.delete_synonym(
                index_name="indexName",
                object_id="id1",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.delete_synonym("indexName", "id1")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.deleteSynonym(
              indexName = "indexName",
              objectID = "id1"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.deleteSynonym(indexName: "indexName", objectID:
            "id1")
  /1/indexes/{indexName}/synonyms/batch:
    post:
      tags:
        - Synonyms
      operationId: saveSynonyms
      x-acl:
        - editSettings
      summary: Create or replace synonyms
      description: |
        If a synonym with the `objectID` doesn't exist, Algolia adds a new one.
        Otherwise, existing synonyms are replaced.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ForwardToReplicas'
        - $ref: '#/components/parameters/ReplaceExistingSynonyms'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/synonymHits'
      responses:
        '200':
          $ref: '#/components/responses/UpdatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SaveSynonymsAsync(
              "indexName",
              new List<SynonymHit>
              {
                new SynonymHit
                {
                  ObjectID = "id1",
                  Type = Enum.Parse<SynonymType>("Synonym"),
                  Synonyms = new List<string> { "car", "vehicule", "auto" },
                },
                new SynonymHit
                {
                  ObjectID = "id2",
                  Type = Enum.Parse<SynonymType>("Onewaysynonym"),
                  Input = "iphone",
                  Synonyms = new List<string> { "ephone", "aphone", "yphone" },
                }
              },
              true,
              false
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.saveSynonyms(
              indexName: "indexName",
              synonymHit: [
                SynonymHit(
                  objectID: "id1",
                  type: SynonymType.fromJson("synonym"),
                  synonyms: [
                    "car",
                    "vehicule",
                    "auto",
                  ],
                ),
                SynonymHit(
                  objectID: "id2",
                  type: SynonymType.fromJson("onewaysynonym"),
                  input: "iphone",
                  synonyms: [
                    "ephone",
                    "aphone",
                    "yphone",
                  ],
                ),
              ],
              forwardToReplicas: true,
              replaceExistingSynonyms: false,
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.SaveSynonyms(client.NewApiSaveSynonymsRequest(
              "indexName",
              []search.SynonymHit{*search.NewEmptySynonymHit().SetObjectID("id1").SetType(search.SynonymType("synonym")).SetSynonyms(
                []string{"car", "vehicule", "auto"}), *search.NewEmptySynonymHit().SetObjectID("id2").SetType(search.SynonymType("onewaysynonym")).SetInput("iphone").SetSynonyms(
                []string{"ephone", "aphone", "yphone"})},
            ).WithForwardToReplicas(true).WithReplaceExistingSynonyms(false))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.saveSynonyms(
              "indexName",
              List.of(
                new SynonymHit().setObjectID("id1").setType(SynonymType.fromValue("synonym")).setSynonyms(List.of("car", "vehicule", "auto")),
                new SynonymHit()
                  .setObjectID("id2")
                  .setType(SynonymType.fromValue("onewaysynonym"))
                  .setInput("iphone")
                  .setSynonyms(List.of("ephone", "aphone", "yphone"))
              ),
              true,
              false
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.saveSynonyms({
              indexName: 'indexName',
              synonymHit: [
                {
                  objectID: 'id1',
                  type: 'synonym',
                  synonyms: ['car', 'vehicule', 'auto'],
                },
                {
                  objectID: 'id2',
                  type: 'onewaysynonym',
                  input: 'iphone',
                  synonyms: ['ephone', 'aphone', 'yphone'],
                },
              ],
              forwardToReplicas: true,
              replaceExistingSynonyms: false,
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.saveSynonyms(
              indexName = "indexName",
              synonymHit = listOf(
                SynonymHit(
                  objectID = "id1",
                  type = SynonymType.entries.first { it.value == "synonym" },
                  synonyms = listOf("car", "vehicule", "auto"),
                ),
                SynonymHit(
                  objectID = "id2",
                  type = SynonymType.entries.first { it.value == "onewaysynonym" },
                  input = "iphone",
                  synonyms = listOf("ephone", "aphone", "yphone"),
                ),
              ),
              forwardToReplicas = true,
              replaceExistingSynonyms = false,
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->saveSynonyms(
                'indexName',
                [
                    ['objectID' => 'id1',
                        'type' => 'synonym',
                        'synonyms' => [
                            'car',

                            'vehicule',

                            'auto',
                        ],
                    ],

                    ['objectID' => 'id2',
                        'type' => 'onewaysynonym',
                        'input' => 'iphone',
                        'synonyms' => [
                            'ephone',

                            'aphone',

                            'yphone',
                        ],
                    ],
                ],
                true,
                false,
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.save_synonyms(
                index_name="indexName",
                synonym_hit=[
                    {
                        "objectID": "id1",
                        "type": "synonym",
                        "synonyms": [
                            "car",
                            "vehicule",
                            "auto",
                        ],
                    },
                    {
                        "objectID": "id2",
                        "type": "onewaysynonym",
                        "input": "iphone",
                        "synonyms": [
                            "ephone",
                            "aphone",
                            "yphone",
                        ],
                    },
                ],
                forward_to_replicas=True,
                replace_existing_synonyms=False,
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.save_synonyms(
              "indexName",
              [SynonymHit.new(object_id: "id1", type: 'synonym', synonyms: ["car", "vehicule", "auto"]),
                SynonymHit.new(
                  object_id: "id2",
                  type: 'onewaysynonym',
                  input: "iphone",
                  synonyms: ["ephone", "aphone", "yphone"]
                )],
              true,
              false
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.saveSynonyms(
              indexName = "indexName",
              synonymHit = Seq(
                SynonymHit(
                  objectID = "id1",
                  `type` = SynonymType.withName("synonym"),
                  synonyms = Some(Seq("car", "vehicule", "auto"))
                ),
                SynonymHit(
                  objectID = "id2",
                  `type` = SynonymType.withName("onewaysynonym"),
                  input = Some("iphone"),
                  synonyms = Some(Seq("ephone", "aphone", "yphone"))
                )
              ),
              forwardToReplicas = Some(true),
              replaceExistingSynonyms = Some(false)
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.saveSynonyms(
                indexName: "indexName",
                synonymHit: [
                    SynonymHit(objectID: "id1", type: SynonymType.synonym, synonyms: ["car", "vehicule", "auto"]),
                    SynonymHit(
                        objectID: "id2",
                        type: SynonymType.onewaysynonym,
                        synonyms: ["ephone", "aphone", "yphone"],
                        input: "iphone"
                    ),
                ],
                forwardToReplicas: true,
                replaceExistingSynonyms: false
            )
  /1/indexes/{indexName}/synonyms/clear:
    post:
      tags:
        - Synonyms
      operationId: clearSynonyms
      x-acl:
        - editSettings
      summary: Delete all synonyms
      description: Deletes all synonyms from the index.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ForwardToReplicas'
      responses:
        '200':
          $ref: '#/components/responses/UpdatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.ClearSynonymsAsync("indexName");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.clearSynonyms(
              indexName: "indexName",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.ClearSynonyms(client.NewApiClearSynonymsRequest(
              "indexName",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.clearSynonyms("indexName");
        - lang: javascript
          label: JavaScript
          source: >
            // Initialize the client

            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');


            // Call the API

            const response = await client.clearSynonyms({ indexName: 'indexName'
            });


            // use typed response

            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.clearSynonyms(
              indexName = "indexName",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->clearSynonyms(
                'indexName',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.clear_synonyms(
                index_name="indexName",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.clear_synonyms("indexName")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.clearSynonyms(
              indexName = "indexName"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.clearSynonyms(indexName: "indexName")
  /1/indexes/{indexName}/synonyms/search:
    post:
      tags:
        - Synonyms
      operationId: searchSynonyms
      x-use-read-transporter: true
      x-cacheable: true
      x-acl:
        - settings
      summary: Search for synonyms
      description: Searches for synonyms in your index.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        description: Body of the `searchSynonyms` operation.
        content:
          application/json:
            schema:
              title: searchSynonymsParams
              type: object
              additionalProperties: false
              properties:
                query:
                  $ref: '#/components/schemas/query'
                type:
                  $ref: '#/components/schemas/SynonymType'
                page:
                  $ref: '#/components/schemas/page'
                hitsPerPage:
                  $ref: '#/components/schemas/hitsPerPage'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/searchSynonymsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SearchSynonymsAsync("indexName");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.searchSynonyms(
              indexName: "indexName",
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client

            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.SearchSynonyms(client.NewApiSearchSynonymsRequest(
              "indexName",
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.searchSynonyms("indexName");
        - lang: javascript
          label: JavaScript
          source: >
            // Initialize the client

            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');


            // Call the API

            const response = await client.searchSynonyms({ indexName:
            'indexName' });


            // use typed response

            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.searchSynonyms(
              indexName = "indexName",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->searchSynonyms(
                'indexName',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.search_synonyms(
                index_name="indexName",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.search_synonyms("indexName")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.searchSynonyms(
              indexName = "indexName"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.searchSynonyms(indexName: "indexName")
  /1/keys:
    get:
      tags:
        - Api Keys
      operationId: listApiKeys
      x-acl:
        - admin
      summary: List API keys
      description: >-
        Lists all API keys associated with your Algolia application, including
        their permissions and restrictions.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: listApiKeysResponse
                type: object
                additionalProperties: false
                required:
                  - keys
                properties:
                  keys:
                    type: array
                    description: API keys.
                    items:
                      $ref: '#/components/schemas/getApiKeyResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.ListApiKeysAsync();
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.listApiKeys();
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.ListApiKeys()
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.listApiKeys();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.listApiKeys();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.listApiKeys()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->listApiKeys();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.list_api_keys()

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.list_api_keys

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.listApiKeys(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.listApiKeys()
    post:
      tags:
        - Api Keys
      operationId: addApiKey
      x-acl:
        - admin
      summary: Create an API key
      description: Creates a new API key with specific permissions and restrictions.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiKey'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/addApiKeyResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.AddApiKeyAsync(
              new ApiKey
              {
                Acl = new List<Acl> { Enum.Parse<Acl>("Search"), Enum.Parse<Acl>("AddObject") },
                Description = "my new api key",
                Validity = 300,
                MaxQueriesPerIPPerHour = 100,
                MaxHitsPerQuery = 20,
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.addApiKey(
              apiKey: ApiKey(
                acl: [
                  Acl.fromJson("search"),
                  Acl.fromJson("addObject"),
                ],
                description: "my new api key",
                validity: 300,
                maxQueriesPerIPPerHour: 100,
                maxHitsPerQuery: 20,
              ),
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.AddApiKey(client.NewApiAddApiKeyRequest(

              search.NewEmptyApiKey().SetAcl(
                []search.Acl{search.Acl("search"), search.Acl("addObject")}).SetDescription("my new api key").SetValidity(300).SetMaxQueriesPerIPPerHour(100).SetMaxHitsPerQuery(20),
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.addApiKey(
              new ApiKey()
                .setAcl(List.of(Acl.fromValue("search"), Acl.fromValue("addObject")))
                .setDescription("my new api key")
                .setValidity(300)
                .setMaxQueriesPerIPPerHour(100)
                .setMaxHitsPerQuery(20)
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.addApiKey({
              acl: ['search', 'addObject'],
              description: 'my new api key',
              validity: 300,
              maxQueriesPerIPPerHour: 100,
              maxHitsPerQuery: 20,
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.addApiKey(
              apiKey = ApiKey(
                acl = listOf(Acl.entries.first { it.value == "search" }, Acl.entries.first { it.value == "addObject" }),
                description = "my new api key",
                validity = 300,
                maxQueriesPerIPPerHour = 100,
                maxHitsPerQuery = 20,
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->addApiKey(
                ['acl' => [
                    'search',

                    'addObject',
                ],
                    'description' => 'my new api key',
                    'validity' => 300,
                    'maxQueriesPerIPPerHour' => 100,
                    'maxHitsPerQuery' => 20,
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.add_api_key(
                api_key={
                    "acl": [
                        "search",
                        "addObject",
                    ],
                    "description": "my new api key",
                    "validity": 300,
                    "maxQueriesPerIPPerHour": 100,
                    "maxHitsPerQuery": 20,
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.add_api_key(
              ApiKey.new(
                acl: ['search', 'addObject'],
                description: "my new api key",
                validity: 300,
                max_queries_per_ip_per_hour: 100,
                max_hits_per_query: 20
              )
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.addApiKey(
              apiKey = ApiKey(
                acl = Seq(Acl.withName("search"), Acl.withName("addObject")),
                description = Some("my new api key"),
                validity = Some(300),
                maxQueriesPerIPPerHour = Some(100),
                maxHitsPerQuery = Some(20)
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.addApiKey(apiKey: ApiKey(
                acl: [Acl.search, Acl.addObject],
                description: "my new api key",
                maxHitsPerQuery: 20,
                maxQueriesPerIPPerHour: 100,
                validity: 300
            ))
  /1/keys/{key}:
    get:
      tags:
        - Api Keys
      operationId: getApiKey
      summary: Retrieve API key permissions
      description: >
        Gets the permissions and restrictions of an API key.


        When authenticating with the admin API key, you can request information
        for any of your application's keys.

        When authenticating with other API keys, you can only retrieve
        information for that key.
      parameters:
        - $ref: '#/components/parameters/KeyString'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getApiKeyResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetApiKeyAsync("myTestApiKey");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getApiKey(
              key: "myTestApiKey",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetApiKey(client.NewApiGetApiKeyRequest(
              "myTestApiKey",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getApiKey("myTestApiKey");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.getApiKey({ key: 'myTestApiKey' });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getApiKey(
              key = "myTestApiKey",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getApiKey(
                'myTestApiKey',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_api_key(
                key="myTestApiKey",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.get_api_key("myTestApiKey")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getApiKey(
              key = "myTestApiKey"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.getApiKey(key: "myTestApiKey")
    put:
      tags:
        - Api Keys
      operationId: updateApiKey
      x-acl:
        - admin
      summary: Update an API key
      description: |
        Replaces the permissions of an existing API key.

        Any unspecified attribute resets that attribute to its default value.
      parameters:
        - $ref: '#/components/parameters/KeyString'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiKey'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: updateApiKeyResponse
                type: object
                additionalProperties: false
                required:
                  - key
                  - updatedAt
                properties:
                  key:
                    $ref: '#/components/schemas/keyString'
                  updatedAt:
                    $ref: '#/components/schemas/updatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.UpdateApiKeyAsync(
              "myApiKey",
              new ApiKey
              {
                Acl = new List<Acl> { Enum.Parse<Acl>("Search"), Enum.Parse<Acl>("AddObject") },
                Validity = 300,
                MaxQueriesPerIPPerHour = 100,
                MaxHitsPerQuery = 20,
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.updateApiKey(
              key: "myApiKey",
              apiKey: ApiKey(
                acl: [
                  Acl.fromJson("search"),
                  Acl.fromJson("addObject"),
                ],
                validity: 300,
                maxQueriesPerIPPerHour: 100,
                maxHitsPerQuery: 20,
              ),
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.UpdateApiKey(client.NewApiUpdateApiKeyRequest(
              "myApiKey",
              search.NewEmptyApiKey().SetAcl(
                []search.Acl{search.Acl("search"), search.Acl("addObject")}).SetValidity(300).SetMaxQueriesPerIPPerHour(100).SetMaxHitsPerQuery(20),
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.updateApiKey(
              "myApiKey",
              new ApiKey()
                .setAcl(List.of(Acl.fromValue("search"), Acl.fromValue("addObject")))
                .setValidity(300)
                .setMaxQueriesPerIPPerHour(100)
                .setMaxHitsPerQuery(20)
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.updateApiKey({
              key: 'myApiKey',
              apiKey: {
                acl: ['search', 'addObject'],
                validity: 300,
                maxQueriesPerIPPerHour: 100,
                maxHitsPerQuery: 20,
              },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.updateApiKey(
              key = "myApiKey",
              apiKey = ApiKey(
                acl = listOf(Acl.entries.first { it.value == "search" }, Acl.entries.first { it.value == "addObject" }),
                validity = 300,
                maxQueriesPerIPPerHour = 100,
                maxHitsPerQuery = 20,
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->updateApiKey(
                'myApiKey',
                ['acl' => [
                    'search',

                    'addObject',
                ],
                    'validity' => 300,
                    'maxQueriesPerIPPerHour' => 100,
                    'maxHitsPerQuery' => 20,
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.update_api_key(
                key="myApiKey",
                api_key={
                    "acl": [
                        "search",
                        "addObject",
                    ],
                    "validity": 300,
                    "maxQueriesPerIPPerHour": 100,
                    "maxHitsPerQuery": 20,
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.update_api_key(
              "myApiKey",
              ApiKey.new(
                acl: ['search', 'addObject'],
                validity: 300,
                max_queries_per_ip_per_hour: 100,
                max_hits_per_query: 20
              )
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.updateApiKey(
              key = "myApiKey",
              apiKey = ApiKey(
                acl = Seq(Acl.withName("search"), Acl.withName("addObject")),
                validity = Some(300),
                maxQueriesPerIPPerHour = Some(100),
                maxHitsPerQuery = Some(20)
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.updateApiKey(
                key: "myApiKey",
                apiKey: ApiKey(
                    acl: [Acl.search, Acl.addObject],
                    maxHitsPerQuery: 20,
                    maxQueriesPerIPPerHour: 100,
                    validity: 300
                )
            )
    delete:
      tags:
        - Api Keys
      operationId: deleteApiKey
      x-acl:
        - admin
      summary: Delete an API key
      description: Deletes the API key.
      parameters:
        - $ref: '#/components/parameters/KeyString'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: deleteApiKeyResponse
                type: object
                additionalProperties: false
                required:
                  - deletedAt
                properties:
                  deletedAt:
                    $ref: '#/components/schemas/deletedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.DeleteApiKeyAsync("myTestApiKey");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.deleteApiKey(
              key: "myTestApiKey",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.DeleteApiKey(client.NewApiDeleteApiKeyRequest(
              "myTestApiKey",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.deleteApiKey("myTestApiKey");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.deleteApiKey({ key: 'myTestApiKey' });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.deleteApiKey(
              key = "myTestApiKey",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->deleteApiKey(
                'myTestApiKey',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.delete_api_key(
                key="myTestApiKey",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.delete_api_key("myTestApiKey")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.deleteApiKey(
              key = "myTestApiKey"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.deleteApiKey(key: "myTestApiKey")
  /1/keys/{key}/restore:
    post:
      tags:
        - Api Keys
      operationId: restoreApiKey
      x-acl:
        - admin
      summary: Restore an API key
      description: >
        Restores a deleted API key.


        Restoring resets the `validity` attribute to `0`.


        Algolia stores up to 1,000 API keys per application.

        If you create more, the oldest API keys are deleted and can't be
        restored.
      parameters:
        - $ref: '#/components/parameters/KeyString'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/addApiKeyResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.RestoreApiKeyAsync("myApiKey");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.restoreApiKey(
              key: "myApiKey",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.RestoreApiKey(client.NewApiRestoreApiKeyRequest(
              "myApiKey",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.restoreApiKey("myApiKey");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.restoreApiKey({ key: 'myApiKey' });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.restoreApiKey(
              key = "myApiKey",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->restoreApiKey(
                'myApiKey',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.restore_api_key(
                key="myApiKey",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.restore_api_key("myApiKey")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.restoreApiKey(
              key = "myApiKey"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.restoreApiKey(key: "myApiKey")
  /1/indexes/{indexName}/rules/{objectID}:
    get:
      tags:
        - Rules
      operationId: getRule
      x-acl:
        - settings
      summary: Retrieve a rule
      description: >
        Retrieves a rule by its ID.

        To find the object ID of rules, use the [`search`
        operation](#tag/Rules/operation/searchRules).
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectIDRule'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rule'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetRuleAsync("indexName", "id1");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getRule(
              indexName: "indexName",
              objectID: "id1",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetRule(client.NewApiGetRuleRequest(
              "indexName", "id1",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getRule("indexName", "id1");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.getRule({
              indexName: 'indexName',
              objectID: 'id1',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getRule(
              indexName = "indexName",
              objectID = "id1",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getRule(
                'indexName',
                'id1',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_rule(
                index_name="indexName",
                object_id="id1",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.get_rule("indexName", "id1")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getRule(
              indexName = "indexName",
              objectID = "id1"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.getRule(indexName: "indexName", objectID:
            "id1")
    put:
      tags:
        - Rules
      operationId: saveRule
      x-acl:
        - editSettings
      summary: Create or replace a rule
      description: >
        If a rule with the specified object ID doesn't exist, it's created.

        Otherwise, the existing rule is replaced.


        To create or update more than one rule, use the [`batch`
        operation](#tag/Rules/operation/saveRules).
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectIDRule'
        - $ref: '#/components/parameters/ForwardToReplicas'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/rule'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/updatedRuleResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SaveRuleAsync(
              "indexName",
              "id1",
              new Rule
              {
                ObjectID = "id1",
                Conditions = new List<Condition>
                {
                  new Condition { Pattern = "apple", Anchoring = Enum.Parse<Anchoring>("Contains"), }
                },
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.saveRule(
              indexName: "indexName",
              objectID: "id1",
              rule: Rule(
                objectID: "id1",
                conditions: [
                  Condition(
                    pattern: "apple",
                    anchoring: Anchoring.fromJson("contains"),
                  ),
                ],
              ),
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.SaveRule(client.NewApiSaveRuleRequest(
              "indexName", "id1",
              search.NewEmptyRule().SetObjectID("id1").SetConditions(
                []search.Condition{*search.NewEmptyCondition().SetPattern("apple").SetAnchoring(search.Anchoring("contains"))}),
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.saveRule(
              "indexName",
              "id1",
              new Rule()
                .setObjectID("id1")
                .setConditions(List.of(new Condition().setPattern("apple").setAnchoring(Anchoring.fromValue("contains"))))
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.saveRule({
              indexName: 'indexName',
              objectID: 'id1',
              rule: {
                objectID: 'id1',
                conditions: [{ pattern: 'apple', anchoring: 'contains' }],
              },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.saveRule(
              indexName = "indexName",
              objectID = "id1",
              rule = Rule(
                objectID = "id1",
                conditions = listOf(
                  Condition(
                    pattern = "apple",
                    anchoring = Anchoring.entries.first { it.value == "contains" },
                  ),
                ),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->saveRule(
                'indexName',
                'id1',
                ['objectID' => 'id1',
                    'conditions' => [
                        ['pattern' => 'apple',
                            'anchoring' => 'contains',
                        ],
                    ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.save_rule(
                index_name="indexName",
                object_id="id1",
                rule={
                    "objectID": "id1",
                    "conditions": [
                        {
                            "pattern": "apple",
                            "anchoring": "contains",
                        },
                    ],
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.save_rule(
              "indexName",
              "id1",
              Rule.new(
                object_id: "id1",
                conditions: [Condition.new(pattern: "apple", anchoring: 'contains')]
              )
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.saveRule(
              indexName = "indexName",
              objectID = "id1",
              rule = Rule(
                objectID = "id1",
                conditions = Some(
                  Seq(
                    Condition(
                      pattern = Some("apple"),
                      anchoring = Some(Anchoring.withName("contains"))
                    )
                  )
                )
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.saveRule(
                indexName: "indexName",
                objectID: "id1",
                rule: Rule(
                    objectID: "id1",
                    conditions: [SearchCondition(pattern: "apple", anchoring: SearchAnchoring.contains)]
                )
            )
    delete:
      tags:
        - Rules
      operationId: deleteRule
      x-acl:
        - editSettings
      summary: Delete a rule
      description: |
        Deletes a rule by its ID.
        To find the object ID for rules,
        use the [`search` operation](#tag/Rules/operation/searchRules).
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectIDRule'
        - $ref: '#/components/parameters/ForwardToReplicas'
      responses:
        '200':
          $ref: '#/components/responses/UpdatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.DeleteRuleAsync("indexName", "id1");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.deleteRule(
              indexName: "indexName",
              objectID: "id1",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.DeleteRule(client.NewApiDeleteRuleRequest(
              "indexName", "id1",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.deleteRule("indexName", "id1");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.deleteRule({
              indexName: 'indexName',
              objectID: 'id1',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.deleteRule(
              indexName = "indexName",
              objectID = "id1",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->deleteRule(
                'indexName',
                'id1',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.delete_rule(
                index_name="indexName",
                object_id="id1",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.delete_rule("indexName", "id1")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.deleteRule(
              indexName = "indexName",
              objectID = "id1"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.deleteRule(indexName: "indexName", objectID:
            "id1")
  /1/indexes/{indexName}/rules/batch:
    post:
      tags:
        - Rules
      operationId: saveRules
      x-acl:
        - editSettings
      summary: Create or update rules
      description: >
        Create or update multiple rules.


        If a rule with the specified object ID doesn't exist, Algolia creates a
        new one.

        Otherwise, existing rules are replaced.
      x-codegen-request-body-name: rules
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ForwardToReplicas'
        - $ref: '#/components/parameters/ClearExistingRules'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              description: Rules to add or replace.
              items:
                $ref: '#/components/schemas/rule'
      responses:
        '200':
          $ref: '#/components/responses/UpdatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SaveRulesAsync(
              "indexName",
              new List<Rule>
              {
                new Rule
                {
                  ObjectID = "a-rule-id",
                  Conditions = new List<Condition>
                  {
                    new Condition { Pattern = "smartphone", Anchoring = Enum.Parse<Anchoring>("Contains"), }
                  },
                },
                new Rule
                {
                  ObjectID = "a-second-rule-id",
                  Conditions = new List<Condition>
                  {
                    new Condition { Pattern = "apple", Anchoring = Enum.Parse<Anchoring>("Contains"), }
                  },
                }
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.saveRules(
              indexName: "indexName",
              rules: [
                Rule(
                  objectID: "a-rule-id",
                  conditions: [
                    Condition(
                      pattern: "smartphone",
                      anchoring: Anchoring.fromJson("contains"),
                    ),
                  ],
                ),
                Rule(
                  objectID: "a-second-rule-id",
                  conditions: [
                    Condition(
                      pattern: "apple",
                      anchoring: Anchoring.fromJson("contains"),
                    ),
                  ],
                ),
              ],
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.SaveRules(client.NewApiSaveRulesRequest(
              "indexName",
              []search.Rule{*search.NewEmptyRule().SetObjectID("a-rule-id").SetConditions(
                []search.Condition{*search.NewEmptyCondition().SetPattern("smartphone").SetAnchoring(search.Anchoring("contains"))}), *search.NewEmptyRule().SetObjectID("a-second-rule-id").SetConditions(
                []search.Condition{*search.NewEmptyCondition().SetPattern("apple").SetAnchoring(search.Anchoring("contains"))})},
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.saveRules(
              "indexName",
              List.of(
                new Rule()
                  .setObjectID("a-rule-id")
                  .setConditions(List.of(new Condition().setPattern("smartphone").setAnchoring(Anchoring.fromValue("contains")))),
                new Rule()
                  .setObjectID("a-second-rule-id")
                  .setConditions(List.of(new Condition().setPattern("apple").setAnchoring(Anchoring.fromValue("contains"))))
              )
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.saveRules({
              indexName: 'indexName',
              rules: [
                {
                  objectID: 'a-rule-id',
                  conditions: [{ pattern: 'smartphone', anchoring: 'contains' }],
                },
                {
                  objectID: 'a-second-rule-id',
                  conditions: [{ pattern: 'apple', anchoring: 'contains' }],
                },
              ],
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.saveRules(
              indexName = "indexName",
              rules = listOf(
                Rule(
                  objectID = "a-rule-id",
                  conditions = listOf(
                    Condition(
                      pattern = "smartphone",
                      anchoring = Anchoring.entries.first { it.value == "contains" },
                    ),
                  ),
                ),
                Rule(
                  objectID = "a-second-rule-id",
                  conditions = listOf(
                    Condition(
                      pattern = "apple",
                      anchoring = Anchoring.entries.first { it.value == "contains" },
                    ),
                  ),
                ),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->saveRules(
                'indexName',
                [
                    ['objectID' => 'a-rule-id',
                        'conditions' => [
                            ['pattern' => 'smartphone',
                                'anchoring' => 'contains',
                            ],
                        ],
                    ],

                    ['objectID' => 'a-second-rule-id',
                        'conditions' => [
                            ['pattern' => 'apple',
                                'anchoring' => 'contains',
                            ],
                        ],
                    ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.save_rules(
                index_name="indexName",
                rules=[
                    {
                        "objectID": "a-rule-id",
                        "conditions": [
                            {
                                "pattern": "smartphone",
                                "anchoring": "contains",
                            },
                        ],
                    },
                    {
                        "objectID": "a-second-rule-id",
                        "conditions": [
                            {
                                "pattern": "apple",
                                "anchoring": "contains",
                            },
                        ],
                    },
                ],
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.save_rules(
              "indexName",
              [
                Rule.new(
                  object_id: "a-rule-id",
                  conditions: [Condition.new(
                    pattern: "smartphone",
                    anchoring: 'contains'
                  )]
                ),
                Rule.new(
                  object_id: "a-second-rule-id",
                  conditions: [Condition.new(pattern: "apple", anchoring: 'contains')]
                )
              ]
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.saveRules(
              indexName = "indexName",
              rules = Seq(
                Rule(
                  objectID = "a-rule-id",
                  conditions = Some(
                    Seq(
                      Condition(
                        pattern = Some("smartphone"),
                        anchoring = Some(Anchoring.withName("contains"))
                      )
                    )
                  )
                ),
                Rule(
                  objectID = "a-second-rule-id",
                  conditions = Some(
                    Seq(
                      Condition(
                        pattern = Some("apple"),
                        anchoring = Some(Anchoring.withName("contains"))
                      )
                    )
                  )
                )
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.saveRules(
                indexName: "indexName",
                rules: [
                    Rule(
                        objectID: "a-rule-id",
                        conditions: [SearchCondition(pattern: "smartphone", anchoring: SearchAnchoring.contains)]
                    ),
                    Rule(
                        objectID: "a-second-rule-id",
                        conditions: [SearchCondition(pattern: "apple", anchoring: SearchAnchoring.contains)]
                    ),
                ]
            )
  /1/indexes/{indexName}/rules/clear:
    post:
      tags:
        - Rules
      operationId: clearRules
      x-acl:
        - editSettings
      summary: Delete all rules
      description: Deletes all rules from the index.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ForwardToReplicas'
      responses:
        '200':
          $ref: '#/components/responses/UpdatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.ClearRulesAsync("indexName");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.clearRules(
              indexName: "indexName",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.ClearRules(client.NewApiClearRulesRequest(
              "indexName",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.clearRules("indexName");
        - lang: javascript
          label: JavaScript
          source: >
            // Initialize the client

            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');


            // Call the API

            const response = await client.clearRules({ indexName: 'indexName'
            });


            // use typed response

            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.clearRules(
              indexName = "indexName",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->clearRules(
                'indexName',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.clear_rules(
                index_name="indexName",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.clear_rules("indexName")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.clearRules(
              indexName = "indexName"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.clearRules(indexName: "indexName")
  /1/indexes/{indexName}/rules/search:
    post:
      tags:
        - Rules
      operationId: searchRules
      x-use-read-transporter: true
      x-cacheable: true
      x-acl:
        - settings
      summary: Search for rules
      description: Searches for rules in your index.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              title: searchRulesParams
              description: Rules search parameters.
              additionalProperties: false
              properties:
                query:
                  $ref: '#/components/schemas/parameters_query'
                anchoring:
                  $ref: '#/components/schemas/anchoring'
                context:
                  type: string
                  description: Only return rules that match the context (exact match).
                  example: mobile
                page:
                  $ref: '#/components/schemas/parameters_page'
                hitsPerPage:
                  $ref: '#/components/schemas/parameters_hitsPerPage'
                enabled:
                  oneOf:
                    - type: boolean
                      description: |
                        If `true`, return only enabled rules.
                        If `false`, return only inactive rules.
                        By default, _all_ rules are returned.
                    - type: 'null'
                  default: null
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: searchRulesResponse
                type: object
                additionalProperties: false
                required:
                  - hits
                  - nbHits
                  - page
                  - nbPages
                properties:
                  hits:
                    type: array
                    description: Rules that matched the search criteria.
                    items:
                      $ref: '#/components/schemas/rule'
                  nbHits:
                    type: integer
                    description: Number of rules that matched the search criteria.
                  page:
                    type: integer
                    description: Current page.
                  nbPages:
                    type: integer
                    description: Number of pages.
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SearchRulesAsync(
              "indexName",
              new SearchRulesParams { Query = "something", }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.searchRules(
              indexName: "indexName",
              searchRulesParams: SearchRulesParams(
                query: "something",
              ),
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.SearchRules(client.NewApiSearchRulesRequest(
              "indexName",
            ).WithSearchRulesParams(
              search.NewEmptySearchRulesParams().SetQuery("something")))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.searchRules("indexName", new
            SearchRulesParams().setQuery("something"));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.searchRules({
              indexName: 'indexName',
              searchRulesParams: { query: 'something' },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.searchRules(
              indexName = "indexName",
              searchRulesParams = SearchRulesParams(
                query = "something",
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->searchRules(
                'indexName',
                ['query' => 'something',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.search_rules(
                index_name="indexName",
                search_rules_params={
                    "query": "something",
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')


            # Call the API

            resp = client.search_rules("indexName", SearchRulesParams.new(query:
            "something"))


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.searchRules(
              indexName = "indexName",
              searchRulesParams = Some(
                SearchRulesParams(
                  query = Some("something")
                )
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.searchRules(
                indexName: "indexName",
                searchRulesParams: SearchRulesParams(query: "something")
            )
  /1/dictionaries/{dictionaryName}/batch:
    post:
      tags:
        - Dictionaries
      operationId: batchDictionaryEntries
      x-acl:
        - editSettings
      description: >-
        Adds or deletes multiple entries from your plurals, segmentation, or
        stop word dictionaries.
      summary: Add or delete dictionary entries
      parameters:
        - $ref: '#/components/parameters/DictionaryName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: batchDictionaryEntriesParams
              description: Request body for updating dictionary entries.
              type: object
              required:
                - requests
              additionalProperties: false
              properties:
                clearExistingDictionaryEntries:
                  type: boolean
                  default: false
                  description: >-
                    Whether to replace all custom entries in the dictionary with
                    the ones sent with this request.
                requests:
                  type: array
                  description: List of additions and deletions to your dictionaries.
                  items:
                    title: batchDictionaryEntriesRequest
                    type: object
                    additionalProperties: false
                    required:
                      - action
                      - body
                    properties:
                      action:
                        $ref: '#/components/schemas/dictionaryAction'
                      body:
                        $ref: '#/components/schemas/dictionaryEntry'
      responses:
        '200':
          $ref: '#/components/responses/UpdatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.BatchDictionaryEntriesAsync(
              Enum.Parse<DictionaryType>("Compounds"),
              new BatchDictionaryEntriesParams
              {
                Requests = new List<BatchDictionaryEntriesRequest>
                {
                  new BatchDictionaryEntriesRequest
                  {
                    Action = Enum.Parse<DictionaryAction>("AddEntry"),
                    Body = new DictionaryEntry
                    {
                      ObjectID = "1",
                      Language = Enum.Parse<SupportedLanguage>("En"),
                    },
                  },
                  new BatchDictionaryEntriesRequest
                  {
                    Action = Enum.Parse<DictionaryAction>("DeleteEntry"),
                    Body = new DictionaryEntry
                    {
                      ObjectID = "2",
                      Language = Enum.Parse<SupportedLanguage>("Fr"),
                    },
                  }
                },
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.batchDictionaryEntries(
              dictionaryName: DictionaryType.fromJson("compounds"),
              batchDictionaryEntriesParams: BatchDictionaryEntriesParams(
                requests: [
                  BatchDictionaryEntriesRequest(
                    action: DictionaryAction.fromJson("addEntry"),
                    body: DictionaryEntry(
                      objectID: "1",
                      language: SupportedLanguage.fromJson("en"),
                    ),
                  ),
                  BatchDictionaryEntriesRequest(
                    action: DictionaryAction.fromJson("deleteEntry"),
                    body: DictionaryEntry(
                      objectID: "2",
                      language: SupportedLanguage.fromJson("fr"),
                    ),
                  ),
                ],
              ),
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client

            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.BatchDictionaryEntries(client.NewApiBatchDictionaryEntriesRequest(
              search.DictionaryType("compounds"),
              search.NewEmptyBatchDictionaryEntriesParams().SetRequests(
                []search.BatchDictionaryEntriesRequest{*search.NewEmptyBatchDictionaryEntriesRequest().SetAction(search.DictionaryAction("addEntry")).SetBody(
                  search.NewEmptyDictionaryEntry().SetObjectID("1").SetLanguage(search.SupportedLanguage("en"))), *search.NewEmptyBatchDictionaryEntriesRequest().SetAction(search.DictionaryAction("deleteEntry")).SetBody(
                  search.NewEmptyDictionaryEntry().SetObjectID("2").SetLanguage(search.SupportedLanguage("fr")))}),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.batchDictionaryEntries(
              DictionaryType.fromValue("compounds"),
              new BatchDictionaryEntriesParams()
                .setRequests(
                  List.of(
                    new BatchDictionaryEntriesRequest()
                      .setAction(DictionaryAction.fromValue("addEntry"))
                      .setBody(new DictionaryEntry().setObjectID("1").setLanguage(SupportedLanguage.fromValue("en"))),
                    new BatchDictionaryEntriesRequest()
                      .setAction(DictionaryAction.fromValue("deleteEntry"))
                      .setBody(new DictionaryEntry().setObjectID("2").setLanguage(SupportedLanguage.fromValue("fr")))
                  )
                )
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.batchDictionaryEntries({
              dictionaryName: 'compounds',
              batchDictionaryEntriesParams: {
                requests: [
                  { action: 'addEntry', body: { objectID: '1', language: 'en' } },
                  { action: 'deleteEntry', body: { objectID: '2', language: 'fr' } },
                ],
              },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.batchDictionaryEntries(
              dictionaryName = DictionaryType.entries.first { it.value == "compounds" },
              batchDictionaryEntriesParams = BatchDictionaryEntriesParams(
                requests = listOf(
                  BatchDictionaryEntriesRequest(
                    action = DictionaryAction.entries.first { it.value == "addEntry" },
                    body = DictionaryEntry(
                      objectID = "1",
                      language = SupportedLanguage.entries.first { it.value == "en" },
                    ),
                  ),
                  BatchDictionaryEntriesRequest(
                    action = DictionaryAction.entries.first { it.value == "deleteEntry" },
                    body = DictionaryEntry(
                      objectID = "2",
                      language = SupportedLanguage.entries.first { it.value == "fr" },
                    ),
                  ),
                ),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->batchDictionaryEntries(
                'compounds',
                ['requests' => [
                    ['action' => 'addEntry',
                        'body' => ['objectID' => '1',
                            'language' => 'en',
                        ],
                    ],

                    ['action' => 'deleteEntry',
                        'body' => ['objectID' => '2',
                            'language' => 'fr',
                        ],
                    ],
                ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.batch_dictionary_entries(
                dictionary_name="compounds",
                batch_dictionary_entries_params={
                    "requests": [
                        {
                            "action": "addEntry",
                            "body": {
                                "objectID": "1",
                                "language": "en",
                            },
                        },
                        {
                            "action": "deleteEntry",
                            "body": {
                                "objectID": "2",
                                "language": "fr",
                            },
                        },
                    ],
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.batch_dictionary_entries(
              'compounds',
              BatchDictionaryEntriesParams.new(
                requests: [
                  BatchDictionaryEntriesRequest.new(
                    action: 'addEntry',
                    body: DictionaryEntry.new(
                      object_id: "1",
                      language: 'en'
                    )
                  ),
                  BatchDictionaryEntriesRequest.new(
                    action: 'deleteEntry',
                    body: DictionaryEntry.new(object_id: "2", language: 'fr')
                  )
                ]
              )
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.batchDictionaryEntries(
              dictionaryName = DictionaryType.withName("compounds"),
              batchDictionaryEntriesParams = BatchDictionaryEntriesParams(
                requests = Seq(
                  BatchDictionaryEntriesRequest(
                    action = DictionaryAction.withName("addEntry"),
                    body = DictionaryEntry(
                      objectID = "1",
                      language = SupportedLanguage.withName("en")
                    )
                  ),
                  BatchDictionaryEntriesRequest(
                    action = DictionaryAction.withName("deleteEntry"),
                    body = DictionaryEntry(
                      objectID = "2",
                      language = SupportedLanguage.withName("fr")
                    )
                  )
                )
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.batchDictionaryEntries(
                dictionaryName: DictionaryType.compounds,
                batchDictionaryEntriesParams: BatchDictionaryEntriesParams(requests: [
                    BatchDictionaryEntriesRequest(action: DictionaryAction.addEntry, body: DictionaryEntry(
                        objectID: "1",
                        language: SearchSupportedLanguage.en
                    )),
                    BatchDictionaryEntriesRequest(
                        action: DictionaryAction.deleteEntry,
                        body: DictionaryEntry(objectID: "2", language: SearchSupportedLanguage.fr)
                    ),
                ])
            )
  /1/dictionaries/{dictionaryName}/search:
    post:
      tags:
        - Dictionaries
      operationId: searchDictionaryEntries
      x-use-read-transporter: true
      x-cacheable: true
      x-acl:
        - settings
      description: Searches for standard and custom dictionary entries.
      summary: Search dictionary entries
      parameters:
        - $ref: '#/components/parameters/DictionaryName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: searchDictionaryEntriesParams
              description: Search parameter.
              type: object
              required:
                - query
              additionalProperties: false
              properties:
                query:
                  $ref: '#/components/schemas/query'
                page:
                  $ref: '#/components/schemas/page'
                hitsPerPage:
                  $ref: '#/components/schemas/hitsPerPage'
                language:
                  $ref: '#/components/schemas/supportedLanguage'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/searchDictionaryEntriesResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SearchDictionaryEntriesAsync(
              Enum.Parse<DictionaryType>("Stopwords"),
              new SearchDictionaryEntriesParams { Query = "about", }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.searchDictionaryEntries(
              dictionaryName: DictionaryType.fromJson("stopwords"),
              searchDictionaryEntriesParams: SearchDictionaryEntriesParams(
                query: "about",
              ),
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client

            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.SearchDictionaryEntries(client.NewApiSearchDictionaryEntriesRequest(
              search.DictionaryType("stopwords"),
              search.NewEmptySearchDictionaryEntriesParams().SetQuery("about"),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.searchDictionaryEntries(DictionaryType.fromValue("stopwords"),
            new SearchDictionaryEntriesParams().setQuery("about"));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.searchDictionaryEntries({
              dictionaryName: 'stopwords',
              searchDictionaryEntriesParams: { query: 'about' },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.searchDictionaryEntries(
              dictionaryName = DictionaryType.entries.first { it.value == "stopwords" },
              searchDictionaryEntriesParams = SearchDictionaryEntriesParams(
                query = "about",
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->searchDictionaryEntries(
                'stopwords',
                ['query' => 'about',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.search_dictionary_entries(
                dictionary_name="stopwords",
                search_dictionary_entries_params={
                    "query": "about",
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.search_dictionary_entries(
              'stopwords',
              SearchDictionaryEntriesParams.new(query: "about")
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.searchDictionaryEntries(
              dictionaryName = DictionaryType.withName("stopwords"),
              searchDictionaryEntriesParams = SearchDictionaryEntriesParams(
                query = "about"
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.searchDictionaryEntries(
                dictionaryName: DictionaryType.stopwords,
                searchDictionaryEntriesParams: SearchDictionaryEntriesParams(query: "about")
            )
  /1/dictionaries/*/settings:
    get:
      tags:
        - Dictionaries
      operationId: getDictionarySettings
      x-acl:
        - settings
      summary: Retrieve dictionary settings
      description: >-
        Retrieves the languages for which standard dictionary entries are turned
        off.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: getDictionarySettingsResponse
                additionalProperties: false
                type: object
                required:
                  - disableStandardEntries
                properties:
                  disableStandardEntries:
                    $ref: '#/components/schemas/standardEntries'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetDictionarySettingsAsync();
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getDictionarySettings();
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetDictionarySettings()
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getDictionarySettings();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.getDictionarySettings();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getDictionarySettings()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getDictionarySettings();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_dictionary_settings()

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.get_dictionary_settings

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getDictionarySettings(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.getDictionarySettings()
    put:
      tags:
        - Dictionaries
      operationId: setDictionarySettings
      x-acl:
        - editSettings
      description: >-
        Turns standard stop word dictionary entries on or off for a given
        language.
      summary: Update dictionary settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: dictionarySettingsParams
              type: object
              additionalProperties: false
              description: >
                Turn on or off the built-in Algolia stop words for a specific
                language.
              required:
                - disableStandardEntries
              properties:
                disableStandardEntries:
                  $ref: '#/components/schemas/standardEntries'
      responses:
        '200':
          $ref: '#/components/responses/UpdatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SetDictionarySettingsAsync(
              new DictionarySettingsParams
              {
                DisableStandardEntries = new StandardEntries
                {
                  Plurals = new Dictionary<string, Boolean>
                  {
                    { "fr", false },
                    { "en", false },
                    { "ru", true }
                  },
                },
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.setDictionarySettings(
              dictionarySettingsParams: DictionarySettingsParams(
                disableStandardEntries: StandardEntries(
                  plurals: {
                    'fr': false,
                    'en': false,
                    'ru': true,
                  },
                ),
              ),
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client

            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.SetDictionarySettings(client.NewApiSetDictionarySettingsRequest(

              search.NewEmptyDictionarySettingsParams().SetDisableStandardEntries(
                search.NewEmptyStandardEntries().SetPlurals(map[string]bool{"fr": false, "en": false, "ru": true})),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.setDictionarySettings(
              new DictionarySettingsParams()
                .setDisableStandardEntries(new StandardEntries().setPlurals(Map.of("fr", false, "en", false, "ru", true)))
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.setDictionarySettings({
              disableStandardEntries: { plurals: { fr: false, en: false, ru: true } },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.setDictionarySettings(
              dictionarySettingsParams = DictionarySettingsParams(
                disableStandardEntries = StandardEntries(
                  plurals = mapOf("fr" to false, "en" to false, "ru" to true),
                ),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->setDictionarySettings(
                ['disableStandardEntries' => ['plurals' => ['fr' => false,
                    'en' => false,
                    'ru' => true,
                ],
                ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.set_dictionary_settings(
                dictionary_settings_params={
                    "disableStandardEntries": {
                        "plurals": {
                            "fr": False,
                            "en": False,
                            "ru": True,
                        },
                    },
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.set_dictionary_settings(
              DictionarySettingsParams.new(
                disable_standard_entries: StandardEntries.new(
                  plurals: {
                    fr: false, en: false, ru: true
                  }
                )
              )
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.setDictionarySettings(
              dictionarySettingsParams = DictionarySettingsParams(
                disableStandardEntries = StandardEntries(
                  plurals = Some(Map("fr" -> false, "en" -> false, "ru" -> true))
                )
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client
                .setDictionarySettings(
                    dictionarySettingsParams: DictionarySettingsParams(disableStandardEntries: StandardEntries(plurals: [
                        "fr": false,
                        "en": false,
                        "ru": true,
                    ]))
                )
  /1/dictionaries/*/languages:
    get:
      tags:
        - Dictionaries
      operationId: getDictionaryLanguages
      x-acl:
        - settings
      description: >
        Lists supported languages with their supported dictionary types and
        number of custom entries.
      summary: List available languages
      externalDocs:
        url: >-
          https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/
        description: Supported languages.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: getDictionaryLanguagesResponse
                type: object
                additionalProperties:
                  x-additionalPropertiesName: language
                  $ref: '#/components/schemas/languages'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetDictionaryLanguagesAsync();
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getDictionaryLanguages();
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetDictionaryLanguages()
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getDictionaryLanguages();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.getDictionaryLanguages();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getDictionaryLanguages()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getDictionaryLanguages();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_dictionary_languages()

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.get_dictionary_languages

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getDictionaryLanguages(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.getDictionaryLanguages()
  /1/clusters/mapping:
    post:
      tags:
        - Clusters
      operationId: assignUserId
      x-acl:
        - admin
      summary: Assign or move a user ID
      description: >
        Assigns or moves a user ID to a cluster.


        The time it takes to move a user is proportional to the amount of data
        linked to the user ID.
      parameters:
        - $ref: '#/components/parameters/UserIDInHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: assignUserIdParams
              type: object
              description: Assign userID parameters.
              additionalProperties: false
              properties:
                cluster:
                  $ref: '#/components/schemas/clusterName'
              required:
                - cluster
      responses:
        '200':
          $ref: '#/components/responses/CreatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.AssignUserIdAsync(
              "userID",
              new AssignUserIdParams { Cluster = "theCluster", }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.assignUserId(
              xAlgoliaUserID: "userID",
              assignUserIdParams: AssignUserIdParams(
                cluster: "theCluster",
              ),
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.AssignUserId(client.NewApiAssignUserIdRequest(
              "userID",
              search.NewEmptyAssignUserIdParams().SetCluster("theCluster"),
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.assignUserId("userID", new
            AssignUserIdParams().setCluster("theCluster"));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.assignUserId({
              xAlgoliaUserID: 'userID',
              assignUserIdParams: { cluster: 'theCluster' },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.assignUserId(
              xAlgoliaUserID = "userID",
              assignUserIdParams = AssignUserIdParams(
                cluster = "theCluster",
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->assignUserId(
                'userID',
                ['cluster' => 'theCluster',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.assign_user_id(
                x_algolia_user_id="userID",
                assign_user_id_params={
                    "cluster": "theCluster",
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: >
            # Initialize the client

            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')


            # Call the API

            resp = client.assign_user_id("userID",
            AssignUserIdParams.new(cluster: "theCluster"))


            # use the class directly

            puts resp


            # print the JSON response

            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.assignUserId(
              xAlgoliaUserID = "userID",
              assignUserIdParams = AssignUserIdParams(
                cluster = "theCluster"
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.assignUserId(
                xAlgoliaUserID: "userID",
                assignUserIdParams: AssignUserIdParams(cluster: "theCluster")
            )
    get:
      tags:
        - Clusters
      operationId: listUserIds
      x-acl:
        - admin
      summary: List user IDs
      description: >
        Lists the userIDs assigned to a multi-cluster application.


        Since it can take a few seconds to get the data from the different
        clusters,

        the response isn't real-time.
      parameters:
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/HitsPerPage'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: listUserIdsResponse
                type: object
                description: User ID data.
                properties:
                  userIDs:
                    type: array
                    description: User IDs.
                    items:
                      $ref: '#/components/schemas/userId'
                required:
                  - userIDs
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.ListUserIdsAsync();
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.listUserIds();
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.ListUserIds(client.NewApiListUserIdsRequest())
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.listUserIds();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.listUserIds();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.listUserIds()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->listUserIds();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.list_user_ids()

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.list_user_ids

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.listUserIds(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.listUserIds()
  /1/clusters/mapping/batch:
    post:
      tags:
        - Clusters
      operationId: batchAssignUserIds
      x-acl:
        - admin
      summary: Assign multiple userIDs
      description: |
        Assigns multiple user IDs to a cluster.

        **You can't move users with this operation**.
      parameters:
        - $ref: '#/components/parameters/UserIDInHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: batchAssignUserIdsParams
              type: object
              description: Assign userID parameters.
              additionalProperties: false
              properties:
                cluster:
                  $ref: '#/components/schemas/clusterName'
                users:
                  type: array
                  description: User IDs to assign.
                  example:
                    - einstein
                    - bohr
                    - feynman
                  items:
                    type: string
              required:
                - cluster
                - users
      responses:
        '200':
          $ref: '#/components/responses/CreatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.BatchAssignUserIdsAsync(
              "userID",
              new BatchAssignUserIdsParams
              {
                Cluster = "theCluster",
                Users = new List<string> { "user1", "user2" },
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.batchAssignUserIds(
              xAlgoliaUserID: "userID",
              batchAssignUserIdsParams: BatchAssignUserIdsParams(
                cluster: "theCluster",
                users: [
                  "user1",
                  "user2",
                ],
              ),
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client

            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.BatchAssignUserIds(client.NewApiBatchAssignUserIdsRequest(
              "userID",
              search.NewEmptyBatchAssignUserIdsParams().SetCluster("theCluster").SetUsers(
                []string{"user1", "user2"}),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.batchAssignUserIds("userID", new
            BatchAssignUserIdsParams().setCluster("theCluster").setUsers(List.of("user1",
            "user2")));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.batchAssignUserIds({
              xAlgoliaUserID: 'userID',
              batchAssignUserIdsParams: {
                cluster: 'theCluster',
                users: ['user1', 'user2'],
              },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.batchAssignUserIds(
              xAlgoliaUserID = "userID",
              batchAssignUserIdsParams = BatchAssignUserIdsParams(
                cluster = "theCluster",
                users = listOf("user1", "user2"),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->batchAssignUserIds(
                'userID',
                ['cluster' => 'theCluster',
                    'users' => [
                        'user1',

                        'user2',
                    ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.batch_assign_user_ids(
                x_algolia_user_id="userID",
                batch_assign_user_ids_params={
                    "cluster": "theCluster",
                    "users": [
                        "user1",
                        "user2",
                    ],
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.batch_assign_user_ids(
              "userID",
              BatchAssignUserIdsParams.new(cluster: "theCluster", users: ["user1", "user2"])
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.batchAssignUserIds(
              xAlgoliaUserID = "userID",
              batchAssignUserIdsParams = BatchAssignUserIdsParams(
                cluster = "theCluster",
                users = Seq("user1", "user2")
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.batchAssignUserIds(
                xAlgoliaUserID: "userID",
                batchAssignUserIdsParams: BatchAssignUserIdsParams(cluster: "theCluster", users: ["user1", "user2"])
            )
  /1/clusters/mapping/top:
    get:
      tags:
        - Clusters
      operationId: getTopUserIds
      x-acl:
        - admin
      summary: Get top user IDs
      description: >
        Get the IDs of the 10 users with the highest number of records per
        cluster.


        Since it can take a few seconds to get the data from the different
        clusters,

        the response isn't real-time.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: getTopUserIdsResponse
                type: object
                description: User IDs and clusters.
                properties:
                  topUsers:
                    type: array
                    description: >-
                      Key-value pairs with cluster names as keys and lists of
                      users with the highest number of records per cluster as
                      values.
                    items:
                      type: object
                      additionalProperties:
                        x-additionalPropertiesName: cluster
                        type: array
                        items:
                          $ref: '#/components/schemas/userId'
                required:
                  - topUsers
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetTopUserIdsAsync();
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getTopUserIds();
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetTopUserIds()
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getTopUserIds();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.getTopUserIds();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getTopUserIds()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getTopUserIds();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_top_user_ids()

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.get_top_user_ids

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getTopUserIds(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.getTopUserIds()
  /1/clusters/mapping/{userID}:
    get:
      tags:
        - Clusters
      operationId: getUserId
      x-acl:
        - admin
      summary: Retrieve user ID
      description: >
        Returns the user ID data stored in the mapping.


        Since it can take a few seconds to get the data from the different
        clusters,

        the response isn't real-time.
      parameters:
        - $ref: '#/components/parameters/UserIDInPath'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/userId'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetUserIdAsync("uniqueID");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getUserId(
              userID: "uniqueID",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetUserId(client.NewApiGetUserIdRequest(
              "uniqueID",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getUserId("uniqueID");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.getUserId({ userID: 'uniqueID' });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getUserId(
              userID = "uniqueID",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getUserId(
                'uniqueID',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_user_id(
                user_id="uniqueID",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.get_user_id("uniqueID")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getUserId(
              userID = "uniqueID"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.getUserId(userID: "uniqueID")
    delete:
      tags:
        - Clusters
      operationId: removeUserId
      x-acl:
        - admin
      summary: Delete user ID
      description: Deletes a user ID and its associated data from the clusters.
      parameters:
        - $ref: '#/components/parameters/UserIDInPath'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: removeUserIdResponse
                type: object
                additionalProperties: false
                properties:
                  deletedAt:
                    $ref: '#/components/schemas/deletedAt'
                required:
                  - deletedAt
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.RemoveUserIdAsync("uniqueID");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.removeUserId(
              userID: "uniqueID",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.RemoveUserId(client.NewApiRemoveUserIdRequest(
              "uniqueID",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.removeUserId("uniqueID");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.removeUserId({ userID: 'uniqueID' });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.removeUserId(
              userID = "uniqueID",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->removeUserId(
                'uniqueID',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.remove_user_id(
                user_id="uniqueID",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.remove_user_id("uniqueID")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.removeUserId(
              userID = "uniqueID"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.removeUserId(userID: "uniqueID")
  /1/clusters:
    get:
      tags:
        - Clusters
      operationId: listClusters
      x-acl:
        - admin
      summary: List clusters
      description: Lists the available clusters in a multi-cluster setup.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: listClustersResponse
                type: object
                description: Clusters.
                properties:
                  topUsers:
                    type: array
                    description: >-
                      Key-value pairs with cluster names as keys and lists of
                      users with the highest number of records per cluster as
                      values.
                    items:
                      $ref: '#/components/schemas/clusterName'
                required:
                  - topUsers
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.ListClustersAsync();
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.listClusters();
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.ListClusters()
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.listClusters();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.listClusters();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.listClusters()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->listClusters();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.list_clusters()

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.list_clusters

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.listClusters(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.listClusters()
  /1/clusters/mapping/search:
    post:
      tags:
        - Clusters
      operationId: searchUserIds
      x-use-read-transporter: true
      x-cacheable: true
      x-acl:
        - admin
      summary: Search for user IDs
      description: >
        Since it can take a few seconds to get the data from the different
        clusters,

        the response isn't real-time.


        To ensure rapid updates, the user IDs index isn't built at the same time
        as the mapping. Instead, it's built every 12 hours, at the same time as
        the update of user ID usage. For example, if you add or move a user ID,
        the search will show an old value until the next time the mapping is
        rebuilt (every 12 hours).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: searchUserIdsParams
              type: object
              description: OK
              additionalProperties: false
              properties:
                query:
                  type: string
                  description: >-
                    Query to search. The search is a prefix search with [typo
                    tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/)
                    enabled. An empty query will retrieve all users.
                clusterName:
                  $ref: '#/components/schemas/clusterName'
                page:
                  $ref: '#/components/schemas/page'
                hitsPerPage:
                  $ref: '#/components/schemas/hitsPerPage'
              required:
                - query
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: searchUserIdsResponse
                type: object
                description: userIDs data.
                properties:
                  hits:
                    type: array
                    description: User objects that match the query.
                    items:
                      title: userHit
                      type: object
                      properties:
                        userID:
                          $ref: '#/components/schemas/userID'
                        clusterName:
                          $ref: '#/components/schemas/clusterName'
                        nbRecords:
                          $ref: '#/components/schemas/nbRecords'
                        dataSize:
                          $ref: '#/components/schemas/dataSize'
                        objectID:
                          type: string
                          description: userID of the requested user. Same as userID.
                        _highlightResult:
                          title: userHighlightResult
                          type: object
                          properties:
                            userID:
                              $ref: '#/components/schemas/highlightResult'
                            clusterName:
                              $ref: '#/components/schemas/highlightResult'
                          required:
                            - userID
                            - clusterName
                      required:
                        - userID
                        - clusterName
                        - nbRecords
                        - dataSize
                        - objectID
                        - _highlightResult
                  nbHits:
                    $ref: '#/components/schemas/nbHits'
                  page:
                    $ref: '#/components/schemas/page'
                  hitsPerPage:
                    $ref: '#/components/schemas/parameters_hitsPerPage'
                  updatedAt:
                    $ref: '#/components/schemas/updatedAt'
                required:
                  - hits
                  - nbHits
                  - page
                  - hitsPerPage
                  - updatedAt
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.SearchUserIdsAsync(
              new SearchUserIdsParams
              {
                Query = "test",
                ClusterName = "theClusterName",
                Page = 5,
                HitsPerPage = 10,
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.searchUserIds(
              searchUserIdsParams: SearchUserIdsParams(
                query: "test",
                clusterName: "theClusterName",
                page: 5,
                hitsPerPage: 10,
              ),
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.SearchUserIds(client.NewApiSearchUserIdsRequest(

              search.NewEmptySearchUserIdsParams().SetQuery("test").SetClusterName("theClusterName").SetPage(5).SetHitsPerPage(10),
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.searchUserIds(new
            SearchUserIdsParams().setQuery("test").setClusterName("theClusterName").setPage(5).setHitsPerPage(10));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.searchUserIds({
              query: 'test',
              clusterName: 'theClusterName',
              page: 5,
              hitsPerPage: 10,
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.searchUserIds(
              searchUserIdsParams = SearchUserIdsParams(
                query = "test",
                clusterName = "theClusterName",
                page = 5,
                hitsPerPage = 10,
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->searchUserIds(
                ['query' => 'test',
                    'clusterName' => 'theClusterName',
                    'page' => 5,
                    'hitsPerPage' => 10,
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.search_user_ids(
                search_user_ids_params={
                    "query": "test",
                    "clusterName": "theClusterName",
                    "page": 5,
                    "hitsPerPage": 10,
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.search_user_ids(
              SearchUserIdsParams.new(
                query: "test",
                cluster_name: "theClusterName",
                page: 5,
                hits_per_page: 10
              )
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.searchUserIds(
              searchUserIdsParams = SearchUserIdsParams(
                query = "test",
                clusterName = Some("theClusterName"),
                page = Some(5),
                hitsPerPage = Some(10)
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.searchUserIds(searchUserIdsParams:
            SearchUserIdsParams(
                query: "test",
                clusterName: "theClusterName",
                page: 5,
                hitsPerPage: 10
            ))
  /1/clusters/mapping/pending:
    get:
      tags:
        - Clusters
      operationId: hasPendingMappings
      x-acl:
        - admin
      summary: Get migration and user mapping status
      description: >
        To determine when the time-consuming process of creating a large batch
        of users or migrating users from one cluster to another is complete,
        this operation retrieves the status of the process.
      parameters:
        - in: query
          name: getClusters
          description: >-
            Whether to include the cluster's pending mapping state in the
            response.
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: hasPendingMappingsResponse
                type: object
                additionalProperties: false
                properties:
                  pending:
                    description: >-
                      Whether there are clusters undergoing migration, creation,
                      or deletion.
                    type: boolean
                  clusters:
                    description: >
                      Cluster pending mapping state: migrating, creating,
                      deleting.
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                required:
                  - pending
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.HasPendingMappingsAsync();
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.hasPendingMappings();
        - lang: go
          label: Go
          source: >
            // Initialize the client

            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.HasPendingMappings(client.NewApiHasPendingMappingsRequest())

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.hasPendingMappings();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.hasPendingMappings();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.hasPendingMappings()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->hasPendingMappings();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.has_pending_mappings()

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.has_pending_mappings

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.hasPendingMappings(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.hasPendingMappings()
  /1/security/sources:
    get:
      tags:
        - Vaults
      operationId: getSources
      x-acl:
        - admin
      summary: List allowed sources
      description: Retrieves all allowed IP addresses with access to your application.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sources'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetSourcesAsync();
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getSources();
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetSources()
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getSources();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.getSources();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getSources()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getSources();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_sources()

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.get_sources

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getSources(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.getSources()
    put:
      tags:
        - Vaults
      operationId: replaceSources
      x-acl:
        - admin
      summary: Replace allowed sources
      description: Replaces the list of allowed sources.
      requestBody:
        required: true
        description: Allowed sources.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/sources'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: replaceSourceResponse
                type: object
                additionalProperties: false
                required:
                  - updatedAt
                properties:
                  updatedAt:
                    $ref: '#/components/schemas/updatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.ReplaceSourcesAsync(
              new List<Source>
              {
                new Source { VarSource = "theSource", Description = "theDescription", }
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.replaceSources(
              source: [
                Source(
                  source: "theSource",
                  description: "theDescription",
                ),
              ],
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client

            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.ReplaceSources(client.NewApiReplaceSourcesRequest(

              []search.Source{*search.NewEmptySource().SetSource("theSource").SetDescription("theDescription")},
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.replaceSources(List.of(new
            Source().setSource("theSource").setDescription("theDescription")));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.replaceSources({
              source: [{ source: 'theSource', description: 'theDescription' }],
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.replaceSources(
              source = listOf(
                Source(
                  source = "theSource",
                  description = "theDescription",
                ),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->replaceSources(
                [
                    ['source' => 'theSource',
                        'description' => 'theDescription',
                    ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.replace_sources(
                source=[
                    {
                        "source": "theSource",
                        "description": "theDescription",
                    },
                ],
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.replace_sources(
              [Source.new(
                source: "theSource",
                description: "theDescription"
              )]
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.replaceSources(
              source = Seq(
                Source(
                  source = "theSource",
                  description = Some("theDescription")
                )
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.replaceSources(source: [SearchSource(source:
            "theSource", description: "theDescription")])
  /1/security/sources/append:
    post:
      tags:
        - Vaults
      operationId: appendSource
      x-acl:
        - admin
      description: Adds a source to the list of allowed sources.
      summary: Add a source
      requestBody:
        required: true
        description: Source to add.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/source'
      responses:
        '200':
          $ref: '#/components/responses/CreatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.AppendSourceAsync(
              new Source { VarSource = "theSource", Description = "theDescription", }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.appendSource(
              source: Source(
                source: "theSource",
                description: "theDescription",
              ),
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.AppendSource(client.NewApiAppendSourceRequest(

              search.NewEmptySource().SetSource("theSource").SetDescription("theDescription"),
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.appendSource(new
            Source().setSource("theSource").setDescription("theDescription"));
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.appendSource({
              source: 'theSource',
              description: 'theDescription',
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.appendSource(
              source = Source(
                source = "theSource",
                description = "theDescription",
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->appendSource(
                ['source' => 'theSource',
                    'description' => 'theDescription',
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.append_source(
                source={
                    "source": "theSource",
                    "description": "theDescription",
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.append_source(
              Source.new(
                source: "theSource",
                description: "theDescription"
              )
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.appendSource(
              source = Source(
                source = "theSource",
                description = Some("theDescription")
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.appendSource(source: SearchSource(source:
            "theSource", description: "theDescription"))
  /1/security/sources/{source}:
    delete:
      tags:
        - Vaults
      operationId: deleteSource
      x-acl:
        - admin
      description: Deletes a source from the list of allowed sources.
      summary: Delete a source
      parameters:
        - name: source
          in: path
          required: true
          description: IP address range of the source.
          schema:
            type: string
            example: 10.0.0.1/32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: deleteSourceResponse
                type: object
                additionalProperties: false
                required:
                  - deletedAt
                properties:
                  deletedAt:
                    $ref: '#/components/schemas/deletedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.DeleteSourceAsync("theSource");
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.deleteSource(
              source: "theSource",
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.DeleteSource(client.NewApiDeleteSourceRequest(
              "theSource",
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.deleteSource("theSource");
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.deleteSource({ source: 'theSource' });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.deleteSource(
              source = "theSource",
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->deleteSource(
                'theSource',
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.delete_source(
                source="theSource",
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.delete_source("theSource")

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.deleteSource(
              source = "theSource"
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.deleteSource(source: "theSource")
  /1/logs:
    get:
      tags:
        - Advanced
      operationId: getLogs
      x-acl:
        - logs
      description: >
        The request must be authenticated by an API key with the [`logs`
        ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl).


        - Logs are held for the last seven days.

        - Up to 1,000 API requests per server are logged.

        - This request counts towards your [operations
        quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-)
        but doesn't appear in the logs itself.
      summary: Retrieve log entries
      parameters:
        - name: offset
          in: query
          description: >-
            First log entry to retrieve. The most recent entries are listed
            first.
          schema:
            type: integer
            default: 0
        - name: length
          in: query
          description: Maximum number of entries to retrieve.
          schema:
            type: integer
            default: 10
            maximum: 1000
        - name: indexName
          in: query
          description: |
            Index for which to retrieve log entries.
            By default, log entries are retrieved for all indices.
          example: products
          schema:
            oneOf:
              - type: string
              - type: 'null'
        - name: type
          in: query
          description: |
            Type of log entries to retrieve.
            By default, all log entries are retrieved.
          schema:
            $ref: '#/components/schemas/logType'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: getLogsResponse
                type: object
                additionalProperties: false
                required:
                  - logs
                properties:
                  logs:
                    type: array
                    items:
                      title: log
                      type: object
                      properties:
                        timestamp:
                          type: string
                          description: >-
                            Date and time of the API request, in RFC 3339
                            format.
                          example: '2023-03-08T12:34:56Z'
                        method:
                          type: string
                          description: HTTP method of the request.
                          example: GET
                        answer_code:
                          type: string
                          description: HTTP status code of the response.
                          example: '200'
                        query_body:
                          type: string
                          maxLength: 1000
                          description: Request body.
                          example: >-
                            {\n \"requests\": [\n  {\n   \"indexName\":
                            \"best_buy\",\n   \"params\":
                            \"query=&hitsPerPage=10&page=0&attributesToRetrieve=*&highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&getRankingInfo=1&facets=%5B%22brand%22%2C%22categories%22%2C%22free_shipping%22%2C%22type%22%5D&tagFilters=\"\n 
                            }\n ]\n}\n
                        answer:
                          type: string
                          maxLength: 1000
                          description: Response body.
                          example: >
                            'n{\n \"results\": [\n  {\n   \"hits\": [\n   
                            {\n     \"name\": \"Amazon - Fire TV Stick\",\n    
                            \"description\": \"Amazon Fire TV Stick connects to
                            your TV's HDMI port. Just grab and go to enjoy
                            Netflix, Prime Instant Video, Hulu Plus,
                            YouTube.com, music, and much more.\",\n    
                            \"brand\": \"Amazon\",\n     \"categories\":
                            [\n      \"TV & Home Theater\",\n      \"Streaming
                            Media Players\"\n     ],\n    
                            \"hierarchicalCategories\": {\n      \"lvl0\": \"TV
                            & Home Theater\",\n      \"lvl1\": \"TV & Home
                            Theater > Streaming Media Players\"\n     },\n    
                            \"type\": \"Streaming media plyr\",\n     \"price\":
                            39.99,\n     \"price_range\": \"1 - 50\",\n    
                            \"image\":
                            \"https:\/\/cdn-demo.algolia.com\/bestbuy\/9999119_sb.jpg\",\n    
                            \"url\":
                            \"http:\/\/www.bestbuy.com\/site\/amazon-fire-tv-stick\/9999119.p?id=1219460752591&skuId=9999119&cmp=RMX&ky=1uWSHMdQqBeVJB9cXgEke60s5EjfS6M1W\",\n    
                            \"free_shipping\": false,\n     \"popularity\":
                            9843,\n     \"rating\": 4,\n     \"objectID\":
                            \"9999119\"\n'
                        url:
                          type: string
                          format: uri
                          description: URL of the API endpoint.
                          example: /1/indexes
                        ip:
                          type: string
                          format: ipv4
                          description: IP address of the client that performed the request.
                          example: 93.184.216.34
                        query_headers:
                          type: string
                          description: Request headers (API keys are obfuscated).
                          example: >-
                            User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0)
                            libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5\nHost:
                            example.com\nAccept: */*\nContent-Type:
                            application/json; charset=utf-8\nX-Algolia-API-Key:
                            20f***************************\nX-Algolia-Application-Id:
                            MyApplicationID\n
                        sha1:
                          type: string
                          description: SHA1 signature of the log entry.
                          example: 26c53bd7e38ca71f4741b71994cd94a600b7ac68
                        nb_api_calls:
                          type: string
                          description: Number of API requests.
                          example: '1'
                        processing_time_ms:
                          type: string
                          description: |
                            Processing time for the query in milliseconds.
                            This doesn't include latency due to the network.
                          example: '2'
                        index:
                          type: string
                          description: Index targeted by the query.
                          example: products
                        query_params:
                          type: string
                          description: Query parameters sent with the request.
                          example: query=georgia&attributesToRetrieve=name,city,country
                        query_nb_hits:
                          type: string
                          description: >-
                            Number of search results (hits) returned for the
                            query.
                          example: '1'
                        inner_queries:
                          type: array
                          description: Queries performed for the given request.
                          items:
                            type: object
                            title: logQuery
                            properties:
                              index_name:
                                type: string
                                description: Index targeted by the query.
                                example: products
                              user_token:
                                type: string
                                description: A user identifier.
                                example: 93.189.166.128
                              query_id:
                                type: string
                                description: Unique query identifier.
                                example: 96f59a3145dd9bd8963dc223950507c8
                      required:
                        - timestamp
                        - method
                        - answer_code
                        - query_body
                        - answer
                        - url
                        - ip
                        - query_headers
                        - sha1
                        - nb_api_calls
                        - processing_time_ms
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetLogsAsync();
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getLogs();
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetLogs(client.NewApiGetLogsRequest())
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getLogs();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.getLogs();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getLogs()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getLogs();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_logs()

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.get_logs

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getLogs(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.getLogs()
  /1/indexes/{indexName}/task/{taskID}:
    get:
      tags:
        - Indices
      operationId: getTask
      x-acl:
        - addObject
      description: >
        Checks the status of a given task.


        Indexing tasks are asynchronous.

        When you add, update, or delete records or indices,

        a task is created on a queue and completed depending on the load on the
        server.


        The indexing tasks' responses include a task ID that you can use to
        check the status.
      summary: Check task status
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - name: taskID
          in: path
          description: Unique task identifier.
          required: true
          schema:
            type: integer
            format: int64
            example: 1506303845001
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: getTaskResponse
                type: object
                additionalProperties: false
                properties:
                  status:
                    $ref: '#/components/schemas/taskStatus'
                required:
                  - status
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.GetTaskAsync("theIndexName", 123L);
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.getTask(
              indexName: "theIndexName",
              taskID: 123,
            );
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.GetTask(client.NewApiGetTaskRequest(
              "theIndexName", 123,
            ))
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.getTask("theIndexName", 123L);
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.getTask({
              indexName: 'theIndexName',
              taskID: 123,
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.getTask(
              indexName = "theIndexName",
              taskID = 123L,
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->getTask(
                'theIndexName',
                123,
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.get_task(
                index_name="theIndexName",
                task_id=123,
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.get_task("theIndexName", 123)

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.getTask(
              indexName = "theIndexName",
              taskID = 123L
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.getTask(indexName: "theIndexName", taskID:
            Int64(123))
  /1/indexes/{indexName}/operation:
    post:
      tags:
        - Indices
      operationId: operationIndex
      x-acl:
        - addObject
      summary: Copy or move an index
      description: >
        Copies or moves (renames) an index within the same Algolia application.


        - Existing destination indices are overwritten, except for
        index-specific API keys and analytics data.

        - If the destination index doesn't exist yet, it'll be created.


        **Copy**


        - Copying a source index that doesn't exist creates a new index with 0
        records and default settings.

        - The API keys of the source index are merged with the existing keys in
        the destination index.

        - You can't copy the `enableReRanking`, `mode`, and `replicas` settings.

        - You can't copy to a destination index that already has replicas.

        - Be aware of the [size
        limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits).

        - Related guide: [Copy
        indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/)


        **Move**


        - Moving a source index that doesn't exist is ignored without returning
        an error.

        - When moving an index, the analytics data keep their original name and
        a new set of analytics data is started for the new name.
          To access the original analytics in the dashboard, create an index with the original name.
        - If the destination index has replicas, moving will overwrite the
        existing index and copy the data to the replica indices.

        - Related guide: [Move
        indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: operationIndexParams
              type: object
              additionalProperties: false
              properties:
                operation:
                  $ref: '#/components/schemas/operationType'
                destination:
                  $ref: '#/components/schemas/indexName'
                scope:
                  type: array
                  items:
                    $ref: '#/components/schemas/scopeType'
                  description: >
                    **Only for copying.**


                    If you specify a scope, only the selected scopes are copied.
                    Records and the other scopes are left unchanged.

                    If you omit the `scope` parameter, everything is copied:
                    records, settings, synonyms, and rules.
              required:
                - operation
                - destination
      responses:
        '200':
          $ref: '#/components/responses/UpdatedAt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.OperationIndexAsync(
              "theIndexName",
              new OperationIndexParams
              {
                Operation = Enum.Parse<OperationType>("Copy"),
                Destination = "dest",
                Scope = new List<ScopeType>
                {
                  Enum.Parse<ScopeType>("Rules"),
                  Enum.Parse<ScopeType>("Settings")
                },
              }
            );
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.operationIndex(
              indexName: "theIndexName",
              operationIndexParams: OperationIndexParams(
                operation: OperationType.fromJson("copy"),
                destination: "dest",
                scope: [
                  ScopeType.fromJson("rules"),
                  ScopeType.fromJson("settings"),
                ],
              ),
            );
        - lang: go
          label: Go
          source: >
            // Initialize the client

            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            resp, err :=
            client.OperationIndex(client.NewApiOperationIndexRequest(
              "theIndexName",
              search.NewEmptyOperationIndexParams().SetOperation(search.OperationType("copy")).SetDestination("dest").SetScope(
                []search.ScopeType{search.ScopeType("rules"), search.ScopeType("settings")}),
            ))

            if err != nil {
              // handle the eventual error
              panic(err)
            }


            // use the model directly

            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.operationIndex(
              "theIndexName",
              new OperationIndexParams()
                .setOperation(OperationType.fromValue("copy"))
                .setDestination("dest")
                .setScope(List.of(ScopeType.fromValue("rules"), ScopeType.fromValue("settings")))
            );
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.operationIndex({
              indexName: 'theIndexName',
              operationIndexParams: {
                operation: 'copy',
                destination: 'dest',
                scope: ['rules', 'settings'],
              },
            });

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.operationIndex(
              indexName = "theIndexName",
              operationIndexParams = OperationIndexParams(
                operation = OperationType.entries.first { it.value == "copy" },
                destination = "dest",
                scope = listOf(ScopeType.entries.first { it.value == "rules" }, ScopeType.entries.first { it.value == "settings" }),
              ),
            )


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->operationIndex(
                'theIndexName',
                ['operation' => 'copy',
                    'destination' => 'dest',
                    'scope' => [
                        'rules',

                        'settings',
                    ],
                ],
            );


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.operation_index(
                index_name="theIndexName",
                operation_index_params={
                    "operation": "copy",
                    "destination": "dest",
                    "scope": [
                        "rules",
                        "settings",
                    ],
                },
            )

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.operation_index(
              "theIndexName",
              OperationIndexParams.new(operation: 'copy', destination: "dest", scope: ['rules', 'settings'])
            )

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.operationIndex(
              indexName = "theIndexName",
              operationIndexParams = OperationIndexParams(
                operation = OperationType.withName("copy"),
                destination = "dest",
                scope = Some(Seq(ScopeType.withName("rules"), ScopeType.withName("settings")))
              )
            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.operationIndex(
                indexName: "theIndexName",
                operationIndexParams: OperationIndexParams(
                    operation: OperationType.copy,
                    destination: "dest",
                    scope: [ScopeType.rules, ScopeType.settings]
                )
            )
  /1/indexes:
    get:
      tags:
        - Indices
      operationId: listIndices
      x-acl:
        - listIndexes
      summary: List indices
      description: >
        Lists all indices in the current Algolia application.


        The request follows any index restrictions of the API key you use to
        make the request.
      parameters:
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/HitsPerPage'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/listIndicesResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >
            // Initialize the client

            var client = new SearchClient(new SearchConfig("YOUR_APP_ID",
            "YOUR_API_KEY"));


            // Call the API

            var response = await client.ListIndicesAsync();
        - lang: dart
          label: Dart
          source: >
            // Initialize the client

            final client = SearchClient(appId: 'YOUR_APP_ID', apiKey:
            'YOUR_API_KEY');


            // Call the API

            final response = await client.listIndices();
        - lang: go
          label: Go
          source: |
            // Initialize the client
            client, err := search.NewClient("YOUR_APP_ID", "YOUR_API_KEY")
            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }

            // Call the API
            resp, err := client.ListIndices(client.NewApiListIndicesRequest())
            if err != nil {
              // handle the eventual error
              panic(err)
            }

            // use the model directly
            print(resp)
        - lang: java
          label: Java
          source: >
            // Initialize the client

            SearchClient client = new SearchClient("YOUR_APP_ID",
            "YOUR_API_KEY");


            // Call the API

            client.listIndices();
        - lang: javascript
          label: JavaScript
          source: |
            // Initialize the client
            const client = searchClient('YOUR_APP_ID', 'YOUR_API_KEY');

            // Call the API
            const response = await client.listIndices();

            // use typed response
            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            var response = client.listIndices()


            // Use the response

            println(response)
        - lang: php
          label: PHP
          source: >
            // Initialize the client

            $client =
            Algolia\AlgoliaSearch\Api\SearchClient::create('<YOUR_APP_ID>',
            '<YOUR_API_KEY>');


            // Call the API

            $response = $client->listIndices();


            // play with the response

            var_dump($response);
        - lang: python
          label: Python
          source: |
            # Initialize the client
            _client = SearchClient("YOUR_APP_ID", "YOUR_API_KEY")

            # Call the API
            resp = await _client.list_indices()

            # use the class directly
            print(resp)

            # print the JSON response
            print(resp.to_json())
        - lang: ruby
          label: Ruby
          source: |
            # Initialize the client
            client = Algolia::SearchClient.create('YOUR_APP_ID', 'YOUR_API_KEY')

            # Call the API
            resp = client.list_indices

            # use the class directly
            puts resp

            # print the JSON response
            puts resp.to_json
        - lang: scala
          label: Scala
          source: >
            // Initialize the client

            val client = SearchClient(appId = "YOUR_APP_ID", apiKey =
            "YOUR_API_KEY")


            // Call the API

            val res = client.listIndices(

            )


            // Use the response

            val value = Await.result(res, Duration(100, "sec"))
        - lang: swift
          label: Swift
          source: >
            // Initialize the client

            let client = try SearchClient(appID: "YOUR_APP_ID", apiKey:
            "YOUR_API_KEY")


            // Call the API

            _ = try await client.listIndices()
components:
  securitySchemes:
    appId:
      type: apiKey
      in: header
      name: x-algolia-application-id
      description: Your Algolia application ID.
    apiKey:
      type: apiKey
      in: header
      name: x-algolia-api-key
      description: >
        Your Algolia API key with the necessary permissions to make the request.

        Permissions are controlled through access control lists (ACL) and access
        restrictions.

        The required ACL to make a request is listed in each endpoint's
        reference.
  parameters:
    PathInPath:
      name: path
      in: path
      description: Path of the endpoint, anything after "/1" must be specified.
      required: true
      schema:
        type: string
        example: /keys
    Parameters:
      name: parameters
      in: query
      description: Query parameters to apply to the current query.
      schema:
        type: object
        additionalProperties: true
    IndexName:
      name: indexName
      in: path
      description: Name of the index on which to perform the operation.
      required: true
      schema:
        type: string
        example: YourIndexName
    ObjectID:
      name: objectID
      in: path
      description: Unique record identifier.
      required: true
      schema:
        $ref: '#/components/schemas/objectID'
    ForwardToReplicas:
      in: query
      name: forwardToReplicas
      description: Whether changes are applied to replica indices.
      schema:
        type: boolean
    parameters_ObjectID:
      name: objectID
      in: path
      description: Unique identifier of a synonym object.
      required: true
      schema:
        type: string
        example: synonymID
    ReplaceExistingSynonyms:
      in: query
      name: replaceExistingSynonyms
      schema:
        type: boolean
      description: >-
        Whether to replace all synonyms in the index with the ones sent with
        this request.
    KeyString:
      in: path
      name: key
      required: true
      schema:
        type: string
        example: YourAPIKey
      description: API key.
    ObjectIDRule:
      in: path
      name: objectID
      description: Unique identifier of a rule object.
      required: true
      schema:
        $ref: '#/components/schemas/ruleID'
    ClearExistingRules:
      in: query
      name: clearExistingRules
      required: false
      schema:
        type: boolean
      description: Whether existing rules should be deleted before adding this batch.
    DictionaryName:
      in: path
      name: dictionaryName
      description: Dictionary type in which to search.
      required: true
      schema:
        $ref: '#/components/schemas/dictionaryType'
    Page:
      in: query
      name: page
      description: |
        Requested page of the API response.
        If `null`, the API response is not paginated.
      schema:
        oneOf:
          - type: integer
            minimum: 0
          - type: 'null'
        default: null
    HitsPerPage:
      in: query
      name: hitsPerPage
      description: Number of hits per page.
      schema:
        type: integer
        default: 100
    UserIDInHeader:
      name: X-Algolia-User-ID
      description: Unique identifier of the user who makes the search request.
      in: header
      required: true
      schema:
        $ref: '#/components/schemas/userID'
    UserIDInPath:
      name: userID
      description: Unique identifier of the user who makes the search request.
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/userID'
  schemas:
    ErrorBase:
      description: Error.
      type: object
      additionalProperties: true
      properties:
        message:
          type: string
          example: Invalid Application-Id or API-Key
    paramsAsString:
      description: Search parameters as a URL-encoded query string.
      example: hitsPerPage=2&getRankingInfo=1
      type: string
      default: ''
    searchParamsString:
      type: object
      title: Search parameters as query string
      additionalProperties: false
      x-discriminator-fields:
        - params
      properties:
        params:
          $ref: '#/components/schemas/paramsAsString'
    query:
      type: string
      description: Search query.
      default: ''
      x-categories:
        - Search
    searchParamsQuery:
      type: object
      additionalProperties: false
      properties:
        query:
          $ref: '#/components/schemas/query'
    filters:
      type: string
      description: >
        Filter expression to only include items that match the filter criteria
        in the response.


        You can use these filter expressions:


        - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of
        `<`, `<=`, `=`, `!=`, `>`, `>=`.

        - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>`
        are the lower and upper limits of the range (inclusive).

        - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet
        attribute (case-sensitive) and `<value>` a facet value.

        - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive).

        - **Boolean filters.** `<facet>: true | false`.


        You can combine filters with `AND`, `OR`, and `NOT` operators with the
        following restrictions:


        - You can only combine filters of the same type with `OR`.
          **Not supported:** `facet:value OR num > 3`.
        - You can't use `NOT` with combinations of filters.
          **Not supported:** `NOT(facet:value OR facet:value)`
        - You can't combine conjunctions (`AND`) with `OR`.
          **Not supported:** `facet:value OR (facet:value AND facet:value)`

        Use quotes around your filters, if the facet attribute name or facet
        value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes.

        If a facet attribute is an array, the filter matches if it matches at
        least one element of the array.


        For more information, see
        [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
      example: (category:Book OR category:Ebook) AND _tags:published
      x-categories:
        - Filtering
    searchFiltersArrayString:
      title: search filter array
      type: array
      items:
        type: string
    mixedSearchFilters:
      oneOf:
        - $ref: '#/components/schemas/searchFiltersArrayString'
        - type: string
    listOfSearchFilters:
      type: array
      title: search filters
      items:
        $ref: '#/components/schemas/mixedSearchFilters'
    facetFilters:
      description: >
        Filter the search by facet values, so that only records with the same
        facet values are retrieved.


        **Prefer using the `filters` parameter, which supports all filter types
        and combinations with boolean operators.**


        - `[filter1, filter2]` is interpreted as `filter1 AND filter2`.

        - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2
        AND filter3`.

        - `facet:-value` is interpreted as `NOT facet:value`.


        While it's best to avoid attributes that start with a `-`, you can still
        filter them by escaping with a backslash:

        `facet:\-value`.
      example:
        - - category:Book
          - category:-Movie
        - author:John Doe
      oneOf:
        - $ref: '#/components/schemas/listOfSearchFilters'
        - type: string
      x-categories:
        - Filtering
    optionalFilters:
      description: >
        Filters to promote or demote records in the search results.


        Optional filters work like facet filters, but they don't exclude records
        from the search results.

        Records that match the optional filter rank before records that don't
        match.

        If you're using a negative filter `facet:-value`, matching records rank
        after records that don't match.


        - Optional filters don't work on virtual replicas.

        - Optional filters are applied _after_ sort-by attributes.

        - Optional filters don't work with numeric attributes.
      example:
        - category:Book
        - author:John Doe
      oneOf:
        - $ref: '#/components/schemas/listOfSearchFilters'
        - type: string
      x-categories:
        - Filtering
    numericFilters:
      description: >
        Filter by numeric facets.


        **Prefer using the `filters` parameter, which supports all filter types
        and combinations with boolean operators.**


        You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`,
        `>=`. Comparsions are precise up to 3 decimals.

        You can also provide ranges: `facet:<lower> TO <upper>`. The range
        includes the lower and upper boundaries.

        The same combination rules apply as for `facetFilters`.
      example:
        - - inStock = 1
          - deliveryDate < 1441755506
        - price < 1000
      oneOf:
        - $ref: '#/components/schemas/listOfSearchFilters'
        - type: string
      x-categories:
        - Filtering
    tagFilters:
      description: >
        Filter the search by values of the special `_tags` attribute.


        **Prefer using the `filters` parameter, which supports all filter types
        and combinations with boolean operators.**


        Different from regular facets, `_tags` can only be used for filtering
        (including or excluding records).

        You won't get a facet count.

        The same combination and escaping rules apply as for `facetFilters`.
      example:
        - - Book
          - Movie
        - SciFi
      oneOf:
        - $ref: '#/components/schemas/listOfSearchFilters'
        - type: string
      x-categories:
        - Filtering
    page:
      type: integer
      description: Page of search results to retrieve.
      default: 0
      minimum: 0
      x-categories:
        - Pagination
    aroundLatLng:
      type: string
      description: >
        Coordinates for the center of a circle, expressed as a comma-separated
        string of latitude and longitude.


        Only records included within circle around this central location are
        included in the results.

        The radius of the circle is determined by the `aroundRadius` and
        `minimumAroundRadius` settings.

        This parameter is ignored if you also specify `insidePolygon` or
        `insideBoundingBox`.
      example: 40.71,-74.01
      default: ''
      x-categories:
        - Geo-Search
    aroundLatLngViaIP:
      type: boolean
      description: Whether to obtain the coordinates from the request's IP address.
      default: false
      x-categories:
        - Geo-Search
    aroundRadiusAll:
      title: all
      type: string
      description: >-
        Return all records with a valid `_geoloc` attribute. Don't filter by
        distance.
      enum:
        - all
    aroundRadius:
      description: >
        Maximum radius for a search around a central location.


        This parameter works in combination with the `aroundLatLng` and
        `aroundLatLngViaIP` parameters.

        By default, the search radius is determined automatically from the
        density of hits around the central location.

        The search radius is small if there are many hits close to the central
        coordinates.
      oneOf:
        - type: integer
          minimum: 1
          description: Maximum search radius around a central location in meters.
        - $ref: '#/components/schemas/aroundRadiusAll'
      x-categories:
        - Geo-Search
    aroundPrecisionFromValue:
      title: range objects
      type: array
      items:
        type: object
        description: >-
          Range object with lower and upper values in meters to define custom
          ranges.
        properties:
          from:
            type: integer
            description: >-
              Lower boundary of a range in meters. The Geo ranking criterion
              considers all records within the range to be equal.
            example: 20
          value:
            type: integer
            description: >-
              Upper boundary of a range in meters. The Geo ranking criterion
              considers all records within the range to be equal.
    aroundPrecision:
      description: >
        Precision of a coordinate-based search in meters to group results with
        similar distances.


        The Geo ranking criterion considers all matches within the same range of
        distances to be equal.
      oneOf:
        - type: integer
          default: 10
          description: >
            Distance in meters to group results by similar distances.


            For example, if you set `aroundPrecision` to 100, records wihin 100
            meters to the central coordinate are considered to have the same
            distance,

            as are records between 100 and 199 meters.
        - $ref: '#/components/schemas/aroundPrecisionFromValue'
      x-categories:
        - Geo-Search
    insideBoundingBox:
      type: array
      items:
        type: array
        minItems: 4
        maxItems: 4
        items:
          type: number
          format: double
      description: >
        Coordinates for a rectangular area in which to search.


        Each bounding box is defined by the two opposite points of its diagonal,
        and expressed as latitude and longitude pair:

        `[p1 lat, p1 long, p2 lat, p2 long]`.

        Provide multiple bounding boxes as nested arrays.

        For more information, see [rectangular
        area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
      example:
        - - 47.3165
          - 4.9665
          - 47.3424
          - 5.0201
        - - 40.9234
          - 2.1185
          - 38.643
          - 1.9916
      x-categories:
        - Geo-Search
    insidePolygon:
      type: array
      items:
        type: array
        minItems: 6
        maxItems: 20000
        items:
          type: number
          format: double
      description: >
        Coordinates of a polygon in which to search.


        Polygons are defined by 3 to 10,000 points. Each point is represented by
        its latitude and longitude.

        Provide multiple polygons as nested arrays.

        For more information, see [filtering inside
        polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).

        This parameter is ignored if you also specify `insideBoundingBox`.
      example:
        - - 47.3165
          - 4.9665
          - 47.3424
          - 5.0201
          - 47.32
          - 4.9
        - - 40.9234
          - 2.1185
          - 38.643
          - 1.9916
          - 39.2587
          - 2.0104
      x-categories:
        - Geo-Search
    supportedLanguage:
      type: string
      description: ISO code for a supported language.
      enum:
        - af
        - ar
        - az
        - bg
        - bn
        - ca
        - cs
        - cy
        - da
        - de
        - el
        - en
        - eo
        - es
        - et
        - eu
        - fa
        - fi
        - fo
        - fr
        - ga
        - gl
        - he
        - hi
        - hu
        - hy
        - id
        - is
        - it
        - ja
        - ka
        - kk
        - ko
        - ku
        - ky
        - lt
        - lv
        - mi
        - mn
        - mr
        - ms
        - mt
        - nb
        - nl
        - 'no'
        - ns
        - pl
        - ps
        - pt
        - pt-br
        - qu
        - ro
        - ru
        - sk
        - sq
        - sv
        - sw
        - ta
        - te
        - th
        - tl
        - tn
        - tr
        - tt
        - uk
        - ur
        - uz
        - zh
    userToken:
      type: string
      description: >
        Unique pseudonymous or anonymous user identifier.


        This helps with analytics and click and conversion events.

        For more information, see [user
        token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
      example: test-user-123
      x-categories:
        - Personalization
    baseSearchParamsWithoutQuery:
      type: object
      additionalProperties: false
      properties:
        similarQuery:
          type: string
          description: >
            Keywords to be used instead of the search query to conduct a more
            broader search.


            Using the `similarQuery` parameter changes other settings:


            - `queryType` is set to `prefixNone`.

            - `removeStopWords` is set to true.

            - `words` is set as the first ranking criterion.

            - All remaining words are treated as `optionalWords`.


            Since the `similarQuery` is supposed to do a broad search, they
            usually return many results.

            Combine it with `filters` to narrow down the list of results.
          default: ''
          example: comedy drama crime Macy Buscemi
          x-categories:
            - Search
        filters:
          $ref: '#/components/schemas/filters'
        facetFilters:
          $ref: '#/components/schemas/facetFilters'
        optionalFilters:
          $ref: '#/components/schemas/optionalFilters'
        numericFilters:
          $ref: '#/components/schemas/numericFilters'
        tagFilters:
          $ref: '#/components/schemas/tagFilters'
        sumOrFiltersScores:
          type: boolean
          description: >
            Whether to sum all filter scores.


            If true, all filter scores are summed.

            Otherwise, the maximum filter score is kept.

            For more information, see [filter
            scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
          default: false
          x-categories:
            - Filtering
        restrictSearchableAttributes:
          type: array
          items:
            type: string
          example:
            - title
            - author
          description: |
            Restricts a search to a subset of your searchable attributes.
            Attribute names are case-sensitive.
          default: []
          x-categories:
            - Filtering
        facets:
          type: array
          items:
            type: string
          description: >
            Facets for which to retrieve facet values that match the search
            criteria and the number of matching facet values.


            To retrieve all facets, use the wildcard character `*`.

            For more information, see
            [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
          default: []
          example:
            - '*'
          x-categories:
            - Faceting
        facetingAfterDistinct:
          type: boolean
          description: >
            Whether faceting should be applied after deduplication with
            `distinct`.


            This leads to accurate facet counts when using faceting in
            combination with `distinct`.

            It's usually better to use `afterDistinct` modifiers in the
            `attributesForFaceting` setting,

            as `facetingAfterDistinct` only computes correct facet counts if all
            records have the same facet values for the `attributeForDistinct`.
          default: false
          x-categories:
            - Faceting
        page:
          $ref: '#/components/schemas/page'
        offset:
          type: integer
          description: Position of the first hit to retrieve.
          x-categories:
            - Pagination
        length:
          type: integer
          description: Number of hits to retrieve (used in combination with `offset`).
          minimum: 1
          maximum: 1000
          x-categories:
            - Pagination
        aroundLatLng:
          $ref: '#/components/schemas/aroundLatLng'
        aroundLatLngViaIP:
          $ref: '#/components/schemas/aroundLatLngViaIP'
        aroundRadius:
          $ref: '#/components/schemas/aroundRadius'
        aroundPrecision:
          $ref: '#/components/schemas/aroundPrecision'
        minimumAroundRadius:
          type: integer
          description: >-
            Minimum radius (in meters) for a search around a location when
            `aroundRadius` isn't set.
          minimum: 1
          x-categories:
            - Geo-Search
        insideBoundingBox:
          $ref: '#/components/schemas/insideBoundingBox'
        insidePolygon:
          $ref: '#/components/schemas/insidePolygon'
        naturalLanguages:
          type: array
          items:
            $ref: '#/components/schemas/supportedLanguage'
          description: >
            ISO language codes that adjust settings that are useful for
            processing natural language queries (as opposed to keyword
            searches):


            - Sets `removeStopWords` and `ignorePlurals` to the list of provided
            languages.

            - Sets `removeWordsIfNoResults` to `allOptional`.

            - Adds a `natural_language` attribute to `ruleContexts` and
            `analyticsTags`.
          default: []
          x-categories:
            - Languages
        ruleContexts:
          type: array
          items:
            type: string
          description: >
            Assigns a rule context to the search query.


            [Rule
            contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context)
            are strings that you can use to trigger matching rules.
          default: []
          example:
            - mobile
          x-categories:
            - Rules
        personalizationImpact:
          type: integer
          description: >
            Impact that Personalization should have on this search.


            The higher this value is, the more Personalization determines the
            ranking compared to other factors.

            For more information, see [Understanding Personalization
            impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
          default: 100
          minimum: 0
          maximum: 100
          x-categories:
            - Personalization
        userToken:
          $ref: '#/components/schemas/userToken'
        getRankingInfo:
          type: boolean
          description: >-
            Whether the search response should include detailed ranking
            information.
          default: false
          x-categories:
            - Advanced
        synonyms:
          type: boolean
          description: Whether to take into account an index's synonyms for this search.
          default: true
          x-categories:
            - Advanced
        clickAnalytics:
          type: boolean
          description: >
            Whether to include a `queryID` attribute in the response.


            The query ID is a unique identifier for a search query and is
            required for tracking [click and conversion
            events](https://www.algolia.com/guides/sending-events/getting-started/).
          default: false
          x-categories:
            - Analytics
        analytics:
          type: boolean
          description: Whether this search will be included in Analytics.
          default: true
          x-categories:
            - Analytics
        analyticsTags:
          type: array
          items:
            type: string
          description: >-
            Tags to apply to the query for [segmenting analytics
            data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
          default: []
          x-categories:
            - Analytics
        percentileComputation:
          type: boolean
          description: >-
            Whether to include this search when calculating processing-time
            percentiles.
          default: true
          x-categories:
            - Advanced
        enableABTest:
          type: boolean
          description: Whether to enable A/B testing for this search.
          default: true
          x-categories:
            - Advanced
    baseSearchParams:
      allOf:
        - $ref: '#/components/schemas/searchParamsQuery'
        - $ref: '#/components/schemas/baseSearchParamsWithoutQuery'
    hitsPerPage:
      type: integer
      description: Number of hits per page.
      default: 20
      minimum: 1
      maximum: 1000
      x-categories:
        - Pagination
    typoToleranceEnum:
      type: string
      title: typo tolerance
      description: |
        - `min`. Return matches with the lowest number of typos.
          For example, if you have matches without typos, only include those.
          But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos).
        - `strict`. Return matches with the two lowest numbers of typos.
          With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.
      enum:
        - min
        - strict
    typoTolerance:
      description: >
        Whether [typo
        tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/)
        is enabled and how it is applied.


        If typo tolerance is true, `min`, or `strict`, [word splitting and
        concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/)
        is also active.
      oneOf:
        - type: boolean
          default: true
          description: >-
            Whether typo tolerance is active. If true, matches with typos are
            included in the search results and rank after exact matches.
        - $ref: '#/components/schemas/typoToleranceEnum'
      x-categories:
        - Typos
    ignorePlurals:
      description: |
        Treat singular, plurals, and other forms of declensions as equivalent.
        You should only use this feature for the languages used in your index.
      example:
        - ca
        - es
      oneOf:
        - type: array
          description: |
            ISO code for languages for which this feature should be active.
            This overrides languages you set with `queryLanguages`.
          items:
            $ref: '#/components/schemas/supportedLanguage'
        - type: boolean
          description: >
            If true, `ignorePlurals` is active for all languages included in
            `queryLanguages`, or for all supported languages, if `queryLanguges`
            is empty.

            If false, singulars, plurals, and other declensions won't be
            considered equivalent.
          default: false
      x-categories:
        - Languages
    removeStopWords:
      description: >
        Removes stop words from the search query.


        Stop words are common words like articles, conjunctions, prepositions,
        or pronouns that have little or no meaning on their own.

        In English, "the", "a", or "and" are stop words.


        You should only use this feature for the languages used in your index.
      example:
        - ca
        - es
      oneOf:
        - type: array
          description: >-
            ISO code for languages for which stop words should be removed. This
            overrides languages you set in `queryLanguges`.
          items:
            $ref: '#/components/schemas/supportedLanguage'
        - type: boolean
          default: false
          description: >
            If true, stop words are removed for all languages you included in
            `queryLanguages`, or for all supported languages, if
            `queryLanguages` is empty.

            If false, stop words are not removed.
      x-categories:
        - Languages
    queryType:
      type: string
      enum:
        - prefixLast
        - prefixAll
        - prefixNone
      description: >
        Determines if and how query words are interpreted as prefixes.


        By default, only the last query word is treated as prefix
        (`prefixLast`).

        To turn off prefix search, use `prefixNone`.

        Avoid `prefixAll`, which treats all query words as prefixes.

        This might lead to counterintuitive results and makes your search
        slower.


        For more information, see [Prefix
        searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).
      default: prefixLast
      x-categories:
        - Query strategy
    removeWordsIfNoResults:
      type: string
      enum:
        - none
        - lastWords
        - firstWords
        - allOptional
      example: firstWords
      description: >
        Strategy for removing words from the query when it doesn't return any
        results.

        This helps to avoid returning empty search results.


        - `none`.
          No words are removed when a query doesn't return results.

        - `lastWords`.
          Treat the last (then second to last, then third to last) word as optional,
          until there are results or at most 5 words have been removed.

        - `firstWords`.
          Treat the first (then second, then third) word as optional,
          until there are results or at most 5 words have been removed.

        - `allOptional`.
          Treat all words as optional.

        For more information, see [Remove words to improve
        results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
      default: none
      x-categories:
        - Query strategy
    mode:
      type: string
      enum:
        - neuralSearch
        - keywordSearch
      description: >
        Search mode the index will use to query for results.


        This setting only applies to indices, for which Algolia enabled
        NeuralSearch for you.
      default: keywordSearch
      x-categories:
        - Query strategy
    semanticSearch:
      type: object
      description: |
        Settings for the semantic search part of NeuralSearch.
        Only used when `mode` is `neuralSearch`.
      properties:
        eventSources:
          oneOf:
            - type: array
              description: |
                Indices from which to collect click and conversion events.

                If null, the current index and all its replicas are used.
              items:
                type: string
            - type: 'null'
    exactOnSingleWordQuery:
      type: string
      enum:
        - attribute
        - none
        - word
      description: >
        Determines how the [Exact ranking
        criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes)
        is computed when the search query has only one word.


        - `attribute`.
          The Exact ranking criterion is 1 if the query word and attribute value are the same.
          For example, a search for "road" will match the value "road", but not "road trip".

        - `none`.
          The Exact ranking criterion is ignored on single-word searches.

        - `word`.
          The Exact ranking criterion is 1 if the query word is found in the attribute value.
          The query word must have at least 3 characters and must not be a stop word.
          Only exact matches will be highlighted,
          partial and prefix matches won't.
      default: attribute
      x-categories:
        - Query strategy
    alternativesAsExact:
      type: string
      enum:
        - ignorePlurals
        - singleWordSynonym
        - multiWordsSynonym
      x-categories:
        - Query strategy
    advancedSyntaxFeatures:
      type: string
      enum:
        - exactPhrase
        - excludeWords
      x-categories:
        - Query strategy
    distinct:
      description: >
        Determines how many records of a group are included in the search
        results.


        Records with the same value for the `attributeForDistinct` attribute are
        considered a group.

        The `distinct` setting controls how many members of the group are
        returned.

        This is useful for [deduplication and
        grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature).


        The `distinct` setting is ignored if `attributeForDistinct` is not set.
      example: 1
      oneOf:
        - type: boolean
          description: >-
            Whether deduplication is turned on. If true, only one member of a
            group is shown in the search results.
        - type: integer
          description: >
            Number of members of a group of records to include in the search
            results.


            - Don't use `distinct > 1` for records that might be [promoted by
            rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/).
              The number of hits won't be correct and faceting won't work as expected.
            - With `distinct > 1`, the `hitsPerPage` parameter controls the
            number of returned groups.
              For example, with `hitsPerPage: 10` and `distinct: 2`, up to 20 records are returned.
              Likewise, the `nbHits` response attribute contains the number of returned groups.
          minimum: 0
          maximum: 4
          default: 0
      x-categories:
        - Advanced
    maxFacetHits:
      type: integer
      description: >-
        Maximum number of facet values to return when [searching for facet
        values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
      maximum: 100
      default: 10
      x-categories:
        - Advanced
    order:
      description: >
        Explicit order of facets or facet values.


        This setting lets you always show specific facets or facet values at the
        top of the list.
      type: array
      items:
        type: string
    facets:
      description: Order of facet names.
      type: object
      additionalProperties: false
      properties:
        order:
          $ref: '#/components/schemas/order'
    sortRemainingBy:
      description: >
        Order of facet values that aren't explicitly positioned with the `order`
        setting.


        - `count`.
          Order remaining facet values by decreasing count.
          The count is the number of matching records containing this facet value.

        - `alpha`.
          Sort facet values alphabetically.

        - `hidden`.
          Don't show facet values that aren't explicitly positioned.
      type: string
      enum:
        - count
        - alpha
        - hidden
    value:
      type: object
      additionalProperties: false
      properties:
        order:
          $ref: '#/components/schemas/order'
        sortRemainingBy:
          $ref: '#/components/schemas/sortRemainingBy'
    values:
      description: Order of facet values. One object for each facet.
      type: object
      additionalProperties:
        x-additionalPropertiesName: facet
        $ref: '#/components/schemas/value'
    facetOrdering:
      description: Order of facet names and facet values in your UI.
      type: object
      additionalProperties: false
      properties:
        facets:
          $ref: '#/components/schemas/facets'
        values:
          $ref: '#/components/schemas/values'
    renderingContent:
      description: >
        Extra data that can be used in the search UI.


        You can use this to control aspects of your search UI, such as, the
        order of facet names and values

        without changing your frontend code.
      type: object
      additionalProperties: false
      properties:
        facetOrdering:
          $ref: '#/components/schemas/facetOrdering'
      x-categories:
        - Advanced
    reRankingApplyFilter:
      description: >
        Restrict [Dynamic
        Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/)
        to records that match these filters.
      oneOf:
        - $ref: '#/components/schemas/listOfSearchFilters'
        - type: string
          x-categories:
            - Filtering
        - type: 'null'
    indexSettingsAsSearchParams:
      type: object
      additionalProperties: false
      properties:
        attributesToRetrieve:
          type: array
          items:
            type: string
          example:
            - author
            - title
            - content
          description: >
            Attributes to include in the API response.


            To reduce the size of your response, you can retrieve only some of
            the attributes.

            Attribute names are case-sensitive.


            - `*` retrieves all attributes, except attributes included in the
            `customRanking` and `unretrievableAttributes` settings.

            - To retrieve all attributes except a specific one, prefix the
            attribute with a dash and combine it with the `*`: `["*",
            "-ATTRIBUTE"]`.

            - The `objectID` attribute is always included.
          default:
            - '*'
          x-categories:
            - Attributes
        ranking:
          type: array
          items:
            type: string
          description: >
            Determines the order in which Algolia returns your results.


            By default, each entry corresponds to a [ranking
            criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).

            The tie-breaking algorithm sequentially applies each criterion in
            the order they're specified.

            If you configure a replica index for [sorting by an
            attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/),

            you put the sorting attribute at the top of the list.


            **Modifiers**


            - `asc("ATTRIBUTE")`.
              Sort the index by the values of an attribute, in ascending order.
            - `desc("ATTRIBUTE")`.
              Sort the index by the values of an attribute, in descending order.

            Before you modify the default setting,

            you should test your changes in the dashboard,

            and by [A/B
            testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
          default:
            - typo
            - geo
            - words
            - filters
            - proximity
            - attribute
            - exact
            - custom
          x-categories:
            - Ranking
        customRanking:
          type: array
          items:
            type: string
          example:
            - desc(popularity)
            - asc(price)
          description: >
            Attributes to use as [custom
            ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/).

            Attribute names are case-sensitive.


            The custom ranking attributes decide which items are shown first if
            the other ranking criteria are equal.


            Records with missing values for your selected custom ranking
            attributes are always sorted last.

            Boolean attributes are sorted based on their alphabetical order.


            **Modifiers**


            - `asc("ATTRIBUTE")`.
              Sort the index by the values of an attribute, in ascending order.

            - `desc("ATTRIBUTE")`.
              Sort the index by the values of an attribute, in descending order.

            If you use two or more custom ranking attributes,

            [reduce the
            precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/)
            of your first attributes,

            or the other attributes will never be applied.
          default: []
          x-categories:
            - Ranking
        relevancyStrictness:
          type: integer
          example: 90
          description: >
            Relevancy threshold below which less relevant results aren't
            included in the results.


            You can only set `relevancyStrictness` on [virtual replica
            indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas).

            Use this setting to strike a balance between the relevance and
            number of returned results.
          default: 100
          x-categories:
            - Ranking
        attributesToHighlight:
          type: array
          items:
            type: string
          example:
            - author
            - title
            - conten
            - content
          description: >
            Attributes to highlight.


            By default, all searchable attributes are highlighted.

            Use `*` to highlight all attributes or use an empty array `[]` to
            turn off highlighting.

            Attribute names are case-sensitive.


            With highlighting, strings that match the search query are
            surrounded by HTML tags defined by `highlightPreTag` and
            `highlightPostTag`.

            You can use this to visually highlight matching parts of a search
            query in your UI.


            For more information, see [Highlighting and
            snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/).
          x-categories:
            - Highlighting and Snippeting
        attributesToSnippet:
          type: array
          items:
            type: string
          example:
            - content:80
            - description
          description: >
            Attributes for which to enable snippets.

            Attribute names are case-sensitive.


            Snippets provide additional context to matched words.

            If you enable snippets, they include 10 words, including the matched
            word.

            The matched word will also be wrapped by HTML tags for highlighting.

            You can adjust the number of words with the following notation:
            `ATTRIBUTE:NUMBER`,

            where `NUMBER` is the number of words to be extracted.
          default: []
          x-categories:
            - Highlighting and Snippeting
        highlightPreTag:
          type: string
          description: >-
            HTML tag to insert before the highlighted parts in all highlighted
            results and snippets.
          default: <em>
          x-categories:
            - Highlighting and Snippeting
        highlightPostTag:
          type: string
          description: >-
            HTML tag to insert after the highlighted parts in all highlighted
            results and snippets.
          default: </em>
          x-categories:
            - Highlighting and Snippeting
        snippetEllipsisText:
          type: string
          description: String used as an ellipsis indicator when a snippet is truncated.
          default: …
          x-categories:
            - Highlighting and Snippeting
        restrictHighlightAndSnippetArrays:
          type: boolean
          description: >
            Whether to restrict highlighting and snippeting to items that at
            least partially matched the search query.

            By default, all items are highlighted and snippeted.
          default: false
          x-categories:
            - Highlighting and Snippeting
        hitsPerPage:
          $ref: '#/components/schemas/hitsPerPage'
        minWordSizefor1Typo:
          type: integer
          description: >-
            Minimum number of characters a word in the search query must contain
            to accept matches with [one
            typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
          default: 4
          x-categories:
            - Typos
        minWordSizefor2Typos:
          type: integer
          description: >-
            Minimum number of characters a word in the search query must contain
            to accept matches with [two
            typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
          default: 8
          x-categories:
            - Typos
        typoTolerance:
          $ref: '#/components/schemas/typoTolerance'
        allowTyposOnNumericTokens:
          type: boolean
          description: |
            Whether to allow typos on numbers in the search query.

            Turn off this setting to reduce the number of irrelevant matches
            when searching in large sets of similar numbers.
          default: true
          x-categories:
            - Typos
        disableTypoToleranceOnAttributes:
          type: array
          items:
            type: string
          example:
            - sku
          description: >
            Attributes for which you want to turn off [typo
            tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).

            Attribute names are case-sensitive.


            Returning only exact matches can help when:


            - [Searching in hyphenated
            attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/).

            - Reducing the number of matches when you have too many.
              This can happen with attributes that are long blocks of text, such as product descriptions.

            Consider alternatives such as `disableTypoToleranceOnWords` or
            adding synonyms if your attributes have intentional unusual
            spellings that might look like typos.
          default: []
          x-categories:
            - Typos
        ignorePlurals:
          $ref: '#/components/schemas/ignorePlurals'
        removeStopWords:
          $ref: '#/components/schemas/removeStopWords'
        keepDiacriticsOnCharacters:
          type: string
          example: øé
          description: |
            Characters for which diacritics should be preserved.

            By default, Algolia removes diacritics from letters.
            For example, `é` becomes `e`. If this causes issues in your search,
            you can specify characters that should keep their diacritics.
          default: ''
          x-categories:
            - Languages
        queryLanguages:
          type: array
          items:
            $ref: '#/components/schemas/supportedLanguage'
          example:
            - es
          description: >
            Languages for language-specific query processing steps such as
            plurals, stop-word removal, and word-detection dictionaries.


            This setting sets a default list of languages used by the
            `removeStopWords` and `ignorePlurals` settings.

            This setting also sets a dictionary for word detection in the
            logogram-based
            [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk)
            languages.

            To support this, you must place the CJK language **first**.


            **You should always specify a query language.**

            If you don't specify an indexing language, the search engine uses
            all [supported
            languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),

            or the languages you specified with the `ignorePlurals` or
            `removeStopWords` parameters.

            This can lead to unexpected search results.

            For more information, see [Language-specific
            configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
          default: []
          x-categories:
            - Languages
        decompoundQuery:
          type: boolean
          description: >
            Whether to split compound words into their building blocks.


            For more information, see [Word
            segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words).

            Word segmentation is supported for these languages: German, Dutch,
            Finnish, Swedish, and Norwegian.
          default: true
          x-categories:
            - Languages
        enableRules:
          type: boolean
          description: Whether to enable rules.
          default: true
          x-categories:
            - Rules
        enablePersonalization:
          type: boolean
          description: Whether to enable Personalization.
          default: false
          x-categories:
            - Personalization
        queryType:
          $ref: '#/components/schemas/queryType'
        removeWordsIfNoResults:
          $ref: '#/components/schemas/removeWordsIfNoResults'
        mode:
          $ref: '#/components/schemas/mode'
        semanticSearch:
          $ref: '#/components/schemas/semanticSearch'
        advancedSyntax:
          type: boolean
          description: >
            Whether to support phrase matching and excluding words from search
            queries.


            Use the `advancedSyntaxFeatures` parameter to control which feature
            is supported.
          default: false
          x-categories:
            - Query strategy
        optionalWords:
          type: array
          items:
            type: string
          example:
            - blue
            - iphone case
          description: >
            Words that should be considered optional when found in the query.


            By default, records must match all words in the search query to be
            included in the search results.

            Adding optional words can help to increase the number of search
            results by running an additional search query that doesn't include
            the optional words.

            For example, if the search query is "action video" and "video" is an
            optional word,

            the search engine runs two queries. One for "action video" and one
            for "action".

            Records that match all words are ranked higher.


            For a search query with 4 or more words **and** all its words are
            optional,

            the number of matched words required for a record to be included in
            the search results increases for every 1,000 records:


            - If `optionalWords` has less than 10 words, the required number of
            matched words increases by 1:
              results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words.
            - If `optionalWords` has 10 or more words, the number of required
            matched words increases by the number of optional words dividied by
            5 (rounded down).
              For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words.

            For more information, see [Optional
            words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
          default: []
          x-categories:
            - Query strategy
        disableExactOnAttributes:
          type: array
          items:
            type: string
          example:
            - description
          description: >
            Searchable attributes for which you want to [turn off the Exact
            ranking
            criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).

            Attribute names are case-sensitive.


            This can be useful for attributes with long values, where the
            likelyhood of an exact match is high,

            such as product descriptions.

            Turning off the Exact ranking criterion for these attributes favors
            exact matching on other attributes.

            This reduces the impact of individual attributes with a lot of
            content on ranking.
          default: []
          x-categories:
            - Query strategy
        exactOnSingleWordQuery:
          $ref: '#/components/schemas/exactOnSingleWordQuery'
        alternativesAsExact:
          type: array
          items:
            $ref: '#/components/schemas/alternativesAsExact'
          description: >
            Alternatives of query words that should be considered as exact
            matches by the Exact ranking criterion.


            - `ignorePlurals`.
              Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.

            - `singleWordSynonym`.
              Single-word synonyms, such as "NY/NYC" are considered exact matches.

            - `multiWordsSynonym`.
              Multi-word synonyms, such as "NY/New York" are considered exact matches.
          default:
            - ignorePlurals
            - singleWordSynonym
          x-categories:
            - Query strategy
        advancedSyntaxFeatures:
          type: array
          items:
            $ref: '#/components/schemas/advancedSyntaxFeatures'
          description: |
            Advanced search syntax features you want to support.

            - `exactPhrase`.
              Phrases in quotes must match exactly.
              For example, `sparkly blue "iPhone case"` only returns records with the exact string "iPhone case".

            - `excludeWords`.
              Query words prefixed with a `-` must not occur in a record.
              For example, `search -engine` matches records that contain "search" but not "engine".

            This setting only has an effect if `advancedSyntax` is true.
          default:
            - exactPhrase
            - excludeWords
          x-categories:
            - Query strategy
        distinct:
          $ref: '#/components/schemas/distinct'
        replaceSynonymsInHighlight:
          type: boolean
          description: >
            Whether to replace a highlighted word with the matched synonym.


            By default, the original words are highlighted even if a synonym
            matches.

            For example, with `home` as a synonym for `house` and a search for
            `home`,

            records matching either "home" or "house" are included in the search
            results,

            and either "home" or "house" are highlighted.


            With `replaceSynonymsInHighlight` set to `true`, a search for `home`
            still matches the same records,

            but all occurences of "house" are replaced by "home" in the
            highlighted response.
          default: false
          x-categories:
            - Highlighting and Snippeting
        minProximity:
          type: integer
          minimum: 1
          maximum: 7
          description: >
            Minimum proximity score for two matching words.


            This adjusts the [Proximity ranking
            criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity)

            by equally scoring matches that are farther apart.


            For example, if `minProximity` is 2, neighboring matches and matches
            with one word between them would have the same score.
          default: 1
          x-categories:
            - Advanced
        responseFields:
          type: array
          items:
            type: string
          description: >
            Properties to include in the API response of `search` and `browse`
            requests.


            By default, all response properties are included.

            To reduce the response size, you can select, which attributes should
            be included.


            You can't exclude these properties:

            `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`,

            `abTestVariantID`, `parsedQuery`, or any property triggered by the
            `getRankingInfo` parameter.


            Don't exclude properties that you might need in your search UI.
          default:
            - '*'
          x-categories:
            - Advanced
        maxFacetHits:
          $ref: '#/components/schemas/maxFacetHits'
        maxValuesPerFacet:
          type: integer
          description: Maximum number of facet values to return for each facet.
          default: 100
          maximum: 1000
          x-categories:
            - Faceting
        sortFacetValuesBy:
          type: string
          description: >
            Order in which to retrieve facet values.


            - `count`.
              Facet values are retrieved by decreasing count.
              The count is the number of matching records containing this facet value.

            - `alpha`.
              Retrieve facet values alphabetically.

            This setting doesn't influence how facet values are displayed in
            your UI (see `renderingContent`).

            For more information, see [facet value
            display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
          default: count
          x-categories:
            - Faceting
        attributeCriteriaComputedByMinProximity:
          type: boolean
          description: >
            Whether the best matching attribute should be determined by minimum
            proximity.


            This setting only affects ranking if the Attribute ranking criterion
            comes before Proximity in the `ranking` setting.

            If true, the best matching attribute is selected based on the
            minimum proximity of multiple matches.

            Otherwise, the best matching attribute is determined by the order in
            the `searchableAttributes` setting.
          default: false
          x-categories:
            - Advanced
        renderingContent:
          $ref: '#/components/schemas/renderingContent'
        enableReRanking:
          type: boolean
          description: >
            Whether this search will use [Dynamic
            Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).


            This setting only has an effect if you activated Dynamic Re-Ranking
            for this index in the Algolia dashboard.
          default: true
          x-categories:
            - Filtering
        reRankingApplyFilter:
          $ref: '#/components/schemas/reRankingApplyFilter'
    searchParamsObject:
      title: Search parameters as object
      description: >-
        Each parameter value, including the `query` must not be larger than 512
        bytes.
      allOf:
        - $ref: '#/components/schemas/baseSearchParams'
        - $ref: '#/components/schemas/indexSettingsAsSearchParams'
    searchParams:
      oneOf:
        - $ref: '#/components/schemas/searchParamsString'
        - $ref: '#/components/schemas/searchParamsObject'
    exhaustiveFacetsCount:
      type: boolean
      description: See the `facetsCount` field of the `exhaustive` object in the response.
      deprecated: true
    nbHits:
      type: integer
      description: Number of results (hits).
      example: 20
    nbPages:
      type: integer
      description: Number of pages of results.
      example: 1
    processingTimeMS:
      type: integer
      description: Time the server took to process the request, in milliseconds.
      example: 20
    RedirectRuleIndexMetadata:
      type: object
      properties:
        source:
          type: string
          description: Source index for the redirect rule.
        dest:
          type: string
          description: Destination index for the redirect rule.
        reason:
          type: string
          description: Reason for the redirect rule.
        succeed:
          type: boolean
          description: Redirect rule status.
        data:
          type: object
          description: Redirect rule data.
          required:
            - ruleObjectID
          properties:
            ruleObjectID:
              type: string
      required:
        - data
        - succeed
        - reason
        - dest
        - source
    userData:
      example:
        settingID: f2a7b51e3503acc6a39b3784ffb84300
        pluginVersion: 1.6.0
      description: |
        An object with custom data.

        You can store up to 32&nbsp;kB as custom data.
      default: {}
      x-categories:
        - Advanced
    baseSearchResponse:
      type: object
      additionalProperties: true
      required:
        - nbHits
        - page
        - nbPages
        - hitsPerPage
        - processingTimeMS
      properties:
        abTestID:
          type: integer
          description: >-
            A/B test ID. This is only included in the response for indices that
            are part of an A/B test.
        abTestVariantID:
          type: integer
          minimum: 1
          description: >-
            Variant ID. This is only included in the response for indices that
            are part of an A/B test.
        aroundLatLng:
          type: string
          description: Computed geographical location.
          example: 40.71,-74.01
          pattern: ^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$
        automaticRadius:
          type: string
          description: Distance from a central coordinate provided by `aroundLatLng`.
        exhaustive:
          type: object
          title: exhaustive
          description: >-
            Whether certain properties of the search response are calculated
            exhaustive (exact) or approximated.
          properties:
            facetsCount:
              type: boolean
              title: facetsCount
              description: >-
                Whether the facet count is exhaustive (`true`) or approximate
                (`false`). See the [related
                discussion](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
            facetValues:
              type: boolean
              title: facetValues
              description: The value is `false` if not all facet values are retrieved.
            nbHits:
              type: boolean
              title: nbHits
              description: >-
                Whether the `nbHits` is exhaustive (`true`) or approximate
                (`false`). When the query takes more than 50ms to be processed,
                the engine makes an approximation. This can happen when using
                complex filters on millions of records, when typo-tolerance was
                not exhaustive, or when enough hits have been retrieved (for
                example, after the engine finds 10,000 exact matches). `nbHits`
                is reported as non-exhaustive whenever an approximation is made,
                even if the approximation didn’t, in the end, impact the
                exhaustivity of the query.
            rulesMatch:
              type: boolean
              title: rulesMatch
              description: >-
                Rules matching exhaustivity. The value is `false` if rules were
                enable for this query, and could not be fully processed due a
                timeout. This is generally caused by the number of alternatives
                (such as typos) which is too large.
            typo:
              type: boolean
              title: typo
              description: >-
                Whether the typo search was exhaustive (`true`) or approximate
                (`false`). An approximation is done when the typo search query
                part takes more than 10% of the query budget (ie. 5ms by
                default) to be processed (this can happen when a lot of typo
                alternatives exist for the query). This field will not be
                included when typo-tolerance is entirely disabled.
        exhaustiveFacetsCount:
          $ref: '#/components/schemas/exhaustiveFacetsCount'
        exhaustiveNbHits:
          type: boolean
          description: See the `nbHits` field of the `exhaustive` object in the response.
          deprecated: true
        exhaustiveTypo:
          type: boolean
          description: See the `typo` field of the `exhaustive` object in the response.
          deprecated: true
        facets:
          title: facets
          type: object
          additionalProperties:
            x-additionalPropertiesName: facet
            type: object
            additionalProperties:
              x-additionalPropertiesName: facet count
              type: integer
          description: Facet counts.
          example:
            category:
              food: 1
              tech: 42
        facets_stats:
          title: facetsStats
          type: object
          description: Statistics for numerical facets.
          additionalProperties:
            type: object
            title: facetStats
            properties:
              min:
                type: number
                format: double
                description: Minimum value in the results.
              max:
                type: number
                format: double
                description: Maximum value in the results.
              avg:
                type: number
                format: double
                description: Average facet value in the results.
              sum:
                type: number
                format: double
                description: Sum of all values in the results.
        hitsPerPage:
          $ref: '#/components/schemas/hitsPerPage'
        index:
          type: string
          example: indexName
          description: Index name used for the query.
        indexUsed:
          type: string
          description: >-
            Index name used for the query. During A/B testing, the targeted
            index isn't always the index used by the query.
          example: indexNameAlt
        message:
          type: string
          description: Warnings about the query.
        nbHits:
          $ref: '#/components/schemas/nbHits'
        nbPages:
          $ref: '#/components/schemas/nbPages'
        nbSortedHits:
          type: integer
          description: Number of hits selected and sorted by the relevant sort algorithm.
          example: 20
        page:
          $ref: '#/components/schemas/page'
        parsedQuery:
          type: string
          description: >-
            Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean)
            query string that will be searched.
          example: george clo
        processingTimeMS:
          $ref: '#/components/schemas/processingTimeMS'
        processingTimingsMS:
          type: object
          description: >-
            Experimental. List of processing steps and their times, in
            milliseconds. You can use this list to investigate performance
            issues.
        queryAfterRemoval:
          type: string
          description: >-
            Markup text indicating which parts of the original query have been
            removed to retrieve a non-empty result set.
        redirect:
          title: redirect
          type: object
          description: >
            [Redirect results to a
            URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/).
          properties:
            index:
              type: array
              items:
                $ref: '#/components/schemas/RedirectRuleIndexMetadata'
        renderingContent:
          $ref: '#/components/schemas/renderingContent'
        serverTimeMS:
          type: integer
          description: Time the server took to process the request, in milliseconds.
          example: 20
        serverUsed:
          type: string
          description: Host name of the server that processed the request.
          example: c2-uk-3.algolia.net
        userData:
          $ref: '#/components/schemas/userData'
        queryID:
          type: string
          description: >-
            Unique identifier for the query. This is used for [click
            analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
          example: a00dbc80a8d13c4565a442e7e2dca80a
    objectID:
      type: string
      description: Unique record identifier.
      example: test-record-123
    highlightedValue:
      type: string
      description: Highlighted attribute value, including HTML tags.
      example: <em>George</em> <em>Clo</em>oney
    matchLevel:
      type: string
      description: Whether the whole query string matches or only a part.
      enum:
        - none
        - partial
        - full
    highlightResultOption:
      type: object
      description: Surround words that match the query with HTML tags for highlighting.
      additionalProperties: false
      properties:
        value:
          $ref: '#/components/schemas/highlightedValue'
        matchLevel:
          $ref: '#/components/schemas/matchLevel'
        matchedWords:
          type: array
          description: List of matched words from the search query.
          example:
            - action
          items:
            type: string
        fullyHighlighted:
          type: boolean
          description: Whether the entire attribute value is highlighted.
      required:
        - value
        - matchLevel
        - matchedWords
    highlightResultOptionMap:
      type: object
      description: Surround words that match the query with HTML tags for highlighting.
      additionalProperties:
        x-additionalPropertiesName: attribute
        $ref: '#/components/schemas/highlightResultOption'
    highlightResultOptionArray:
      type: array
      description: Surround words that match the query with HTML tags for highlighting.
      items:
        $ref: '#/components/schemas/highlightResultOption'
    highlightResult:
      oneOf:
        - $ref: '#/components/schemas/highlightResultOption'
        - $ref: '#/components/schemas/highlightResultOptionMap'
        - $ref: '#/components/schemas/highlightResultOptionArray'
    highlightResultMap:
      type: object
      description: Surround words that match the query with HTML tags for highlighting.
      additionalProperties:
        x-additionalPropertiesName: attribute
        $ref: '#/components/schemas/highlightResult'
    snippetResultOption:
      type: object
      description: Snippets that show the context around a matching search query.
      additionalProperties: false
      properties:
        value:
          $ref: '#/components/schemas/highlightedValue'
        matchLevel:
          $ref: '#/components/schemas/matchLevel'
      required:
        - value
        - matchLevel
    snippetResultOptionMap:
      type: object
      description: Snippets that show the context around a matching search query.
      additionalProperties:
        x-additionalPropertiesName: attribute
        $ref: '#/components/schemas/snippetResultOption'
    snippetResultOptionArray:
      type: array
      description: Snippets that show the context around a matching search query.
      items:
        $ref: '#/components/schemas/snippetResultOption'
    snippetResult:
      oneOf:
        - $ref: '#/components/schemas/snippetResultOption'
        - $ref: '#/components/schemas/snippetResultOptionMap'
        - $ref: '#/components/schemas/snippetResultOptionArray'
    snippetResultMap:
      type: object
      description: Snippets that show the context around a matching search query.
      additionalProperties:
        x-additionalPropertiesName: attribute
        $ref: '#/components/schemas/snippetResult'
    matchedGeoLocation:
      type: object
      properties:
        lat:
          type: number
          format: double
          description: Latitude of the matched location.
        lng:
          type: number
          format: double
          description: Longitude of the matched location.
        distance:
          type: integer
          description: >-
            Distance between the matched location and the search location (in
            meters).
    personalization:
      type: object
      properties:
        filtersScore:
          type: integer
          description: The score of the filters.
        rankingScore:
          type: integer
          description: The score of the ranking.
        score:
          type: integer
          description: The score of the event.
    rankingInfo:
      type: object
      description: Object with detailed information about the record's ranking.
      additionalProperties: false
      properties:
        filters:
          type: integer
          minimum: 0
          description: Whether a filter matched the query.
        firstMatchedWord:
          type: integer
          minimum: 0
          description: >-
            Position of the first matched word in the best matching attribute of
            the record.
        geoDistance:
          type: integer
          minimum: 0
          description: >-
            Distance between the geo location in the search query and the best
            matching geo location in the record, divided by the geo precision
            (in meters).
        geoPrecision:
          type: integer
          minimum: 1
          description: Precision used when computing the geo distance, in meters.
        matchedGeoLocation:
          $ref: '#/components/schemas/matchedGeoLocation'
        personalization:
          $ref: '#/components/schemas/personalization'
        nbExactWords:
          type: integer
          minimum: 0
          description: Number of exactly matched words.
        nbTypos:
          type: integer
          minimum: 0
          description: Number of typos encountered when matching the record.
        promoted:
          type: boolean
          description: Whether the record was promoted by a rule.
        proximityDistance:
          type: integer
          minimum: 0
          description: >-
            Number of words between multiple matches in the query plus 1. For
            single word queries, `proximityDistance` is 0.
        userScore:
          type: integer
          description: >-
            Overall ranking of the record, expressed as a single integer. This
            attribute is internal.
        words:
          type: integer
          minimum: 1
          description: Number of matched words.
        promotedByReRanking:
          type: boolean
          description: Whether the record is re-ranked.
      required:
        - promoted
        - nbTypos
        - firstMatchedWord
        - geoDistance
        - nbExactWords
        - words
        - filters
        - userScore
    _distinctSeqID:
      type: integer
    hit:
      type: object
      description: >
        Search result.


        A hit is a record from your index, augmented with special attributes for
        highlighting, snippeting, and ranking.
      x-is-generic: true
      additionalProperties: true
      required:
        - objectID
      properties:
        objectID:
          $ref: '#/components/schemas/objectID'
        _highlightResult:
          $ref: '#/components/schemas/highlightResultMap'
        _snippetResult:
          $ref: '#/components/schemas/snippetResultMap'
        _rankingInfo:
          $ref: '#/components/schemas/rankingInfo'
        _distinctSeqID:
          $ref: '#/components/schemas/_distinctSeqID'
    searchHits:
      type: object
      additionalProperties: true
      properties:
        hits:
          type: array
          description: >
            Search results (hits).


            Hits are records from your index that match the search criteria,
            augmented with additional attributes, such as, for highlighting.
          items:
            $ref: '#/components/schemas/hit'
        query:
          $ref: '#/components/schemas/query'
        params:
          type: string
          description: URL-encoded string of all search parameters.
          example: query=a&hitsPerPage=20
      required:
        - hits
        - query
        - params
    searchResponse:
      additionalProperties: true
      allOf:
        - $ref: '#/components/schemas/baseSearchResponse'
        - $ref: '#/components/schemas/searchHits'
    indexName:
      type: string
      example: products
      description: Index name (case-sensitive).
    searchTypeDefault:
      type: string
      enum:
        - default
      default: default
      description: >
        - `default`: perform a search query

        - `facet` [searches for facet
        values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
    searchForHitsOptions:
      x-is-SearchForHitsOptions: true
      type: object
      properties:
        indexName:
          $ref: '#/components/schemas/indexName'
        type:
          $ref: '#/components/schemas/searchTypeDefault'
      required:
        - indexName
    SearchForHits:
      allOf:
        - $ref: '#/components/schemas/searchParams'
        - $ref: '#/components/schemas/searchForHitsOptions'
    facetQuery:
      type: string
      description: Text to search inside the facet's values.
      example: george
      default: ''
    searchTypeFacet:
      type: string
      enum:
        - facet
      default: facet
      description: >
        - `default`: perform a search query

        - `facet` [searches for facet
        values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
    searchForFacetsOptions:
      type: object
      properties:
        facet:
          type: string
          description: Facet name.
        indexName:
          $ref: '#/components/schemas/indexName'
        facetQuery:
          $ref: '#/components/schemas/facetQuery'
        maxFacetHits:
          $ref: '#/components/schemas/maxFacetHits'
        type:
          $ref: '#/components/schemas/searchTypeFacet'
      required:
        - indexName
        - type
        - facet
    SearchForFacets:
      allOf:
        - $ref: '#/components/schemas/searchParams'
        - $ref: '#/components/schemas/searchForFacetsOptions'
      x-discriminator-fields:
        - facet
        - type
    SearchQuery:
      oneOf:
        - $ref: '#/components/schemas/SearchForHits'
        - $ref: '#/components/schemas/SearchForFacets'
    searchStrategy:
      type: string
      enum:
        - none
        - stopIfEnoughMatches
      description: >
        Strategy for multiple search queries:


        - `none`. Run all queries.

        - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as
        a query matches at least the `hitsPerPage` number of results.
    searchForFacetValuesResponse:
      type: object
      additionalProperties: false
      required:
        - facetHits
        - exhaustiveFacetsCount
      x-discriminator-fields:
        - facetHits
      properties:
        facetHits:
          type: array
          description: Matching facet values.
          items:
            type: object
            title: facetHits
            additionalProperties: false
            required:
              - value
              - highlighted
              - count
            properties:
              value:
                description: Facet value.
                example: Mobile phone
                type: string
              highlighted:
                $ref: '#/components/schemas/highlightedValue'
              count:
                description: >-
                  Number of records with this facet value. [The count may be
                  approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
                type: integer
        exhaustiveFacetsCount:
          $ref: '#/components/schemas/exhaustiveFacetsCount'
        processingTimeMS:
          $ref: '#/components/schemas/processingTimeMS'
    searchResult:
      oneOf:
        - $ref: '#/components/schemas/searchResponse'
        - $ref: '#/components/schemas/searchForFacetValuesResponse'
    cursor:
      type: object
      additionalProperties: false
      properties:
        cursor:
          type: string
          description: >
            Cursor to get the next page of the response.


            The parameter must match the value returned in the response of a
            previous request.

            The last page of the response does not return a `cursor` attribute.
          example: jMDY3M2MwM2QwMWUxMmQwYWI0ZTN
    browseParamsObject:
      allOf:
        - $ref: '#/components/schemas/searchParamsObject'
        - $ref: '#/components/schemas/cursor'
    browseParams:
      oneOf:
        - $ref: '#/components/schemas/searchParamsString'
        - $ref: '#/components/schemas/browseParamsObject'
    browseResponse:
      allOf:
        - $ref: '#/components/schemas/baseSearchResponse'
        - $ref: '#/components/schemas/searchHits'
        - $ref: '#/components/schemas/cursor'
    createdAt:
      type: string
      example: '2023-07-04T12:49:15Z'
      description: Date and time when the object was created, in RFC 3339 format.
    taskID:
      type: integer
      format: int64
      example: 1514562690001
      description: >
        Unique identifier of a task.


        A successful API response means that a task was added to a queue. It
        might not run immediately. You can check the task's progress with the
        [`task` operation](#tag/Indices/operation/getTask) and this `taskID`.
    deletedAt:
      type: string
      example: '2023-06-27T14:42:38.831Z'
      description: Date and time when the object was deleted, in RFC 3339 format.
    attribute:
      type: string
      description: Value of the attribute to update.
    updatedAt:
      type: string
      example: '2023-07-04T12:49:15Z'
      description: Date and time when the object was updated, in RFC 3339 format.
    deleteByParams:
      type: object
      additionalProperties: false
      properties:
        facetFilters:
          $ref: '#/components/schemas/facetFilters'
        filters:
          $ref: '#/components/schemas/filters'
        numericFilters:
          $ref: '#/components/schemas/numericFilters'
        tagFilters:
          $ref: '#/components/schemas/tagFilters'
        aroundLatLng:
          $ref: '#/components/schemas/aroundLatLng'
        aroundRadius:
          $ref: '#/components/schemas/aroundRadius'
        insideBoundingBox:
          $ref: '#/components/schemas/insideBoundingBox'
        insidePolygon:
          $ref: '#/components/schemas/insidePolygon'
    builtInOperationType:
      type: string
      enum:
        - Increment
        - Decrement
        - Add
        - Remove
        - AddUnique
        - IncrementFrom
        - IncrementSet
      description: How to change the attribute.
    builtInOperation:
      type: object
      description: Update to perform on the attribute.
      additionalProperties: false
      properties:
        _operation:
          $ref: '#/components/schemas/builtInOperationType'
        value:
          type: string
          description: >-
            Value that corresponds to the operation, for example an `Increment`
            or `Decrement` step, or an `Add` or `Remove` value.
      required:
        - _operation
        - value
    attributeToUpdate:
      oneOf:
        - $ref: '#/components/schemas/attribute'
        - $ref: '#/components/schemas/builtInOperation'
    action:
      type: string
      enum:
        - addObject
        - updateObject
        - partialUpdateObject
        - partialUpdateObjectNoCreate
        - deleteObject
        - delete
        - clear
      description: Type of indexing operation.
    objectIDs:
      type: array
      items:
        type: string
      example:
        - record-1
        - record-2
      description: Unique record identifiers.
    baseIndexSettings:
      type: object
      title: Index settings.
      additionalProperties: false
      properties:
        attributesForFaceting:
          type: array
          items:
            type: string
          example:
            - author
            - filterOnly(isbn)
            - searchable(edition)
            - afterDistinct(category)
            - afterDistinct(searchable(publisher))
          description: >
            Attributes used for
            [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/).


            Facets are attributes that let you categorize search results.

            They can be used for filtering search results.

            By default, no attribute is used for faceting.

            Attribute names are case-sensitive.


            **Modifiers**


            - `filterOnly("ATTRIBUTE")`.
              Allows using this attribute as a filter, but doesn't evalue the facet values.

            - `searchable("ATTRIBUTE")`.
              Allows searching for facet values.

            - `afterDistinct("ATTRIBUTE")`.
              Evaluates the facet count _after_ deduplication with `distinct`.
              This ensures accurate facet counts.
              You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
          default: []
          x-categories:
            - Faceting
        replicas:
          type: array
          items:
            type: string
          example:
            - virtual(prod_products_price_asc)
            - dev_products_replica
          description: >
            Creates [replica
            indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/).


            Replicas are copies of a primary index with the same records but
            different settings, synonyms, or rules.

            If you want to offer a different ranking or sorting of your search
            results, you'll use replica indices.

            All index operations on a primary index are automatically forwarded
            to its replicas.

            To add a replica index, you must provide the complete set of
            replicas to this parameter.

            If you omit a replica from this list, the replica turns into a
            regular, standalone index that will no longer by synced with the
            primary index.


            **Modifier**


            - `virtual("REPLICA")`.
              Create a virtual replica,
              Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
          default: []
          x-categories:
            - Ranking
        paginationLimitedTo:
          type: integer
          example: 100
          description: >
            Maximum number of search results that can be obtained through
            pagination.


            Higher pagination limits might slow down your search.

            For pagination limits above 1,000, the sorting of results beyond the
            1,000th hit can't be guaranteed.
          default: 1000
          maximum: 20000
        unretrievableAttributes:
          type: array
          items:
            type: string
          example:
            - total_sales
          description: >
            Attributes that can't be retrieved at query time.


            This can be useful if you want to use an attribute for ranking or to
            [restrict
            access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/),

            but don't want to include it in the search results.

            Attribute names are case-sensitive.
          default: []
          x-categories:
            - Attributes
        disableTypoToleranceOnWords:
          type: array
          items:
            type: string
          example:
            - wheel
            - 1X2BCD
          description: >
            Words for which you want to turn off [typo
            tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).

            This also turns off [word splitting and
            concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/)
            for the specified words.
          default: []
          x-categories:
            - Typos
        attributesToTransliterate:
          description: >
            Attributes, for which you want to support [Japanese
            transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead).


            Transliteration supports searching in any of the Japanese writing
            systems.

            To support transliteration, you must set the indexing language to
            Japanese.

            Attribute names are case-sensitive.
          type: array
          items:
            type: string
          example:
            - name
            - description
          x-categories:
            - Languages
        camelCaseAttributes:
          type: array
          items:
            type: string
          example:
            - description
          description: >
            Attributes for which to split [camel
            case](https://wikipedia.org/wiki/Camel_case) words.

            Attribute names are case-sensitive.
          default: []
          x-categories:
            - Languages
        decompoundedAttributes:
          type: object
          example:
            de:
              - name
          description: >
            Searchable attributes to which Algolia should apply [word
            segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/)
            (decompounding).

            Attribute names are case-sensitive.


            Compound words are formed by combining two or more individual words,

            and are particularly prevalent in Germanic languages—for example,
            "firefighter".

            With decompounding, the individual components are indexed
            separately.


            You can specify different lists for different languages.

            Decompounding is supported for these languages:

            Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish
            (`sv`), and Norwegian (`no`).
          default: {}
          x-categories:
            - Languages
        indexLanguages:
          type: array
          items:
            $ref: '#/components/schemas/supportedLanguage'
          example:
            - ja
          description: >
            Languages for language-specific processing steps, such as word
            detection and dictionary settings.


            **You should always specify an indexing language.**

            If you don't specify an indexing language, the search engine uses
            all [supported
            languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),

            or the languages you specified with the `ignorePlurals` or
            `removeStopWords` parameters.

            This can lead to unexpected search results.

            For more information, see [Language-specific
            configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
          default: []
          x-categories:
            - Languages
        disablePrefixOnAttributes:
          type: array
          items:
            type: string
          example:
            - sku
          description: >
            Searchable attributes for which you want to turn off [prefix
            matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).

            Attribute names are case-sensitive.
          default: []
          x-categories:
            - Query strategy
        allowCompressionOfIntegerArray:
          type: boolean
          description: >
            Whether arrays with exclusively non-negative integers should be
            compressed for better performance.

            If true, the compressed arrays may be reordered.
          default: false
          x-categories:
            - Performance
        numericAttributesForFiltering:
          type: array
          items:
            type: string
          description: >
            Numeric attributes that can be used as [numerical
            filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters).

            Attribute names are case-sensitive.


            By default, all numeric attributes are available as numerical
            filters.

            For faster indexing, reduce the number of numeric attributes.


            If you want to turn off filtering for all numeric attributes,
            specifiy an attribute that doesn't exist in your index, such as
            `NO_NUMERIC_FILTERING`.


            **Modifier**


            - `equalOnly("ATTRIBUTE")`.
              Support only filtering based on equality comparisons `=` and `!=`.
          example:
            - equalOnly(quantity)
            - popularity
          default: []
          x-categories:
            - Performance
        separatorsToIndex:
          type: string
          example: +#
          description: >
            Controls which separators are indexed.


            Separators are all non-letter characters except spaces and currency
            characters, such as $€£¥.

            By default, separator characters aren't indexed.

            With `separatorsToIndex`, Algolia treats separator characters as
            separate words.

            For example, a search for `C#` would report two matches.
          default: ''
          x-categories:
            - Typos
        searchableAttributes:
          type: array
          items:
            type: string
          example:
            - title,alternative_title
            - author
            - unordered(text)
            - emails.personal
          description: >
            Attributes used for searching. Attribute names are case-sensitive.


            By default, all attributes are searchable and the
            [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute)
            ranking criterion is turned off.

            With a non-empty list, Algolia only returns results with matches in
            the selected attributes.

            In addition, the Attribute ranking criterion is turned on: matches
            in attributes that are higher in the list of `searchableAttributes`
            rank first.

            To make matches in two attributes rank equally, include them in a
            comma-separated string, such as `"title,alternate_title"`.

            Attributes with the same priority are always unordered.


            For more information, see [Searchable
            attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/).


            **Modifier**


            - `unordered("ATTRIBUTE")`.
              Ignore the position of a match within the attribute.

            Without modifier, matches at the beginning of an attribute rank
            higer than matches at the end.
          default: []
          x-categories:
            - Attributes
        userData:
          $ref: '#/components/schemas/userData'
        customNormalization:
          description: >
            Characters and their normalized replacements.

            This overrides Algolia's default
            [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
          type: object
          example:
            default:
              ä: ae
              ü: ue
          additionalProperties:
            type: object
            additionalProperties:
              type: string
          x-categories:
            - Languages
        attributeForDistinct:
          description: >
            Attribute that should be used to establish groups of results.

            Attribute names are case-sensitive.


            All records with the same value for this attribute are considered a
            group.

            You can combine `attributeForDistinct` with the `distinct` search
            parameter to control

            how many items per group are included in the search results.


            If you want to use the same attribute also for faceting, use the
            `afterDistinct` modifier of the `attributesForFaceting` setting.

            This applies faceting _after_ deduplication, which will result in
            accurate facet counts.
          example: url
          type: string
    indexSettings:
      description: Index settings.
      allOf:
        - $ref: '#/components/schemas/baseIndexSettings'
        - $ref: '#/components/schemas/indexSettingsAsSearchParams'
    SynonymType:
      type: string
      description: Synonym type.
      example: onewaysynonym
      enum:
        - synonym
        - onewaysynonym
        - altcorrection1
        - altcorrection2
        - placeholder
    synonymHit:
      type: object
      description: Synonym object.
      additionalProperties: false
      properties:
        objectID:
          type: string
          description: Unique identifier of a synonym object.
          example: synonymID
        type:
          $ref: '#/components/schemas/SynonymType'
        synonyms:
          type: array
          items:
            type: string
          description: Words or phrases considered equivalent.
          example:
            - vehicle
            - auto
        input:
          type: string
          description: >-
            Word or phrase to appear in query strings (for
            [`onewaysynonym`s](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/one-way-synonyms/)).
          example: car
        word:
          type: string
          description: >-
            Word or phrase to appear in query strings (for [`altcorrection1` and
            `altcorrection2`](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-alternative-corrections/)).
          example: car
        corrections:
          type: array
          items:
            type: string
          description: Words to be matched in records.
          example:
            - vehicle
            - auto
        placeholder:
          type: string
          description: >
            [Placeholder
            token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/)
            to be put inside records.
          example: <Street>
        replacements:
          type: array
          items:
            type: string
          description: >-
            Query words that will match the [placeholder
            token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/).
          example:
            - street
            - st
      required:
        - objectID
        - type
    id:
      type: string
      example: '12'
      description: Unique identifier of a synonym object.
    synonymHits:
      type: array
      description: Matching synonyms.
      items:
        $ref: '#/components/schemas/synonymHit'
    searchSynonymsResponse:
      type: object
      additionalProperties: true
      properties:
        hits:
          $ref: '#/components/schemas/synonymHits'
        nbHits:
          $ref: '#/components/schemas/nbHits'
      required:
        - hits
        - nbHits
    keyString:
      type: string
      description: API key.
      example: 13ad45b4d0a2f6ea65ecbddf6aa260f2
    createdAtTimestamp:
      type: integer
      format: int64
      example: 1656345570000
      description: >-
        Timestamp when the object was created, in milliseconds since the Unix
        epoch.
    baseGetApiKeyResponse:
      type: object
      additionalProperties: false
      properties:
        value:
          $ref: '#/components/schemas/keyString'
        createdAt:
          $ref: '#/components/schemas/createdAtTimestamp'
      required:
        - key
        - createdAt
    acl:
      description: Access control list permissions.
      type: string
      enum:
        - addObject
        - analytics
        - browse
        - deleteObject
        - deleteIndex
        - editSettings
        - inference
        - listIndexes
        - logs
        - personalization
        - recommendation
        - search
        - seeUnretrievableAttributes
        - settings
        - usage
    apiKey:
      type: object
      description: API key object.
      additionalProperties: false
      properties:
        acl:
          type: array
          description: >
            Permissions that determine the type of API requests this key can
            make.

            The required ACL is listed in each endpoint's reference.

            For more information, see [access control
            list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl).
          example:
            - search
            - addObject
          default: []
          items:
            $ref: '#/components/schemas/acl'
        description:
          type: string
          description: Description of an API key to help you identify this API key.
          example: Used for indexing by the CLI
          default: ''
        indexes:
          type: array
          description: >
            Index names or patterns that this API key can access.

            By default, an API key can access all indices in the same
            application.


            You can use leading and trailing wildcard characters (`*`):


            - `dev_*` matches all indices starting with "dev_".

            - `*_dev` matches all indices ending with "_dev".

            - `*_products_*` matches all indices containing "_products_".
          example:
            - dev_*
            - prod_en_products
          default: []
          items:
            type: string
        maxHitsPerQuery:
          type: integer
          description: |
            Maximum number of results this API key can retrieve in one query.
            By default, there's no limit.
          default: 0
        maxQueriesPerIPPerHour:
          type: integer
          description: >
            Maximum number of API requests allowed per IP address or [user
            token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/)
            per hour.


            If this limit is reached, the API returns an error with status code
            `429`.

            By default, there's no limit.
          default: 0
        queryParameters:
          type: string
          description: >
            Query parameters to add when making API requests with this API key.


            To restrict this API key to specific IP addresses, add the
            `restrictSources` parameter.

            You can only add a single source, but you can provide a range of IP
            addresses.


            Creating an API key fails if the request is made from an IP address
            that's outside the restricted range.
          example: typoTolerance=strict&restrictSources=192.168.1.0/24
          default: ''
        referers:
          type: array
          description: >
            Allowed HTTP referrers for this API key.


            By default, all referrers are allowed.

            You can use leading and trailing wildcard characters (`*`):


            - `https://algolia.com/*` allows all referrers starting with
            "https://algolia.com/"

            - `*.algolia.com` allows all referrers ending with ".algolia.com"

            - `*algolia.com*` allows all referrers in the domain "algolia.com".


            Like all HTTP headers, referrers can be spoofed. Don't rely on them
            to secure your data.

            For more information, see [HTTP referrer
            restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions).
          example:
            - '*algolia.com*'
          default: []
          items:
            type: string
        validity:
          type: integer
          description: |
            Duration (in seconds) after which the API key expires.
            By default, API keys don't expire.
          example: 86400
          default: 0
      required:
        - acl
    getApiKeyResponse:
      allOf:
        - $ref: '#/components/schemas/baseGetApiKeyResponse'
        - $ref: '#/components/schemas/apiKey'
    addApiKeyResponse:
      type: object
      additionalProperties: false
      properties:
        key:
          $ref: '#/components/schemas/keyString'
        createdAt:
          $ref: '#/components/schemas/createdAt'
      required:
        - key
        - createdAt
    ruleID:
      title: objectID
      type: string
      description: Unique identifier of a rule object.
    anchoring:
      type: string
      description: |
        Which part of the search query the pattern should match:

        - `startsWith`. The pattern must match the begginning of the query.
        - `endsWith`. The pattern must match the end of the query.
        - `is`. The pattern must match the query exactly.
        - `contains`. The pattern must match anywhere in the query.

        Empty queries are only allowed as pattern with `anchoring: is`.
      enum:
        - is
        - startsWith
        - endsWith
        - contains
    context:
      type: string
      pattern: '[A-Za-z0-9_-]+'
      description: >
        An additional restriction that only triggers the rule, when the search
        has the same value as `ruleContexts` parameter.

        For example, if `context: mobile`, the rule is only triggered when the
        search request has a matching `ruleContexts: mobile`.

        A rule context must only contain alphanumeric characters.
      example: mobile
    condition:
      type: object
      additionalProperties: false
      properties:
        pattern:
          type: string
          description: >
            Query pattern that triggers the rule.


            You can use either a literal string, or a special pattern
            `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name.

            The rule is triggered if the query matches the literal string or a
            value of the specified facet.

            For example, with `pattern: {facet:genre}`, the rule is triggered
            when users search for a genre, such as "comedy".
          example: '{facet:genre}'
        anchoring:
          $ref: '#/components/schemas/anchoring'
        alternatives:
          type: boolean
          description: Whether the pattern should match plurals, synonyms, and typos.
          default: false
        context:
          $ref: '#/components/schemas/context'
        filters:
          type: string
          description: >
            Filters that trigger the rule.


            You can add add filters using the syntax `facet:value` so that the
            rule is triggered, when the specific filter is selected.

            You can use `filters` on its own or combine it with the `pattern`
            parameter.
          example: genre:comedy
    editType:
      description: Type of edit.
      type: string
      enum:
        - remove
        - replace
    edit:
      type: object
      additionalProperties: false
      properties:
        type:
          $ref: '#/components/schemas/editType'
        delete:
          description: Text or patterns to remove from the query string.
          type: string
        insert:
          description: >-
            Text to be added in place of the deleted text inside the query
            string.
          type: string
    consequenceQueryObject:
      type: object
      additionalProperties: false
      properties:
        remove:
          description: Words to remove from the search query.
          type: array
          items:
            type: string
        edits:
          description: Changes to make to the search query.
          type: array
          items:
            $ref: '#/components/schemas/edit'
    consequenceQuery:
      description: >
        Replace or edit the search query.


        If `consequenceQuery` is a string, the entire search query is replaced
        with that string.

        If `consequenceQuery` is an object, it describes incremental edits made
        to the query.
      oneOf:
        - $ref: '#/components/schemas/consequenceQueryObject'
        - type: string
    automaticFacetFilter:
      type: object
      description: Filter or optional filter to be applied to the search.
      additionalProperties: false
      properties:
        facet:
          type: string
          description: >
            Facet name to be applied as filter.

            The name must match placeholders in the `pattern` parameter.

            For example, with `pattern: {facet:genre}`, `automaticFacetFilters`
            must be `genre`.
        score:
          type: integer
          default: 1
          description: Filter scores to give different weights to individual filters.
        disjunctive:
          type: boolean
          default: false
          description: >
            Whether the filter is disjunctive or conjunctive.


            If true the filter has multiple matches, multiple occurences are
            combined with the logical `OR` operation.

            If false, multiple occurences are combined with the logical `AND`
            operation.
      required:
        - facet
    automaticFacetFilters:
      description: >
        Filter to be applied to the search.


        You can use this to respond to search queries that match a facet value.

        For example, if users search for "comedy", which matches a facet value
        of the "genre" facet,

        you can filter the results to show the top-ranked comedy movies.
      oneOf:
        - type: array
          items:
            $ref: '#/components/schemas/automaticFacetFilter'
        - type: array
          items:
            type: string
    params:
      type: object
      description: >
        Parameters to apply to this search.


        You can use all search parameters, plus special `automaticFacetFilters`,
        `automaticOptionalFacetFilters`, and `query`.
      additionalProperties: false
      properties:
        query:
          $ref: '#/components/schemas/consequenceQuery'
        automaticFacetFilters:
          $ref: '#/components/schemas/automaticFacetFilters'
        automaticOptionalFacetFilters:
          $ref: '#/components/schemas/automaticFacetFilters'
        renderingContent:
          $ref: '#/components/schemas/renderingContent'
    consequenceParams:
      allOf:
        - $ref: '#/components/schemas/baseSearchParamsWithoutQuery'
        - $ref: '#/components/schemas/indexSettingsAsSearchParams'
        - $ref: '#/components/schemas/params'
    promotePosition:
      type: integer
      description: >-
        Position in the search results where you want to show the promoted
        records.
      example: 0
    promoteObjectIDs:
      title: objectIDs
      description: Records to promote.
      type: object
      additionalProperties: false
      properties:
        objectIDs:
          type: array
          maxItems: 100
          description: |
            Object IDs of the records you want to promote.

            The records are placed as a group at the `position`.
            For example, if you want to promote four records to position `0`,
            they will be the first four search results.
          items:
            $ref: '#/components/schemas/objectID'
        position:
          $ref: '#/components/schemas/promotePosition'
      required:
        - position
        - objectIDs
    promoteObjectID:
      title: objectID
      description: Record to promote.
      type: object
      additionalProperties: false
      properties:
        objectID:
          $ref: '#/components/schemas/objectID'
        position:
          $ref: '#/components/schemas/promotePosition'
      required:
        - position
        - objectID
    promote:
      oneOf:
        - $ref: '#/components/schemas/promoteObjectIDs'
        - $ref: '#/components/schemas/promoteObjectID'
    consequence:
      type: object
      description: >
        Effect of the rule.


        For more information, see
        [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).
      additionalProperties: false
      properties:
        params:
          $ref: '#/components/schemas/consequenceParams'
        promote:
          type: array
          maxItems: 300
          description: >
            Records you want to pin to a specific position in the search
            results.


            You can promote up to 300 records, either individually, or as groups
            of up to 100 records each.
          items:
            $ref: '#/components/schemas/promote'
        filterPromotes:
          type: boolean
          default: false
          description: >
            Whether promoted records must match an active filter for the
            consequence to be applied.


            This ensures that user actions (filtering the search) are given a
            higher precendence.

            For example, if you promote a record with the `color: red`
            attribute, and the user filters the search for `color: blue`,

            the "red" record won't be shown.
        hide:
          type: array
          maxItems: 50
          description: Records you want to hide from the search results.
          items:
            title: consequenceHide
            type: object
            description: Object ID of the record to hide.
            additionalProperties: false
            properties:
              objectID:
                $ref: '#/components/schemas/objectID'
            required:
              - objectID
        userData:
          description: >
            A JSON object with custom data that will be appended to the
            `userData` array in the response.

            This object isn't interpreted by the API and is limited to 1&nbsp;kB
            of minified JSON.
          example:
            settingID: f2a7b51e3503acc6a39b3784ffb84300
            pluginVersion: 1.6.0
    timeRange:
      type: object
      additionalProperties: false
      properties:
        from:
          type: integer
          description: When the rule should start to be active, in Unix epoch time.
        until:
          type: integer
          description: When the rule should stop to be active, in Unix epoch time.
      required:
        - from
        - until
    rule:
      type: object
      description: Rule object.
      additionalProperties: false
      properties:
        objectID:
          $ref: '#/components/schemas/ruleID'
        conditions:
          type: array
          minItems: 0
          maxItems: 25
          description: >
            Conditions that trigger a rule.


            Some consequences require specific conditions or don't require any
            condition.

            For more information, see
            [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions).
          items:
            $ref: '#/components/schemas/condition'
        consequence:
          $ref: '#/components/schemas/consequence'
        description:
          type: string
          description: >-
            Description of the rule's purpose to help you distinguish between
            different rules.
          example: Display a promotional banner
        enabled:
          type: boolean
          default: true
          description: Whether the rule is active.
        validity:
          type: array
          description: Time periods when the rule is active.
          items:
            $ref: '#/components/schemas/timeRange'
      required:
        - objectID
    updatedRuleResponse:
      type: object
      additionalProperties: false
      properties:
        objectID:
          $ref: '#/components/schemas/ruleID'
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
        taskID:
          $ref: '#/components/schemas/taskID'
      required:
        - objectID
        - updatedAt
        - taskID
    parameters_query:
      type: string
      description: Search query for rules.
      default: ''
    parameters_page:
      type: integer
      minimum: 0
      description: Requested page of the API response.
    parameters_hitsPerPage:
      type: integer
      default: 20
      minimum: 1
      maximum: 1000
      description: Maximum number of hits per page.
    dictionaryType:
      type: string
      enum:
        - plurals
        - stopwords
        - compounds
    dictionaryAction:
      type: string
      enum:
        - addEntry
        - deleteEntry
      description: Actions to perform.
    dictionaryEntryState:
      type: string
      enum:
        - enabled
        - disabled
      default: enabled
      description: Whether a dictionary entry is active.
    dictionaryEntry:
      type: object
      description: Dictionary entry.
      additionalProperties: true
      required:
        - objectID
        - language
      properties:
        objectID:
          type: string
          description: Unique identifier for the dictionary entry.
          example: 828afd405e1f4fe950b6b98c2c43c032
        language:
          $ref: '#/components/schemas/supportedLanguage'
        word:
          type: string
          description: >-
            Matching dictionary word for `stopwords` and `compounds`
            dictionaries.
          example: the
        words:
          type: array
          description: Matching words in the `plurals` dictionary including declensions.
          example:
            - cheval
            - cheveaux
          items:
            type: string
        decomposition:
          type: array
          description: >-
            Invividual components of a compound word in the `compounds`
            dictionary.
          example:
            - kopf
            - schmerz
            - tablette
          items:
            type: string
        state:
          $ref: '#/components/schemas/dictionaryEntryState'
    searchDictionaryEntriesResponse:
      type: object
      additionalProperties: false
      properties:
        hits:
          type: array
          description: Dictionary entries matching the search criteria.
          items:
            $ref: '#/components/schemas/dictionaryEntry'
        page:
          $ref: '#/components/schemas/parameters_page'
        nbHits:
          $ref: '#/components/schemas/nbHits'
        nbPages:
          $ref: '#/components/schemas/nbPages'
      required:
        - hits
        - page
        - nbHits
        - nbPages
    standardEntry:
      oneOf:
        - type: object
          description: Key-value pair of a language ISO code and a boolean value.
          example:
            fr: false
          additionalProperties:
            x-additionalPropertiesName: language
            type: boolean
        - type: 'null'
    standardEntries:
      description: >
        Key-value pairs of [supported language ISO
        codes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/)
        and boolean values.
      additionalProperties: false
      properties:
        plurals:
          $ref: '#/components/schemas/standardEntry'
        stopwords:
          $ref: '#/components/schemas/standardEntry'
        compounds:
          $ref: '#/components/schemas/standardEntry'
    dictionaryLanguage:
      oneOf:
        - type: object
          additionalProperties: false
          description: >-
            Dictionary type. If `null`, this dictionary type isn't supported for
            the language.
          properties:
            nbCustomEntries:
              description: Number of custom dictionary entries.
              type: integer
        - type: 'null'
    languages:
      type: object
      description: Dictionary language.
      additionalProperties: false
      required:
        - plurals
        - stopwords
        - compounds
      properties:
        plurals:
          $ref: '#/components/schemas/dictionaryLanguage'
        stopwords:
          $ref: '#/components/schemas/dictionaryLanguage'
        compounds:
          $ref: '#/components/schemas/dictionaryLanguage'
    userID:
      type: string
      pattern: ^[a-zA-Z0-9 \-*.]+$
      description: Unique identifier of the user who makes the search request.
      example: user1
    userId:
      title: userID
      type: object
      description: Unique user ID.
      properties:
        userID:
          $ref: '#/components/schemas/userID'
        clusterName:
          type: string
          description: Cluster to which the user is assigned.
          example: c1-test
        nbRecords:
          type: integer
          description: Number of records belonging to the user.
          example: 42
        dataSize:
          type: integer
          description: Data size used by the user.
          example: 0
      required:
        - userID
        - clusterName
        - nbRecords
        - dataSize
    clusterName:
      type: string
      description: Cluster name.
      example: c11-test
    nbRecords:
      type: integer
      description: Number of records in the cluster.
      example: 3
    dataSize:
      type: integer
      description: Data size taken by all the users assigned to the cluster.
      example: 481
    source:
      description: Source.
      required:
        - source
      properties:
        source:
          description: IP address range of the source.
          type: string
          example: 10.0.0.1/32
        description:
          description: Source description.
          type: string
          example: Server subnet
    sources:
      description: Sources.
      type: array
      items:
        $ref: '#/components/schemas/source'
    logType:
      type: string
      enum:
        - all
        - query
        - build
        - error
      default: all
    taskStatus:
      type: string
      enum:
        - published
        - notPublished
      description: >-
        Task status, `published` if the task is completed, `notPublished`
        otherwise.
    operationType:
      type: string
      enum:
        - move
        - copy
      example: copy
      description: Operation to perform on the index.
    scopeType:
      type: string
      enum:
        - settings
        - synonyms
        - rules
    fetchedIndex:
      type: object
      additionalProperties: false
      properties:
        name:
          type: string
          description: Index name.
          example: movies
        createdAt:
          type: string
          description: >-
            Index creation date. An empty string means that the index has no
            records.
          example: '2022-09-19T16:36:44.471Z'
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
        entries:
          type: integer
          description: Number of records contained in the index.
          example: 100
        dataSize:
          type: integer
          description: Number of bytes of the index in minified format.
          example: 48450
        fileSize:
          type: integer
          description: Number of bytes of the index binary file.
          example: 112927
        lastBuildTimeS:
          type: integer
          description: Last build time.
          example: 3
        numberOfPendingTasks:
          type: integer
          default: 0
          description: >-
            Number of pending indexing operations. This value is deprecated and
            should not be used.
        pendingTask:
          type: boolean
          default: false
          description: >-
            A boolean which says whether the index has pending tasks. This value
            is deprecated and should not be used.
        primary:
          type: string
          description: >-
            Only present if the index is a replica. Contains the name of the
            related primary index.
          example: T02
        replicas:
          type: array
          items:
            type: string
          description: >-
            Only present if the index is a primary index with replicas. Contains
            the names of all linked replicas.
          example:
            - T02_push
            - T2replica
      required:
        - name
        - createdAt
        - updatedAt
        - entries
        - dataSize
        - fileSize
        - lastBuildTimeS
        - pendingTask
        - numberOfPendingTasks
    listIndicesResponse:
      type: object
      additionalProperties: false
      properties:
        items:
          type: array
          description: All indices in your Algolia application.
          items:
            $ref: '#/components/schemas/fetchedIndex'
        nbPages:
          type: integer
          description: Number of pages.
          example: 100
      required:
        - items
    apiKeyOperation:
      type: string
      enum:
        - add
        - delete
        - update
    securedAPIKeyRestrictions:
      type: object
      additionalProperties: false
      properties:
        searchParams:
          $ref: '#/components/schemas/searchParamsObject'
        filters:
          type: string
          description: >
            Filters that apply to every search made with the secured API key.

            Extra filters added at search time will be combined with `AND`.

            For example, if you set `group:admin` as fixed filter on your
            generated API key,

            and add `groups:visitors` to the search query, the complete set of
            filters will be `group:admin AND groups:visitors`.
        validUntil:
          type: integer
          format: int64
          description: >-
            Timestamp when the secured API key expires, measured in seconds
            since the Unix epoch.
        restrictIndices:
          type: array
          items:
            type: string
          description: >
            Index names or patterns that this API key can access.

            By default, an API key can access all indices in the same
            application.


            You can use leading and trailing wildcard characters (`*`):


            - `dev_*` matches all indices starting with "dev_".

            - `*_dev` matches all indices ending with "_dev".

            - `*_products_*` matches all indices containing "_products_".
        restrictSources:
          type: string
          description: >
            IP network that are allowed to use this key.


            You can only add a single source, but you can provide a range of IP
            addresses.

            Use this to protect against API key leaking and reuse.
          example: 192.168.1.0/24
        userToken:
          type: string
          description: >
            Pseudonymous user identifier to restrict usage of this API key to
            specific users.


            By default, rate limits are set based on IP addresses. This can be
            an issue if many users search from the same IP address.

            To avoid this, add a user token to each generated API key.
  responses:
    BadRequest:
      description: Bad request or request arguments.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBase'
    FeatureNotEnabled:
      description: This feature is not enabled on your Algolia account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBase'
    MethodNotAllowed:
      description: Method not allowed with this API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBase'
    IndexNotFound:
      description: Index not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBase'
    DeletedAt:
      description: OK
      content:
        application/json:
          schema:
            title: deletedAtResponse
            description: Response, taskID, and deletion timestamp.
            additionalProperties: false
            type: object
            required:
              - taskID
              - deletedAt
            properties:
              taskID:
                $ref: '#/components/schemas/taskID'
              deletedAt:
                $ref: '#/components/schemas/deletedAt'
    UpdatedAtWithObjectId:
      description: OK
      content:
        application/json:
          schema:
            title: updatedAtWithObjectIdResponse
            description: >-
              Response, taskID, unique object identifier, and an update
              timestamp.
            additionalProperties: false
            type: object
            properties:
              taskID:
                $ref: '#/components/schemas/taskID'
              updatedAt:
                $ref: '#/components/schemas/updatedAt'
              objectID:
                $ref: '#/components/schemas/objectID'
    UpdatedAt:
      description: OK
      content:
        application/json:
          schema:
            title: updatedAtResponse
            description: Response, taskID, and update timestamp.
            additionalProperties: false
            type: object
            required:
              - taskID
              - updatedAt
            properties:
              taskID:
                $ref: '#/components/schemas/taskID'
              updatedAt:
                $ref: '#/components/schemas/updatedAt'
    CreatedAt:
      description: OK
      content:
        application/json:
          schema:
            title: createdAtResponse
            description: Response and creation timestamp.
            additionalProperties: false
            type: object
            required:
              - createdAt
            properties:
              createdAt:
                $ref: '#/components/schemas/createdAt'
x-tagGroups:
  - name: Search and indexing
    tags:
      - Indices
      - Records
      - Search
  - name: Relevance
    tags:
      - Rules
      - Synonyms
      - Dictionaries
  - name: Others
    tags:
      - Api Keys
      - Clusters
      - Vaults
      - Advanced
  - name: Models
    tags:
      - _model_index_settings
