openapi: 3.0.2
info:
  title: Search API
  description: API powering the Search feature of Algolia.
  version: 0.1.0
components:
  securitySchemes:
    appId:
      type: apiKey
      in: header
      name: X-Algolia-Application-Id
    apiKey:
      type: apiKey
      in: header
      name: X-Algolia-API-Key
  parameters:
    PathInPath:
      name: path
      in: path
      description: >-
        The path of the API endpoint to target, anything after the /1 needs to
        be specified.
      required: true
      schema:
        type: string
        example: /keys
    Parameters:
      name: parameters
      in: query
      description: Query parameters to be applied to the current query.
      schema:
        type: object
        additionalProperties: true
    IndexName:
      name: indexName
      in: path
      description: The index in which to perform the request.
      required: true
      schema:
        type: string
        example: myIndexName
    ObjectID:
      name: objectID
      in: path
      description: Unique identifier of an object.
      required: true
      schema:
        type: string
        example: '123'
    ForwardToReplicas:
      in: query
      name: forwardToReplicas
      description: >-
        When true, changes are also propagated to replicas of the given
        indexName.
      schema:
        type: boolean
    ReplaceExistingSynonyms:
      in: query
      name: replaceExistingSynonyms
      schema:
        type: boolean
      description: Replace all synonyms of the index with the ones sent with this request.
    Query:
      in: query
      name: query
      description: Search for specific synonyms matching this string.
      schema:
        type: string
        default: ''
    Type:
      in: query
      name: type
      description: Only search for specific types of synonyms.
      schema:
        $ref: '#/components/schemas/SynonymType'
    PageDefault0:
      in: query
      name: page
      description: >-
        Requested page (zero-based). When specified, will retrieve a specific
        page; the page size is implicitly set to 100. When null, will retrieve
        all indices (no pagination).
      schema:
        type: integer
        nullable: true
        default: 0
    HitsPerPage:
      in: query
      name: hitsPerPage
      description: Maximum number of objects to retrieve.
      schema:
        type: integer
        default: 100
    KeyString:
      in: path
      name: key
      required: true
      schema:
        type: string
        example: myAPIKey
      description: API Key string.
    ClearExistingRules:
      in: query
      name: clearExistingRules
      required: false
      schema:
        type: boolean
      description: >-
        When true, existing Rules are cleared before adding this batch. When
        false, existing Rules are kept.
    DictionaryName:
      in: path
      name: dictionaryName
      description: The dictionary to search in.
      required: true
      schema:
        $ref: '#/components/schemas/dictionaryType'
    Page:
      in: query
      name: page
      description: >-
        Requested page (zero-based). When specified, will retrieve a specific
        page; the page size is implicitly set to 100. When null, will retrieve
        all indices (no pagination).
      schema:
        type: integer
        nullable: true
        default: null
    UserIDInQuery:
      name: X-Algolia-User-ID
      description: userID to assign.
      in: query
      required: true
      schema:
        type: string
        pattern: ^[a-zA-Z0-9 \-*.]+$
    UserIDInPath:
      name: userID
      description: userID to assign.
      in: path
      required: true
      schema:
        type: string
        pattern: ^[a-zA-Z0-9 \-*.]+$
  schemas:
    ErrorBase:
      description: Error.
      type: object
      additionalProperties: true
      properties:
        message:
          type: string
          example: Invalid Application-Id or API-Key
    paramsAsString:
      description: Search parameters as URL-encoded query string.
      type: string
      default: ''
    searchParamsString:
      type: object
      additionalProperties: false
      properties:
        params:
          $ref: '#/components/schemas/paramsAsString'
    searchFiltersArrayString:
      type: array
      items:
        type: string
    searchFiltersNestedArrayString:
      type: array
      items:
        type: array
        items:
          type: string
    facetFilters:
      description: Filter hits by facet value.
      oneOf:
        - $ref: '#/components/schemas/searchFiltersArrayString'
        - $ref: '#/components/schemas/searchFiltersNestedArrayString'
    optionalFilters:
      description: >-
        Create filters for ranking purposes, where records that match the filter
        are ranked higher, or lower in the case of a negative optional filter.
      oneOf:
        - $ref: '#/components/schemas/searchFiltersArrayString'
        - $ref: '#/components/schemas/searchFiltersNestedArrayString'
    numericFilters:
      description: Filter on numeric attributes.
      oneOf:
        - $ref: '#/components/schemas/searchFiltersArrayString'
        - $ref: '#/components/schemas/searchFiltersNestedArrayString'
    tagFilters:
      description: Filter hits by tags.
      oneOf:
        - $ref: '#/components/schemas/searchFiltersArrayString'
        - $ref: '#/components/schemas/searchFiltersNestedArrayString'
    page:
      type: integer
      description: Specify the page to retrieve.
      default: 0
    aroundRadiusAll:
      type: string
      enum:
        - all
    aroundRadius:
      description: Define the maximum radius for a geo search (in meters).
      oneOf:
        - type: integer
          minimum: 1
        - $ref: '#/components/schemas/aroundRadiusAll'
    reRankingApplyFilter:
      description: >-
        When Dynamic Re-Ranking is enabled, only records that match these
        filters will be impacted by Dynamic Re-Ranking.
      oneOf:
        - $ref: '#/components/schemas/searchFiltersArrayString'
        - $ref: '#/components/schemas/searchFiltersNestedArrayString'
    baseSearchParams:
      type: object
      additionalProperties: false
      properties:
        similarQuery:
          type: string
          description: >-
            Overrides the query parameter and performs a more generic search
            that can be used to find "similar" results.
          default: ''
        filters:
          type: string
          description: Filter the query with numeric, facet and/or tag filters.
          default: ''
        facetFilters:
          $ref: '#/components/schemas/facetFilters'
        optionalFilters:
          $ref: '#/components/schemas/optionalFilters'
        numericFilters:
          $ref: '#/components/schemas/numericFilters'
        tagFilters:
          $ref: '#/components/schemas/tagFilters'
        sumOrFiltersScores:
          type: boolean
          description: Determines how to calculate the total score for filtering.
          default: false
        facets:
          type: array
          items:
            type: string
          description: Retrieve facets and their facet values.
          default: []
        maxValuesPerFacet:
          type: integer
          description: >-
            Maximum number of facet values to return for each facet during a
            regular search.
          default: 100
        facetingAfterDistinct:
          type: boolean
          description: >-
            Force faceting to be applied after de-duplication (via the Distinct
            setting).
          default: false
        sortFacetValuesBy:
          type: string
          description: Controls how facet values are fetched.
          default: count
        page:
          $ref: '#/components/schemas/page'
        offset:
          type: integer
          description: Specify the offset of the first hit to return.
        length:
          type: integer
          description: Set the number of hits to retrieve (used only with offset).
          minimum: 1
          maximum: 1000
        aroundLatLng:
          type: string
          description: >-
            Search for entries around a central geolocation, enabling a geo
            search within a circular area.
          default: ''
        aroundLatLngViaIP:
          type: boolean
          description: >-
            Search for entries around a given location automatically computed
            from the requester's IP address.
          default: false
        aroundRadius:
          $ref: '#/components/schemas/aroundRadius'
        aroundPrecision:
          type: integer
          description: >-
            Precision of geo search (in meters), to add grouping by geo location
            to the ranking formula.
          default: 10
        minimumAroundRadius:
          type: integer
          description: >-
            Minimum radius (in meters) used for a geo search when aroundRadius
            is not set.
          minimum: 1
        insideBoundingBox:
          type: array
          items:
            type: number
          description: Search inside a rectangular area (in geo coordinates).
        insidePolygon:
          type: array
          items:
            type: number
          description: Search inside a polygon (in geo coordinates).
        naturalLanguages:
          type: array
          items:
            type: string
          description: >-
            This parameter changes the default values of certain parameters and
            settings that work best for a natural language query, such as
            ignorePlurals, removeStopWords, removeWordsIfNoResults,
            analyticsTags and ruleContexts. These parameters and settings work
            well together when the query is formatted in natural language
            instead of keywords, for example when your user performs a voice
            search.
          default: []
        ruleContexts:
          type: array
          items:
            type: string
          description: Enables contextual rules.
          default: []
        personalizationImpact:
          type: integer
          description: Define the impact of the Personalization feature.
          default: 100
        userToken:
          type: string
          description: Associates a certain user token with the current search.
        getRankingInfo:
          type: boolean
          description: Retrieve detailed ranking information.
          default: false
        clickAnalytics:
          type: boolean
          description: Enable the Click Analytics feature.
          default: false
        analytics:
          type: boolean
          description: >-
            Whether the current query will be taken into account in the
            Analytics.
          default: true
        analyticsTags:
          type: array
          items:
            type: string
          description: List of tags to apply to the query for analytics purposes.
          default: []
        percentileComputation:
          type: boolean
          description: >-
            Whether to include or exclude a query from the processing-time
            percentile computation.
          default: true
        enableABTest:
          type: boolean
          description: Whether this search should participate in running AB tests.
          default: true
        enableReRanking:
          type: boolean
          description: Whether this search should use AI Re-Ranking.
          default: true
        reRankingApplyFilter:
          $ref: '#/components/schemas/reRankingApplyFilter'
    query:
      type: string
      description: The text to search in the index.
      default: ''
    requiredSearchParams:
      type: object
      additionalProperties: false
      required:
        - query
      properties:
        query:
          $ref: '#/components/schemas/query'
    hitsPerPage:
      type: integer
      description: Set the number of hits per page.
      default: 20
    typoTolerance:
      type: string
      enum:
        - true
        - false
        - min
        - strict
      description: Controls whether typo tolerance is enabled and how it is applied.
      default: true
    queryType:
      type: string
      enum:
        - prefixLast
        - prefixAll
        - prefixNone
      description: Controls if and how query words are interpreted as prefixes.
      default: prefixLast
    removeWordsIfNoResults:
      type: string
      enum:
        - none
        - lastWords
        - firstWords
        - allOptional
      description: >-
        Selects a strategy to remove words from the query when it doesn't match
        any hits.
      default: none
    exactOnSingleWordQuery:
      type: string
      enum:
        - attribute
        - none
        - word
      description: >-
        Controls how the exact ranking criterion is computed when the query
        contains only one word.
      default: attribute
    alternativesAsExact:
      type: string
      enum:
        - ignorePlurals
        - singleWordSynonym
        - multiWordsSynonym
    advancedSyntaxFeatures:
      type: string
      enum:
        - exactPhrase
        - excludeWords
    maxFacetHits:
      type: integer
      description: >-
        Maximum number of facet hits to return during a search for facet values.
        For performance reasons, the maximum allowed number of returned values
        is 100.
      maximum: 100
      default: 10
    indexSettingsAsSearchParams:
      type: object
      additionalProperties: false
      properties:
        searchableAttributes:
          type: array
          items:
            type: string
          description: The complete list of attributes used for searching.
          default: []
        attributesForFaceting:
          type: array
          items:
            type: string
          description: The complete list of attributes that will be used for faceting.
          default: []
        unretrievableAttributes:
          type: array
          items:
            type: string
          description: List of attributes that can't be retrieved at query time.
          default: []
        attributesToRetrieve:
          type: array
          items:
            type: string
          description: >-
            This parameter controls which attributes to retrieve and which not
            to retrieve.
          default:
            - '*'
        restrictSearchableAttributes:
          type: array
          items:
            type: string
          description: >-
            Restricts a given query to look in only a subset of your searchable
            attributes.
          default: []
        ranking:
          type: array
          items:
            type: string
          description: Controls how Algolia should sort your results.
          default:
            - typo
            - geo
            - words
            - filters
            - proximity
            - attribute
            - exact
            - custom
        customRanking:
          type: array
          items:
            type: string
          description: Specifies the custom ranking criterion.
          default: []
        relevancyStrictness:
          type: integer
          description: >-
            Controls the relevancy threshold below which less relevant results
            aren't included in the results.
          default: 100
        attributesToHighlight:
          type: array
          items:
            type: string
          description: List of attributes to highlight.
        attributesToSnippet:
          type: array
          items:
            type: string
          description: >-
            List of attributes to snippet, with an optional maximum number of
            words to snippet.
          default: []
        highlightPreTag:
          type: string
          description: >-
            The HTML string to insert before the highlighted parts in all
            highlight and snippet results.
          default: <em>
        highlightPostTag:
          type: string
          description: >-
            The HTML string to insert after the highlighted parts in all
            highlight and snippet results.
          default: </em>
        snippetEllipsisText:
          type: string
          description: String used as an ellipsis indicator when a snippet is truncated.
          default: …
        restrictHighlightAndSnippetArrays:
          type: boolean
          description: >-
            Restrict highlighting and snippeting to items that matched the
            query.
          default: false
        hitsPerPage:
          $ref: '#/components/schemas/hitsPerPage'
        minWordSizefor1Typo:
          type: integer
          description: >-
            Minimum number of characters a word in the query string must contain
            to accept matches with 1 typo.
          default: 4
        minWordSizefor2Typos:
          type: integer
          description: >-
            Minimum number of characters a word in the query string must contain
            to accept matches with 2 typos.
          default: 8
        typoTolerance:
          $ref: '#/components/schemas/typoTolerance'
        allowTyposOnNumericTokens:
          type: boolean
          description: >-
            Whether to allow typos on numbers ("numeric tokens") in the query
            string.
          default: true
        disableTypoToleranceOnAttributes:
          type: array
          items:
            type: string
          description: List of attributes on which you want to disable typo tolerance.
          default: []
        separatorsToIndex:
          type: string
          description: Control which separators are indexed.
          default: ''
        ignorePlurals:
          type: string
          description: >-
            Treats singular, plurals, and other forms of declensions as matching
            terms.
          default: false
        removeStopWords:
          type: string
          description: Removes stop (common) words from the query before executing it.
          default: false
        keepDiacriticsOnCharacters:
          type: string
          description: >-
            List of characters that the engine shouldn't automatically
            normalize.
          default: ''
        queryLanguages:
          type: array
          items:
            type: string
          description: >-
            Sets the languages to be used by language-specific settings and
            functionalities such as ignorePlurals, removeStopWords, and CJK
            word-detection.
          default: []
        decompoundQuery:
          type: boolean
          description: Splits compound words into their composing atoms in the query.
          default: true
        enableRules:
          type: boolean
          description: Whether Rules should be globally enabled.
          default: true
        enablePersonalization:
          type: boolean
          description: Enable the Personalization feature.
          default: false
        queryType:
          $ref: '#/components/schemas/queryType'
        removeWordsIfNoResults:
          $ref: '#/components/schemas/removeWordsIfNoResults'
        advancedSyntax:
          type: boolean
          description: Enables the advanced query syntax.
          default: false
        optionalWords:
          type: array
          items:
            type: string
          description: >-
            A list of words that should be considered as optional when found in
            the query.
          default: []
        disableExactOnAttributes:
          type: array
          items:
            type: string
          description: >-
            List of attributes on which you want to disable the exact ranking
            criterion.
          default: []
        exactOnSingleWordQuery:
          $ref: '#/components/schemas/exactOnSingleWordQuery'
        alternativesAsExact:
          type: array
          items:
            $ref: '#/components/schemas/alternativesAsExact'
          description: >-
            List of alternatives that should be considered an exact match by the
            exact ranking criterion.
          default:
            - ignorePlurals
            - singleWordSynonym
        advancedSyntaxFeatures:
          type: array
          items:
            $ref: '#/components/schemas/advancedSyntaxFeatures'
          description: >-
            Allows you to specify which advanced syntax features are active when
            ‘advancedSyntax' is enabled.
          default:
            - exactPhrase
            - excludeWords
        distinct:
          type: integer
          minimum: 0
          maximum: 4
          description: Enables de-duplication or grouping of results.
          default: 0
        synonyms:
          type: boolean
          description: >-
            Whether to take into account an index's synonyms for a particular
            search.
          default: true
        replaceSynonymsInHighlight:
          type: boolean
          description: >-
            Whether to highlight and snippet the original word that matches the
            synonym or the synonym itself.
          default: false
        minProximity:
          type: integer
          minimum: 1
          maximum: 7
          description: Precision of the proximity ranking criterion.
          default: 1
        responseFields:
          type: array
          items:
            type: string
          description: >-
            Choose which fields to return in the API response. This parameters
            applies to search and browse queries.
          default: []
        maxFacetHits:
          $ref: '#/components/schemas/maxFacetHits'
        attributeCriteriaComputedByMinProximity:
          type: boolean
          description: >-
            When attribute is ranked above proximity in your ranking formula,
            proximity is used to select which searchable attribute is matched in
            the attribute ranking stage.
          default: false
        renderingContent:
          type: object
          description: >-
            Content defining how the search interface should be rendered. Can be
            set via the settings for a default value and can be overridden via
            rules.
          default: {}
    searchParamsObject:
      allOf:
        - $ref: '#/components/schemas/baseSearchParams'
        - $ref: '#/components/schemas/requiredSearchParams'
        - $ref: '#/components/schemas/indexSettingsAsSearchParams'
    searchParams:
      oneOf:
        - $ref: '#/components/schemas/searchParamsString'
        - $ref: '#/components/schemas/searchParamsObject'
    abTestID:
      type: integer
      description: >-
        If a search encounters an index that is being A/B tested, abTestID
        reports the ongoing A/B test ID.
    abTestVariantID:
      type: integer
      description: >-
        If a search encounters an index that is being A/B tested,
        abTestVariantID reports the variant ID of the index used.
    nbHits:
      type: integer
      description: Number of hits that the search query matched.
      example: 20
    nbPages:
      type: integer
      description: Number of pages available for the current query.
      example: 1
    userData:
      type: object
      description: Lets you store custom data in your indices.
      default: {}
    baseSearchResponse:
      type: object
      additionalProperties: false
      required:
        - hits
        - nbHits
        - page
        - nbPages
        - hitsPerPage
        - processingTimeMS
        - exhaustiveNbHits
        - exhaustiveTypo
        - query
        - params
      properties:
        abTestID:
          $ref: '#/components/schemas/abTestID'
        abTestVariantID:
          $ref: '#/components/schemas/abTestVariantID'
        aroundLatLng:
          type: string
          description: The computed geo location.
          pattern: ^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$
        automaticRadius:
          type: string
          description: >-
            The automatically computed radius. For legacy reasons, this
            parameter is a string and not an integer.
        exhaustiveFacetsCount:
          type: boolean
          description: Whether the facet count is exhaustive or approximate.
        exhaustiveNbHits:
          type: boolean
          description: Indicate if the nbHits count was exhaustive or approximate.
        exhaustiveTypo:
          type: boolean
          description: >-
            Indicate if the typo-tolerence search was exhaustive or approximate
            (only included when typo-tolerance is enabled).
        facets:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: string
          description: A mapping of each facet name to the corresponding facet counts.
          example:
            category:
              food: 1
              tech: 42
        facets_stats:
          type: object
          description: Statistics for numerical facets.
          additionalProperties:
            type: object
            properties:
              min:
                type: integer
                description: The minimum value in the result set.
              max:
                type: integer
                description: The maximum value in the result set.
              avg:
                type: integer
                description: The average facet value in the result set.
              sum:
                type: integer
                description: The sum of all values in the result set.
        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. In the case of an A/B test, the
            targeted index isn't always the index used by the query.
          example: indexNameAlt
        message:
          type: string
          description: Used to return warnings about the query.
        nbHits:
          $ref: '#/components/schemas/nbHits'
        nbPages:
          $ref: '#/components/schemas/nbPages'
        nbSortedHits:
          type: integer
          description: >-
            The number of hits selected and sorted by the relevant sort
            algorithm.
          example: 20
        page:
          $ref: '#/components/schemas/page'
        params:
          type: string
          description: A url-encoded string of all search parameters.
          example: query=a&hitsPerPage=20
        parsedQuery:
          type: string
          description: The query string that will be searched, after normalization.
        processingTimeMS:
          type: integer
          description: Time the server took to process the request, in milliseconds.
          example: 20
        query:
          $ref: '#/components/schemas/query'
        queryAfterRemoval:
          type: string
          description: >-
            A markup text indicating which parts of the original query have been
            removed in order to retrieve a non-empty result set.
        serverUsed:
          type: string
          description: Actual host name of the server that processed the request.
        userData:
          $ref: '#/components/schemas/userData'
    objectID:
      type: string
      description: Unique identifier of the object.
    highlightedValue:
      type: string
      description: Markup text with occurrences highlighted.
      example: <em>George</em> <em>Clo</em>oney
    matchLevel:
      type: string
      description: Indicates how well the attribute matched the search query.
      enum:
        - none
        - partial
        - full
    highlightResult:
      type: object
      description: Highlighted attributes.
      additionalProperties: false
      properties:
        value:
          $ref: '#/components/schemas/highlightedValue'
        matchLevel:
          $ref: '#/components/schemas/matchLevel'
        matchedWords:
          type: array
          description: List of words from the query that matched the object.
          items:
            type: string
        fullyHighlighted:
          type: boolean
          description: Whether the entire attribute value is highlighted.
    snippetResult:
      type: object
      additionalProperties: false
      properties:
        value:
          $ref: '#/components/schemas/highlightedValue'
        matchLevel:
          $ref: '#/components/schemas/matchLevel'
    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
      additionalProperties: false
      properties:
        filters:
          type: integer
          description: This field is reserved for advanced usage.
        firstMatchedWord:
          type: integer
          description: >-
            Position of the most important matched attribute in the attributes
            to index list.
        geoDistance:
          type: integer
          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
          description: Precision used when computing the geo distance, in meters.
        matchedGeoLocation:
          $ref: '#/components/schemas/matchedGeoLocation'
        personalization:
          $ref: '#/components/schemas/personalization'
        nbExactWords:
          type: integer
          description: Number of exactly matched words.
        nbTypos:
          type: integer
          description: Number of typos encountered when matching the record.
        promoted:
          type: boolean
          description: Present and set to true if a Rule promoted the hit.
        proximityDistance:
          type: integer
          description: >-
            When the query contains more than one word, the sum of the distances
            between matched words (in meters).
        userScore:
          type: integer
          description: Custom ranking for the object, expressed as a single integer value.
        words:
          type: integer
          description: Number of matched words, including prefixes and typos.
        promotedByReRanking:
          type: boolean
          description: Wether the record are promoted by the re-ranking strategy.
      required:
        - promoted
        - nbTypos
        - firstMatchedWord
        - geoDistance
        - nbExactWords
        - words
        - filters
        - userScore
    _distinctSeqID:
      type: integer
    hit:
      type: object
      description: A single hit.
      additionalProperties: true
      required:
        - objectID
      properties:
        objectID:
          $ref: '#/components/schemas/objectID'
        _highlightResult:
          $ref: '#/components/schemas/highlightResult'
        _snippetResult:
          $ref: '#/components/schemas/snippetResult'
        _rankingInfo:
          $ref: '#/components/schemas/rankingInfo'
        _distinctSeqID:
          $ref: '#/components/schemas/_distinctSeqID'
    searchHits:
      type: object
      additionalProperties: false
      properties:
        hits:
          type: array
          items:
            $ref: '#/components/schemas/hit'
    searchResponse:
      allOf:
        - $ref: '#/components/schemas/baseSearchResponse'
        - $ref: '#/components/schemas/searchHits'
    indexName:
      type: string
      example: products
      description: The Algolia index name.
    multipleQueriesType:
      type: string
      enum:
        - default
        - facet
      default: default
      description: >-
        Perform a search query with `default`, will search for facet values if
        `facet` is given.
    multipleQueriesStrategy:
      type: string
      enum:
        - none
        - stopIfEnoughMatches
    cursor:
      type: string
      description: >-
        Cursor indicating the location to resume browsing from. Must match the
        value returned by the previous call.
      example: jMDY3M2MwM2QwMWUxMmQwYWI0ZTN
    baseBrowseResponse:
      type: object
      additionalProperties: false
      required:
        - cursor
      properties:
        cursor:
          $ref: '#/components/schemas/cursor'
    browseResponse:
      allOf:
        - $ref: '#/components/schemas/baseSearchResponse'
        - $ref: '#/components/schemas/searchHits'
        - $ref: '#/components/schemas/baseBrowseResponse'
    taskID:
      type: integer
      description: taskID of the task to wait for.
    deletedAt:
      type: string
      description: Date of deletion (ISO-8601 format).
    attribute:
      type: string
      description: Value of the attribute to be updated.
    updatedAt:
      type: string
      description: Date of last update (ISO-8601 format).
    builtInOperationType:
      type: string
      enum:
        - Increment
        - Decrement
        - Add
        - Remove
        - AddUnique
        - IncrementFrom
        - IncrementSet
      description: The operation to apply on the attribute.
    builtInOperation:
      type: object
      description: >-
        To update an attribute without pushing the entire record, you can use
        these built-in operations.
      additionalProperties: false
      properties:
        _operation:
          $ref: '#/components/schemas/builtInOperationType'
        value:
          type: string
          description: >-
            the right-hand side argument to the operation, for example,
            increment or decrement step, value to add or remove.
      required:
        - _operation
        - value
    attributeOrBuiltInOperation:
      oneOf:
        - $ref: '#/components/schemas/attribute'
        - $ref: '#/components/schemas/builtInOperation'
    action:
      type: string
      enum:
        - addObject
        - updateObject
        - partialUpdateObject
        - partialUpdateObjectNoCreate
        - deleteObject
        - delete
        - clear
      description: type of operation.
    objectIDs:
      type: array
      items:
        type: string
      description: List of objectID.
    baseIndexSettings:
      type: object
      additionalProperties: false
      properties:
        replicas:
          type: array
          items:
            type: string
          description: Creates replicas, exact copies of an index.
          default: []
        paginationLimitedTo:
          type: integer
          description: Set the maximum number of hits accessible via pagination.
          default: 1000
        disableTypoToleranceOnWords:
          type: array
          items:
            type: string
          description: A list of words for which you want to turn off typo tolerance.
          default: []
        attributesToTransliterate:
          type: array
          items:
            type: string
          description: Specify on which attributes to apply transliteration.
        camelCaseAttributes:
          type: array
          items:
            type: string
          description: >-
            List of attributes on which to do a decomposition of camel case
            words.
          default: []
        decompoundedAttributes:
          type: object
          description: >-
            Specify on which attributes in your index Algolia should apply word
            segmentation, also known as decompounding.
          default: {}
        indexLanguages:
          type: array
          items:
            type: string
          description: >-
            Sets the languages at the index level for language-specific
            processing such as tokenization and normalization.
          default: []
        filterPromotes:
          type: boolean
          description: >-
            Whether promoted results should match the filters of the current
            search, except for geographic filters.
          default: false
        disablePrefixOnAttributes:
          type: array
          items:
            type: string
          description: List of attributes on which you want to disable prefix matching.
          default: []
        allowCompressionOfIntegerArray:
          type: boolean
          description: Enables compression of large integer arrays.
          default: false
        numericAttributesForFiltering:
          type: array
          items:
            type: string
          description: List of numeric attributes that can be used as numerical filters.
          default: []
        userData:
          $ref: '#/components/schemas/userData'
    indexSettings:
      description: The Algolia index settings.
      allOf:
        - $ref: '#/components/schemas/baseIndexSettings'
        - $ref: '#/components/schemas/indexSettingsAsSearchParams'
    SynonymType:
      type: string
      description: Type of the synonym object.
      enum:
        - synonym
        - onewaysynonym
        - altcorrection1
        - altcorrection2
        - placeholder
    synonymHit:
      type: object
      description: Synonym object.
      additionalProperties: false
      properties:
        objectID:
          type: string
          description: Unique identifier of the synonym object to be created or updated.
        type:
          $ref: '#/components/schemas/SynonymType'
        synonyms:
          type: array
          items:
            type: string
          description: Words or phrases to be considered equivalent.
        input:
          type: string
          description: Word or phrase to appear in query strings (for onewaysynonym).
        word:
          type: string
          description: >-
            Word or phrase to appear in query strings (for altcorrection1 and
            altcorrection2).
        corrections:
          type: array
          items:
            type: string
          description: Words to be matched in records.
        placeholder:
          type: string
          description: Token to be put inside records.
        replacements:
          type: array
          items:
            type: string
          description: List of query words that will match the token.
        _highlightResult:
          type: object
          description: Highlighted results.
          additionalProperties: false
          properties:
            type:
              $ref: '#/components/schemas/highlightResult'
            synonyms:
              type: array
              items:
                $ref: '#/components/schemas/highlightResult'
      required:
        - objectID
        - type
    id:
      type: string
      description: objectID of the inserted object.
    synonymHits:
      type: array
      description: Array of synonym objects.
      items:
        $ref: '#/components/schemas/synonymHit'
    searchSynonymsResponse:
      type: object
      additionalProperties: true
      properties:
        hits:
          $ref: '#/components/schemas/synonymHits'
        nbHits:
          $ref: '#/components/schemas/nbHits'
      required:
        - hits
        - nbHits
    acl:
      type: string
      enum:
        - addObject
        - analytics
        - browse
        - deleteObject
        - deleteIndex
        - editSettings
        - listIndexes
        - logs
        - personalization
        - recommendation
        - search
        - seeUnretrievableAttributes
        - settings
        - usage
    apiKey:
      type: object
      description: Api Key object.
      additionalProperties: false
      properties:
        acl:
          type: array
          description: Set of permissions associated with the key.
          default: []
          items:
            $ref: '#/components/schemas/acl'
        description:
          type: string
          description: >-
            A comment used to identify a key more easily in the dashboard. It is
            not interpreted by the API.
          default: ''
        indexes:
          type: array
          description: >-
            Restrict this new API key to a list of indices or index patterns. If
            the list is empty, all indices are allowed.
          default: []
          items:
            type: string
        maxHitsPerQuery:
          type: integer
          description: >-
            Maximum number of hits this API key can retrieve in one query. If
            zero, no limit is enforced.
          default: 0
        maxQueriesPerIPPerHour:
          type: integer
          description: >-
            Maximum number of API calls per hour allowed from a given IP address
            or a user token.
          default: 0
        queryParameters:
          type: string
          description: >-
            URL-encoded query string. Force some query parameters to be applied
            for each query made with this API key.
          default: ''
        referers:
          type: array
          description: >-
            Restrict this new API key to specific referers. If empty or blank,
            defaults to all referers.
          default: []
          items:
            type: string
        validity:
          type: integer
          description: >-
            Validity limit for this key in seconds. The key will automatically
            be removed after this period of time.
          default: 0
      required:
        - acl
    createdAt:
      type: string
      description: Date of creation (ISO-8601 format).
    createdAtObject:
      type: object
      required:
        - createdAt
      properties:
        createdAt:
          $ref: '#/components/schemas/createdAt'
    key:
      allOf:
        - $ref: '#/components/schemas/apiKey'
        - $ref: '#/components/schemas/createdAtObject'
    keyString:
      type: string
      description: Key string.
    addApiKeyResponse:
      type: object
      additionalProperties: false
      properties:
        key:
          $ref: '#/components/schemas/keyString'
        createdAt:
          $ref: '#/components/schemas/createdAt'
      required:
        - key
        - createdAt
    anchoring:
      type: string
      description: >-
        Whether the pattern parameter must match the beginning or the end of the
        query string, or both, or none.
      enum:
        - is
        - startsWith
        - endsWith
        - contains
    condition:
      type: object
      additionalProperties: false
      properties:
        pattern:
          type: string
          description: Query pattern syntax.
        anchoring:
          $ref: '#/components/schemas/anchoring'
        alternatives:
          type: boolean
          description: Whether the pattern matches on plurals, synonyms, and typos.
          default: false
        context:
          type: string
          description: 'Rule context format: [A-Za-z0-9_-]+).'
    automaticFacetFilter:
      type: object
      description: Automatic facet Filter.
      additionalProperties: false
      properties:
        facet:
          type: string
          description: >-
            Attribute to filter on. This must match a facet placeholder in the
            Rule's pattern.
        score:
          type: integer
          default: 1
          description: >-
            Score for the filter. Typically used for optional or disjunctive
            filters.
        disjunctive:
          type: boolean
          default: false
          description: Whether the filter is disjunctive (true) or conjunctive (false).
      required:
        - facet
    params:
      type: object
      description: Additional search parameters. Any valid search parameter is allowed.
      additionalProperties: false
      properties:
        query:
          type: string
          description: Query string.
        automaticFacetFilters:
          type: array
          description: >-
            Names of facets to which automatic filtering must be applied; they
            must match the facet name of a facet value placeholder in the query
            pattern.
          items:
            $ref: '#/components/schemas/automaticFacetFilter'
        automaticOptionalFacetFilters:
          type: object
          description: >-
            Same syntax as automaticFacetFilters, but the engine treats the
            filters as optional.
          items:
            $ref: '#/components/schemas/automaticFacetFilter'
    consequenceParams:
      allOf:
        - $ref: '#/components/schemas/params'
        - $ref: '#/components/schemas/baseSearchParams'
        - $ref: '#/components/schemas/indexSettingsAsSearchParams'
    promote:
      type: object
      description: Object to promote as hits.
      additionalProperties: false
      properties:
        objectID:
          type: string
          description: Unique identifier of the object to promote.
        objectIDs:
          type: array
          description: Array of unique identifiers of the objects to promote.
          items:
            type: string
        position:
          type: integer
          description: >-
            The position to promote the objects to (zero-based). If you pass
            objectIDs, the objects are placed at this position as a group. For
            example, if you pass four objectIDs to position 0, the objects take
            the first four positions.
      required:
        - position
    consequence:
      type: object
      description: Consequence of the Rule.
      additionalProperties: false
      properties:
        params:
          $ref: '#/components/schemas/consequenceParams'
        promote:
          type: array
          description: Objects to promote as hits.
          items:
            $ref: '#/components/schemas/promote'
        filterPromotes:
          type: boolean
          default: false
          description: >-
            Only use in combination with the promote consequence. When true,
            promoted results will be restricted to match the filters of the
            current search. When false, the promoted results will show up
            regardless of the filters.
        hide:
          type: array
          description: >-
            Objects to hide from hits. Each object must contain an objectID
            field. By default, you can hide up to 50 items per rule.
          items:
            type: object
            description: Unique identifier of the object to hide.
            additionalProperties: false
            properties:
              objectID:
                $ref: '#/components/schemas/objectID'
            required:
              - objectID
        userData:
          type: object
          description: >-
            Custom JSON object that will be appended to the userData array in
            the response. This object isn't interpreted by the API. It's limited
            to 1kB of minified JSON.
    timeRange:
      type: object
      additionalProperties: false
      properties:
        from:
          type: integer
          description: Lower bound of the time range (Unix timestamp).
        until:
          type: integer
          description: Upper bound of the time range (Unix timestamp).
      required:
        - from
        - until
    rule:
      type: object
      description: Rule object.
      additionalProperties: false
      properties:
        objectID:
          $ref: '#/components/schemas/objectID'
        conditions:
          type: array
          description: >-
            A list of conditions that should apply to activate a Rule. You can
            use up to 25 conditions per Rule.
          items:
            $ref: '#/components/schemas/condition'
        consequence:
          $ref: '#/components/schemas/consequence'
        description:
          type: string
          description: >-
            This field is intended for Rule management purposes, in particular
            to ease searching for Rules and presenting them to human readers.
            It's not interpreted by the API.
        enabled:
          type: boolean
          default: true
          description: >-
            Whether the Rule is enabled. Disabled Rules remain in the index, but
            aren't applied at query time.
        validity:
          type: array
          description: >-
            By default, Rules are permanently valid. When validity periods are
            specified, the Rule applies only during those periods; it's ignored
            the rest of the time. The list must not be empty.
          items:
            $ref: '#/components/schemas/timeRange'
      required:
        - objectID
        - consequence
    updatedRuleResponse:
      type: object
      additionalProperties: false
      properties:
        objectID:
          $ref: '#/components/schemas/objectID'
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
        taskID:
          $ref: '#/components/schemas/taskID'
      required:
        - objectID
        - updatedAt
        - taskID
    parameters_query:
      type: string
      description: Full text query.
      default: ''
    parameters_page:
      type: integer
      default: 0
      description: Requested page (zero-based).
    parameters_hitsPerPage:
      type: integer
      default: 20
      description: Maximum number of hits in a page. Minimum is 1, maximum is 1000.
    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: The state of the dictionary entry.
    dictionaryEntry:
      type: object
      description: A dictionary entry.
      additionalProperties: true
      required:
        - objectID
        - language
      properties:
        objectID:
          $ref: '#/components/schemas/objectID'
        language:
          type: string
          description: >-
            Language ISO code supported by the dictionary (e.g., "en" for
            English).
        word:
          type: string
          description: The word of the dictionary entry.
        words:
          type: array
          description: The words of the dictionary entry.
          items:
            type: string
        decomposition:
          type: array
          description: A decomposition of the word of the dictionary entry.
          items:
            type: string
        state:
          $ref: '#/components/schemas/dictionaryEntryState'
    language:
      description: Language ISO code supported by the dictionary (e.g., "en" for English).
      type: string
    standardEntry:
      description: Language ISO code.
      type: object
      nullable: true
      additionalProperties:
        type: boolean
    standardEntries:
      description: >-
        Map of language ISO code supported by the dictionary (e.g., "en" for
        English) to a boolean value.
      type: object
      additionalProperties: false
      properties:
        plurals:
          $ref: '#/components/schemas/standardEntry'
        stopwords:
          $ref: '#/components/schemas/standardEntry'
        compounds:
          $ref: '#/components/schemas/standardEntry'
    dictionaryLanguage:
      type: object
      additionalProperties: false
      nullable: true
      description: Custom entries for a dictionary.
      properties:
        nbCustomEntires:
          description: >-
            When nbCustomEntries is set to 0, the user didn't customize the
            dictionary. The dictionary is still supported with standard,
            Algolia-provided entries.
          type: integer
    languages:
      type: object
      description: A 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: userID of the user.
      example: user1
    userId:
      title: userID
      type: object
      description: A userID.
      properties:
        userID:
          $ref: '#/components/schemas/userID'
        clusterName:
          type: string
          description: Cluster on 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: Name of the cluster.
      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: The source.
      required:
        - source
      properties:
        source:
          description: The IP range of the source.
          type: string
          example: 10.0.0.1/32
        description:
          description: The description of the source.
          type: string
    sources:
      description: A list of sources.
      type: array
      items:
        $ref: '#/components/schemas/source'
    logType:
      type: string
      enum:
        - all
        - query
        - build
        - error
      default: all
    taskStatus:
      type: string
      enum:
        - published
        - notPublished
    operationType:
      type: string
      enum:
        - move
        - copy
      description: Type of operation to perform (move or copy).
    scopeType:
      type: string
      enum:
        - settings
        - synonyms
        - rules
    indice:
      type: object
      additionalProperties: false
      properties:
        name:
          type: string
          description: Index name.
        createdAt:
          type: string
          description: >-
            Index creation date. An empty string means that the index has no
            records.
        updatedAt:
          $ref: '#/components/schemas/updatedAt'
        entries:
          type: integer
          description: Number of records contained in the index.
        dataSize:
          type: integer
          description: Number of bytes of the index in minified format.
        fileSize:
          type: integer
          description: Number of bytes of the index binary file.
        lastBuildTimeS:
          type: integer
          description: Last build time.
        numberOfPendingTask:
          type: integer
          description: >-
            Number of pending indexing operations. This value is deprecated and
            should not be used.
        pendingTask:
          type: boolean
          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.
        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.
      required:
        - name
        - createdAt
        - updatedAt
        - entries
        - dataSize
        - fileSize
        - lastBuildTimeS
        - pendingTask
    listIndicesResponse:
      type: object
      additionalProperties: false
      properties:
        items:
          type: array
          description: List of the fetched indices.
          items:
            $ref: '#/components/schemas/indice'
        nbPages:
          type: integer
          description: Number of pages.
          example: 100
  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: The response with a taskID and a deletedAt 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: >-
              The response with a taskID, an objectID and an updatedAt
              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: The response with a taskID and an updatedAt 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: The response with a createdAt timestamp.
            additionalProperties: false
            type: object
            required:
              - createdAt
            properties:
              createdAt:
                $ref: '#/components/schemas/createdAt'
servers:
  - url: https://{appId}.algolianet.com
    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.algolianet.com
    variables:
      appId:
        default: myAppId
security:
  - appId: []
    apiKey: []
paths:
  /1{path}:
    get:
      operationId: get
      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'
      tags:
        - search
    post:
      operationId: post
      requestBody:
        description: The 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'
      tags:
        - search
    put:
      operationId: put
      requestBody:
        description: The 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'
      tags:
        - search
    delete:
      operationId: del
      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'
      tags:
        - search
  /1/indexes/{indexName}/query:
    post:
      operationId: search
      description: Get search results.
      summary: Get search results.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        required: true
        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'
      tags:
        - search
  /1/indexes/*/queries:
    post:
      operationId: multipleQueries
      description: Get search results for the given requests.
      summary: Get search results for the given requests.
      requestBody:
        required: true
        description: The `multipleQueries` requests and strategy.
        content:
          application/json:
            schema:
              title: multipleQueriesParams
              type: object
              additionalProperties: false
              properties:
                requests:
                  type: array
                  items:
                    title: multipleQueries
                    type: object
                    additionalProperties: false
                    properties:
                      indexName:
                        $ref: '#/components/schemas/indexName'
                      query:
                        $ref: '#/components/schemas/query'
                      type:
                        $ref: '#/components/schemas/multipleQueriesType'
                      facet:
                        type: string
                        description: The `facet` name.
                      params:
                        type: string
                        description: A query string of search parameters.
                    required:
                      - indexName
                strategy:
                  $ref: '#/components/schemas/multipleQueriesStrategy'
              required:
                - requests
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: multipleQueriesResponse
                type: object
                additionalProperties: false
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/searchResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      tags:
        - search
  /1/indexes/{indexName}/facets/{facetName}/query:
    post:
      operationId: searchForFacetValues
      summary: Search for values of a given facet
      description: >-
        Search for values of a given facet, optionally restricting the returned
        values to those contained in objects matching other search criteria.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - name: facetName
          description: The facet name.
          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:
                  type: string
                  description: Text to search inside the facet's values.
                  default: ''
                maxFacetHits:
                  $ref: '#/components/schemas/maxFacetHits'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: searchForFacetValuesResponse
                type: object
                additionalProperties: false
                required:
                  - facetHits
                properties:
                  facetHits:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      required:
                        - value
                        - highlighted
                        - count
                      properties:
                        value:
                          description: Raw value of the facet.
                          type: string
                        highlighted:
                          $ref: '#/components/schemas/highlightedValue'
                        count:
                          description: >-
                            How many objects contain this facet value. This
                            takes into account the extra search parameters
                            specified in the query. Like for a regular search
                            query, the counts may not be exhaustive.
                          type: integer
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      tags:
        - search
  /1/indexes/{indexName}/browse:
    post:
      operationId: browse
      summary: Retrieve all index content.
      description: >
        This method allows you to retrieve all index content. It can retrieve up
        to 1,000 records per call and supports full text search and filters.

        For performance reasons, some features are not supported, including
        `distinct`, sorting by `typos`, `words` or `geo distance`.

        When there is more content to be browsed, the response contains a cursor
        field. This cursor has to be passed to the subsequent call to browse in
        order to get the next page of results. When the end of the index has
        been reached, the cursor field is absent from the response.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        content:
          application/json:
            schema:
              title: browseRequest
              type: object
              additionalProperties: false
              properties:
                params:
                  $ref: '#/components/schemas/paramsAsString'
                cursor:
                  $ref: '#/components/schemas/cursor'
      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'
      tags:
        - search
  /1/indexes/{indexName}:
    post:
      operationId: saveObject
      description: Add an object to the index, automatically assigning it an object ID.
      summary: Add an object to the index.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        required: true
        description: The Algolia record.
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: saveObjectResponse
                type: object
                additionalProperties: false
                properties:
                  createdAt:
                    type: string
                  taskID:
                    $ref: '#/components/schemas/taskID'
                  objectID:
                    $ref: '#/components/schemas/objectID'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      tags:
        - search
    delete:
      operationId: deleteIndex
      summary: Delete index.
      description: Delete an existing index.
      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'
      tags:
        - search
  /1/indexes/{indexName}/{objectID}:
    put:
      operationId: addOrUpdateObject
      summary: Add or replace an object with a given object ID.
      description: >-
        Add or replace an object with a given object ID. If the object does not
        exist, it will be created. If it already exists, it will be replaced.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectID'
      requestBody:
        required: true
        description: The Algolia object.
        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'
      tags:
        - search
    get:
      operationId: getObject
      summary: Retrieve one object from the index.
      description: Retrieve one object from the index.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectID'
        - name: attributesToRetrieve
          in: query
          description: >-
            List of attributes to retrieve. If not specified, all retrievable
            attributes are returned.
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: getObjectResponse
                type: object
                description: Fetched object.
                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'
      tags:
        - search
    delete:
      operationId: deleteObject
      summary: Delete object.
      description: Delete an existing object.
      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'
      tags:
        - search
  /1/indexes/{indexName}/deleteByQuery:
    post:
      operationId: deleteBy
      summary: Delete all records matching the query.
      description: >
        Remove all objects matching a filter (including geo filters).

        This method enables you to delete one or more objects based on filters
        (numeric, facet, tag or geo queries).

        It doesn't accept empty filters or a query.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/searchParams'
      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'
      tags:
        - search
  /1/indexes/{indexName}/clear:
    post:
      operationId: clearObjects
      summary: clear all objects from an index.
      description: >-
        Delete an index's content, but leave settings and index-specific API
        keys untouched.
      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'
      tags:
        - search
  /1/indexes/{indexName}/{objectID}/partial:
    post:
      operationId: partialUpdateObject
      summary: Partially update an object.
      description: >
        Update one or more attributes of an existing object.

        This method lets you update only a part of an existing object, either by
        adding new attributes or updating existing ones.

        You can partially update several objects in a single method call.

        If the index targeted by this operation doesn't exist yet, it's
        automatically created.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectID'
        - name: createIfNotExists
          description: Creates the record if it does not exist yet.
          in: query
          schema:
            type: boolean
            default: true
      requestBody:
        required: true
        description: List of attributes to update.
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                title: attributeToUpdate
                description: Attribute to update.
                additionalProperties:
                  $ref: '#/components/schemas/attributeOrBuiltInOperation'
      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'
      tags:
        - search
  /1/indexes/{indexName}/batch:
    post:
      operationId: batch
      description: Performs multiple write operations in a single API call.
      summary: Performs multiple write operations in a single API call.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: batchWriteParams
              description: The `batch` parameters.
              type: object
              additionalProperties: false
              properties:
                requests:
                  type: array
                  items:
                    title: batchOperation
                    type: object
                    additionalProperties: false
                    properties:
                      action:
                        $ref: '#/components/schemas/action'
                      body:
                        type: object
                        description: >-
                          arguments to the operation (depends on the type of the
                          operation).
      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'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      tags:
        - search
  /1/indexes/*/batch:
    post:
      operationId: multipleBatch
      description: >-
        Perform multiple write operations, potentially targeting multiple
        indices, in a single API call.
      summary: Perform multiple write operations.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: batchParams
              description: The `multipleBatch` parameters.
              type: object
              additionalProperties: false
              properties:
                requests:
                  type: array
                  items:
                    title: multipleBatchOperation
                    type: object
                    additionalProperties: false
                    properties:
                      action:
                        $ref: '#/components/schemas/action'
                      body:
                        type: object
                        description: >-
                          arguments to the operation (depends on the type of the
                          operation).
                      indexName:
                        type: string
                        description: Index to target for this operation.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: multipleBatchResponse
                type: object
                additionalProperties: false
                properties:
                  taskID:
                    type: object
                    description: List of tasksIDs per index.
                  objectIDs:
                    $ref: '#/components/schemas/objectIDs'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      tags:
        - search
  /1/indexes/*/objects:
    post:
      operationId: getObjects
      summary: Retrieve one or more objects.
      description: >-
        Retrieve one or more objects, potentially from different indices, in a
        single API call.
      requestBody:
        required: true
        description: The Algolia object.
        content:
          application/json:
            schema:
              title: getObjectsParams
              description: The `getObjects` parameters.
              type: object
              additionalProperties: false
              properties:
                requests:
                  type: array
                  items:
                    description: getObjects operation on an index.
                    title: multipleGetObjectsParams
                    type: object
                    additionalProperties: false
                    required:
                      - objectID
                      - indexName
                    properties:
                      attributesToRetrieve:
                        type: array
                        items:
                          type: string
                        description: >-
                          List of attributes to retrieve. By default, all
                          retrievable attributes are returned.
                      objectID:
                        type: string
                        description: ID of the object within that index.
                      indexName:
                        type: string
                        description: name of the index containing the object.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: getObjectsResponse
                type: object
                additionalProperties: false
                properties:
                  results:
                    type: array
                    description: List of results fetched.
                    items:
                      type: object
                      description: Fetched object.
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      tags:
        - search
  /1/indexes/{indexName}/settings:
    get:
      operationId: getSettings
      description: Retrieve settings of a given indexName.
      summary: Retrieve settings of a given indexName.
      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'
      tags:
        - search
    put:
      operationId: setSettings
      description: >-
        Update settings of a given indexName. Only specified settings are
        overridden; unspecified settings are left unchanged. Specifying null for
        a setting resets it to its default value.
      summary: Update settings of a given indexName.
      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'
      tags:
        - search
  /1/indexes/{indexName}/synonyms/{objectID}:
    put:
      operationId: saveSynonym
      summary: Save synonym.
      description: >-
        Create a new synonym object or update the existing synonym object with
        the given object ID.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/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'
      tags:
        - search
    get:
      operationId: getSynonym
      summary: Get synonym.
      description: Fetch a synonym object identified by its objectID.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/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'
      tags:
        - search
    delete:
      operationId: deleteSynonym
      summary: Delete synonym.
      description: Delete a single synonyms set, identified by the given objectID.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/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'
      tags:
        - search
  /1/indexes/{indexName}/synonyms/batch:
    post:
      operationId: saveSynonyms
      summary: Save a batch of synonyms.
      description: >-
        Create/update multiple synonym objects at once, potentially replacing
        the entire list of synonyms if replaceExistingSynonyms is true.
      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'
      tags:
        - search
  /1/indexes/{indexName}/synonyms/clear:
    post:
      operationId: clearAllSynonyms
      summary: Clear all synonyms.
      description: Remove all synonyms from an 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'
      tags:
        - search
  /1/indexes/{indexName}/synonyms/search:
    post:
      operationId: searchSynonyms
      summary: Get all synonyms that match a query.
      description: Search or browse all synonyms, optionally filtering them by type.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/Query'
        - $ref: '#/components/parameters/Type'
        - $ref: '#/components/parameters/PageDefault0'
        - $ref: '#/components/parameters/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'
      tags:
        - search
  /1/keys:
    post:
      operationId: addApiKey
      summary: Create a new API key.
      description: Add a new API Key with specific permissions/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'
      tags:
        - search
    get:
      operationId: listApiKeys
      summary: Get the full list of API Keys.
      description: List API keys, along with their associated rights.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: listApiKeysResponse
                type: object
                additionalProperties: false
                required:
                  - keys
                properties:
                  keys:
                    type: array
                    description: List of api keys.
                    items:
                      $ref: '#/components/schemas/key'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      tags:
        - search
  /1/keys/{key}:
    put:
      operationId: updateApiKey
      summary: Update an API key.
      description: Replace every permission of an existing API key.
      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'
      tags:
        - search
    get:
      operationId: getApiKey
      summary: Get an API key.
      description: Get the permissions of an API key.
      parameters:
        - $ref: '#/components/parameters/KeyString'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/key'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      tags:
        - search
    delete:
      operationId: deleteApiKey
      summary: Delete an API key.
      description: Delete an existing 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'
      tags:
        - search
  /1/keys/{key}/restore:
    post:
      operationId: restoreApiKey
      summary: Restore an API key.
      description: Restore a deleted API key, along with its associated rights.
      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'
      tags:
        - search
  /1/indexes/{indexName}/rules/{objectID}:
    put:
      operationId: saveRule
      summary: Save/Update a rule.
      description: Create or update the Rule with the specified objectID.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectID'
        - $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'
      tags:
        - search
    get:
      operationId: getRule
      summary: Get a rule.
      description: Retrieve the Rule with the specified objectID.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectID'
      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'
      tags:
        - search
    delete:
      operationId: deleteRule
      summary: Delete a rule.
      description: Delete the Rule with the specified objectID.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - $ref: '#/components/parameters/ObjectID'
        - $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'
      tags:
        - search
  /1/indexes/{indexName}/rules/batch:
    post:
      operationId: batchRules
      summary: Batch Rules.
      description: Create or update a batch of 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.
              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'
      tags:
        - search
  /1/indexes/{indexName}/rules/clear:
    post:
      operationId: clearRules
      summary: Clear Rules.
      description: Delete all Rules in 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'
      tags:
        - search
  /1/indexes/{indexName}/rules/search:
    post:
      operationId: searchRules
      summary: Search for rules.
      description: Search for rules matching various criteria.
      parameters:
        - $ref: '#/components/parameters/IndexName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              title: searchRulesParams
              description: Parameters for the search.
              additionalProperties: false
              properties:
                query:
                  $ref: '#/components/schemas/parameters_query'
                anchoring:
                  $ref: '#/components/schemas/anchoring'
                context:
                  type: string
                  description: >-
                    Restricts matches to contextual rules with a specific
                    context (exact match).
                page:
                  $ref: '#/components/schemas/parameters_page'
                hitsPerPage:
                  $ref: '#/components/schemas/parameters_hitsPerPage'
                enabled:
                  type: boolean
                  default: null
                  description: >-
                    When specified, restricts matches to rules with a specific
                    enabled status. When absent (default), all rules are
                    retrieved, regardless of their enabled status.
                requestOptions:
                  type: array
                  description: A mapping of requestOptions to send along with the request.
                  items:
                    type: object
                    description: Request Option.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: searchRulesResponse
                type: object
                additionalProperties: false
                required:
                  - hits
                  - nbHits
                  - page
                  - nbPages
                properties:
                  hits:
                    type: array
                    description: Fetched rules.
                    items:
                      $ref: '#/components/schemas/rule'
                  nbHits:
                    type: integer
                    description: Number of fetched rules.
                  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'
      tags:
        - search
  /1/dictionaries/{dictionaryName}/batch:
    post:
      operationId: batchDictionaryEntries
      description: Send a batch of dictionary entries.
      summary: Send a batch of dictionary entries.
      parameters:
        - $ref: '#/components/parameters/DictionaryName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: batchDictionaryEntriesParams
              description: The `batchDictionaryEntries` parameters.
              type: object
              required:
                - requests
              additionalProperties: false
              properties:
                clearExistingDictionaryEntries:
                  type: boolean
                  default: false
                  description: >-
                    When `true`, start the batch by removing all the custom
                    entries from the dictionary.
                requests:
                  type: array
                  description: >-
                    List of operations to batch. Each operation is described by
                    an `action` and a `body`.
                  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'
      tags:
        - search
  /1/dictionaries/{dictionaryName}/search:
    post:
      operationId: searchDictionaryEntries
      description: Search the dictionary entries.
      summary: Search the dictionary entries.
      parameters:
        - $ref: '#/components/parameters/DictionaryName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: searchDictionaryEntriesParams
              description: The `searchDictionaryEntries` parameters.
              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/language'
      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'
      tags:
        - search
  /1/dictionaries/*/settings:
    put:
      operationId: setDictionarySettings
      description: Set dictionary settings.
      summary: Set dictionary settings.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: dictionarySettingsParams
              type: object
              additionalProperties: false
              description: >-
                Disable the builtin Algolia entries for a type of dictionary per
                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'
      tags:
        - search
    get:
      operationId: getDictionarySettings
      description: Retrieve dictionaries settings.
      summary: >-
        Retrieve dictionaries settings. The API stores languages whose standard
        entries are disabled. Fetch settings does not return false values.
      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'
      tags:
        - search
  /1/dictionaries/*/languages:
    get:
      operationId: getDictionaryLanguages
      description: List dictionaries supported per language.
      summary: List dictionaries supported per language.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: getDictionaryLanguagesResponse
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/languages'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      tags:
        - search
  /1/clusters/mapping:
    post:
      operationId: assignUserId
      summary: Assign or Move userID
      description: >
        Assign or Move a userID to a cluster.

        The time it takes to migrate (move) a user is proportional to the amount
        of data linked to the userID.

        Upon success, the response is 200 OK.

        A successful response indicates that the operation has been taken into
        account, and the userID is directly usable.
      parameters:
        - $ref: '#/components/parameters/UserIDInQuery'
      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'
      tags:
        - search
    get:
      operationId: listUserIds
      summary: List userIDs
      description: >
        List the userIDs assigned to a multi-clusters appID.

        The data returned will usually be a few seconds behind real time,
        because userID usage may take up to a few seconds to propagate to the
        different clusters.

        Upon success, the response is 200 OK and contains the following userIDs
        data.
      parameters:
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/HitsPerPage'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: listUserIdsResponse
                type: object
                description: UserIDs data.
                properties:
                  userIDs:
                    type: array
                    description: List of userIDs.
                    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'
      tags:
        - search
  /1/clusters/mapping/batch:
    post:
      operationId: batchAssignUserIds
      summary: Batch assign userIDs
      description: >
        Assign multiple userIDs to a cluster.

        Upon success, the response is 200 OK.

        A successful response indicates that the operation has been taken into
        account, and the userIDs are directly usable.
      parameters:
        - $ref: '#/components/parameters/UserIDInQuery'
      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: >-
                    userIDs to assign. Note you cannot move users with this
                    method.
                  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'
      tags:
        - search
  /1/clusters/mapping/top:
    get:
      operationId: getTopUserIds
      summary: Get top userID
      description: >
        Get the top 10 userIDs with the highest number of records per cluster.

        The data returned will usually be a few seconds behind real time,
        because userID usage may take up to a few seconds to propagate to the
        different clusters.

        Upon success, the response is 200 OK and contains the following array of
        userIDs and clusters.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: getTopUserIdsResponse
                type: object
                description: Array of userIDs and clusters.
                properties:
                  topUsers:
                    type: array
                    description: Mapping of cluster names to top users.
                    items:
                      type: object
                      additionalProperties:
                        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'
      tags:
        - search
  /1/clusters/mapping/{userID}:
    get:
      operationId: getUserId
      summary: Get userID
      description: >
        Returns the userID data stored in the mapping.

        The data returned will usually be a few seconds behind real time,
        because userID usage may take up to a few seconds to propagate to the
        different clusters.

        Upon success, the response is 200 OK and contains the following userID
        data.
      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'
      tags:
        - search
    delete:
      operationId: removeUserId
      summary: Remove userID
      description: >
        Remove a userID and its associated data from the multi-clusters.

        Upon success, the response is 200 OK and a task is created to remove the
        userID data and mapping.
      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'
      tags:
        - search
  /1/clusters:
    get:
      operationId: listClusters
      summary: List clusters
      description: >
        List the clusters available in a multi-clusters setup for a single
        appID.

        Upon success, the response is 200 OK and contains the following
        clusters.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: listClustersResponse
                type: object
                description: Array of clusters.
                properties:
                  topUsers:
                    type: array
                    description: Mapping of cluster names to top users.
                    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'
      tags:
        - search
  /1/clusters/mapping/search:
    post:
      operationId: searchUserIds
      summary: Search userID
      description: >
        Search for userIDs.

        The data returned will usually be a few seconds behind real time,
        because userID usage may take up to a few seconds propagate to the
        different clusters.

        To keep updates moving quickly, the index of userIDs isn't built
        synchronously with the mapping. Instead, the index is built once every
        12h, at the same time as the update of userID usage. For example, when
        you perform a modification like adding or moving a userID, the search
        will report an outdated value until the next rebuild of the mapping,
        which takes place every 12h.

        Upon success, the response is 200 OK and contains the following userIDs
        data.
      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
                    typoTolerance. Use empty query to 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: List of user object matching the query.
                    items:
                      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:
                          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'
      tags:
        - search
  /1/clusters/mapping/pending:
    get:
      operationId: hasPendingMappings
      summary: Has pending mappings
      description: >
        Get the status of your clusters' migrations or user creations.

        Creating a large batch of users or migrating your multi-cluster may take
        quite some time. This method lets you retrieve the status of the
        migration, so you can know when it's done.

        Upon success, the response is 200 OK.

        A successful response indicates that the operation has been taken into
        account, and the userIDs are directly usable.
      parameters:
        - in: query
          name: getClusters
          description: Whether to get clusters or not.
          schema:
            type: boolean
      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'
      tags:
        - search
  /1/security/sources:
    get:
      operationId: getSources
      description: List all allowed sources.
      summary: List all allowed sources.
      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'
      tags:
        - search
    put:
      operationId: replaceSources
      description: Replace all allowed sources.
      summary: Replace all allowed sources.
      requestBody:
        required: true
        description: The sources to allow.
        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'
      tags:
        - search
  /1/security/sources/append:
    post:
      operationId: appendSource
      description: Add a single source to the list of allowed sources.
      summary: Add a single source.
      requestBody:
        required: true
        description: The 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'
      tags:
        - search
  /1/security/sources/{source}:
    delete:
      operationId: deleteSource
      description: Remove a single source from the list of allowed sources.
      summary: Remove a single source.
      parameters:
        - name: source
          in: path
          required: true
          description: The IP 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'
      tags:
        - search
  /1/logs:
    get:
      operationId: getLogs
      description: Return the lastest log entries.
      summary: Return the lastest log entries.
      parameters:
        - name: offset
          in: query
          description: >-
            First entry to retrieve (zero-based). Log entries are sorted by
            decreasing date, therefore 0 designates the most recent log entry.
          schema:
            type: integer
            default: 0
        - name: length
          in: query
          description: >-
            Maximum number of entries to retrieve. The maximum allowed value is
            1000.
          schema:
            type: integer
            default: 10
            maximum: 1000
        - name: indexName
          in: query
          description: >-
            Index for which log entries should be retrieved. When omitted, log
            entries are retrieved across all indices.
          schema:
            type: string
            nullable: true
        - name: type
          in: query
          description: >-
            Type of log entries to retrieve. When omitted, 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:
                      type: object
                      properties:
                        timestamp:
                          type: string
                          description: Timestamp in ISO-8601 format.
                        method:
                          type: string
                          description: HTTP method of the perfomed request.
                        answer_code:
                          type: string
                          description: HTTP response code.
                        query_body:
                          type: string
                          description: Request body. Truncated after 1000 characters.
                        answer:
                          type: string
                          description: Answer body. Truncated after 1000 characters.
                        url:
                          type: string
                          description: Request URL.
                        ip:
                          type: string
                          description: IP of the client which perfomed the request.
                        query_headers:
                          type: string
                          description: Request Headers (API Key is obfuscated).
                        sha1:
                          type: string
                          description: SHA1 signature of the log entry.
                        nb_api_calls:
                          type: string
                          description: Number of API calls.
                        processing_time_ms:
                          type: string
                          description: >-
                            Processing time for the query. It doesn't include
                            network time.
                        index:
                          type: string
                          description: Index targeted by the query.
                        query_params:
                          type: string
                          description: Query parameters sent with the request.
                        query_nb_hits:
                          type: string
                          description: Number of hits returned for the query.
                        inner_queries:
                          type: array
                          description: >-
                            Array of all performed queries for the given
                            request.
                          items:
                            type: object
                            properties:
                              index_name:
                                type: string
                                description: Index targeted by the query.
                              user_token:
                                type: string
                                description: User identifier.
                              query_id:
                                type: string
                                description: QueryID for the given query.
                      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'
      tags:
        - search
  /1/indexes/{indexName}/task/{taskID}:
    get:
      operationId: getTask
      description: Check the current status of a given task.
      summary: Check the current status of a given task.
      parameters:
        - $ref: '#/components/parameters/IndexName'
        - name: taskID
          in: path
          description: Unique identifier of an task. Numeric value (up to 64bits).
          required: true
          schema:
            type: integer
            example: '13235'
      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'
      tags:
        - search
  /1/indexes/{indexName}/operation:
    post:
      operationId: operationIndex
      summary: Copy/move index.
      description: Peforms a copy or a move operation on a index.
      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: >-
                    Scope of the data to copy. When absent, a full copy is
                    performed. When present, only the selected scopes are
                    copied.
              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'
      tags:
        - search
  /1/indexes:
    get:
      operationId: listIndices
      summary: List existing indexes.
      description: List existing indexes from an application.
      parameters:
        - $ref: '#/components/parameters/Page'
      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'
      tags:
        - search
