From 318784095e6b2ed472cbb251f19e48adbd123465 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Mon, 12 May 2025 16:23:41 +0200 Subject: [PATCH] feat: update specs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: algolia-bot Co-authored-by: Clément Vannicatte --- src/data/abtesting.json | 166 +- src/data/advanced-personalization.json | 1354 ++++++++ src/data/analytics.json | 459 ++- src/data/composition-full.json | 4099 ++++++++++++++++++++++++ src/data/composition.json | 1823 +++++++++++ src/data/crawler.json | 3271 +++++++++++++++++++ src/data/ingestion.json | 1223 +++++-- src/data/insights.json | 1843 +++++++++++ src/data/monitoring.json | 90 +- src/data/personalization.json | 716 +++++ src/data/query-suggestions.json | 164 +- src/data/recommend.json | 858 +++-- src/data/search.json | 1792 ++++++++--- 13 files changed, 16801 insertions(+), 1057 deletions(-) create mode 100644 src/data/advanced-personalization.json create mode 100644 src/data/composition-full.json create mode 100644 src/data/composition.json create mode 100644 src/data/crawler.json create mode 100644 src/data/insights.json create mode 100644 src/data/personalization.json diff --git a/src/data/abtesting.json b/src/data/abtesting.json index c8e034f..70e5b79 100644 --- a/src/data/abtesting.json +++ b/src/data/abtesting.json @@ -10,8 +10,11 @@ "url": "https://analytics.{region}.algolia.com", "variables": { "region": { - "definition": "The log region is configured at the application level.", - "enum": ["us", "de"], + "description": "The region where your Algolia application is hosted.", + "enum": [ + "us", + "de" + ], "default": "us" } } @@ -74,8 +77,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["abtesting"] + } }, "post": { "operationId": "customPost", @@ -122,8 +124,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["abtesting"] + } }, "put": { "operationId": "customPut", @@ -170,8 +171,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["abtesting"] + } }, "delete": { "operationId": "customDelete", @@ -208,15 +208,18 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["abtesting"] + } } }, "/2/abtests": { "post": { - "tags": ["abtesting"], + "tags": [ + "abtest" + ], "operationId": "addABTests", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Create an A/B test", "description": "Creates a new A/B test.", "requestBody": { @@ -244,7 +247,11 @@ "$ref": "#/components/schemas/endAt" } }, - "required": ["name", "variants", "endAt"] + "required": [ + "name", + "variants", + "endAt" + ] } } } @@ -286,9 +293,14 @@ } }, "get": { - "tags": ["abtesting"], + "tags": [ + "abtest" + ], "operationId": "listABTests", - "x-acl": ["analytics"], + "x-mcp-tool": true, + "x-acl": [ + "analytics" + ], "summary": "List all A/B tests", "description": "Lists all A/B tests you configured for this application.", "parameters": [ @@ -367,7 +379,11 @@ "example": 12 } }, - "required": ["abtests", "count", "total"] + "required": [ + "abtests", + "count", + "total" + ] } } } @@ -389,9 +405,13 @@ }, "/2/abtests/{id}": { "get": { - "tags": ["abtesting"], + "tags": [ + "abtest" + ], "operationId": "getABTest", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve A/B test details", "description": "Retrieves the details for an A/B test by its ID.", "parameters": [ @@ -436,9 +456,13 @@ } }, "delete": { - "tags": ["abtesting"], + "tags": [ + "abtest" + ], "operationId": "deleteABTest", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Delete an A/B test", "description": "Deletes an A/B test by its ID.", "parameters": [ @@ -485,9 +509,13 @@ }, "/2/abtests/{id}/stop": { "post": { - "tags": ["abtesting"], + "tags": [ + "abtest" + ], "operationId": "stopABTest", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Stop an A/B test", "description": "Stops an A/B test by its ID.\n\nYou can't restart stopped A/B tests.\n", "parameters": [ @@ -534,9 +562,13 @@ }, "/2/abtests/schedule": { "post": { - "tags": ["abtesting"], + "tags": [ + "abtest" + ], "operationId": "scheduleABTest", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Schedule an A/B test", "description": "Schedule an A/B test to be started at a later time.\n", "requestBody": { @@ -567,7 +599,12 @@ "$ref": "#/components/schemas/endAt" } }, - "required": ["name", "variants", "scheduledAt", "endAt"] + "required": [ + "name", + "variants", + "scheduledAt", + "endAt" + ] } } } @@ -611,9 +648,13 @@ }, "/2/abtests/estimate": { "post": { - "tags": ["abtesting"], + "tags": [ + "abtest" + ], "operationId": "estimateABTest", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Estimate the sample size and duration of an A/B test", "description": "Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic.", "requestBody": { @@ -640,7 +681,9 @@ "$ref": "#/components/schemas/MinimumDetectableEffect" } }, - "required": ["minimumDetectableEffect"] + "required": [ + "minimumDetectableEffect" + ] }, "variants": { "type": "array", @@ -652,7 +695,10 @@ } } }, - "required": ["configuration", "variants"] + "required": [ + "configuration", + "variants" + ] } } } @@ -698,7 +744,9 @@ "get": { "x-helper": true, "x-asynchronous-helper": false, - "tags": ["abtesting"], + "tags": [ + "Api Key" + ], "operationId": "setClientApiKey", "summary": "Switch the API key used to authenticate requests", "description": "Switch the API key used to authenticate requests.\n", @@ -808,7 +856,12 @@ "type": "string", "description": "A/B test status.\n\n- `active`. The A/B test is live and search traffic is split between the two variants.\n- `stopped`. You stopped the A/B test. The A/B test data is still available for analysis.\n- `expired`. The A/B test was automatically stopped after reaching its end date.\n- `failed`. Creating the A/B test failed.\n", "example": "active", - "enum": ["active", "stopped", "expired", "failed"] + "enum": [ + "active", + "stopped", + "expired", + "failed" + ] }, "currency": { "type": "object", @@ -1135,7 +1188,12 @@ "EffectMetric": { "type": "string", "description": "Metric for which you want to detect the smallest relative difference.", - "enum": ["addToCartRate", "clickThroughRate", "conversionRate", "purchaseRate"] + "enum": [ + "addToCartRate", + "clickThroughRate", + "conversionRate", + "purchaseRate" + ] }, "MinimumDetectableEffect": { "type": "object", @@ -1152,7 +1210,10 @@ "$ref": "#/components/schemas/EffectMetric" } }, - "required": ["size", "metric"] + "required": [ + "size", + "metric" + ] }, "ABTestConfiguration": { "title": "configuration", @@ -1271,7 +1332,15 @@ "$ref": "#/components/schemas/ABTestConfiguration" } }, - "required": ["status", "name", "createdAt", "endAt", "updatedAt", "abTestID", "variants"] + "required": [ + "status", + "name", + "createdAt", + "endAt", + "updatedAt", + "abTestID", + "variants" + ] }, "ABTests": { "oneOf": [ @@ -1301,7 +1370,10 @@ "$ref": "#/components/schemas/description" } }, - "required": ["index", "trafficPercentage"] + "required": [ + "index", + "trafficPercentage" + ] }, "customSearchParams": { "type": "object", @@ -1316,8 +1388,12 @@ "type": "object" } }, - "required": ["customSearchParameters"], - "x-discriminator-fields": ["customSearchParameters"] + "required": [ + "customSearchParameters" + ], + "x-discriminator-fields": [ + "customSearchParameters" + ] }, "abTestsVariantSearchParams": { "allOf": [ @@ -1359,7 +1435,11 @@ "$ref": "#/components/schemas/taskID" } }, - "required": ["abTestID", "index", "taskID"] + "required": [ + "abTestID", + "index", + "taskID" + ] }, "scheduledAt": { "type": "string", @@ -1379,7 +1459,9 @@ "$ref": "#/components/schemas/abTestScheduleID" } }, - "required": ["abTestScheduleID"] + "required": [ + "abTestScheduleID" + ] }, "EstimateABTestResponse": { "type": "object", @@ -1472,7 +1554,9 @@ "x-tagGroups": [ { "name": "General", - "tags": ["abtest"] + "tags": [ + "abtest" + ] } ] -} +} \ No newline at end of file diff --git a/src/data/advanced-personalization.json b/src/data/advanced-personalization.json new file mode 100644 index 0000000..779f855 --- /dev/null +++ b/src/data/advanced-personalization.json @@ -0,0 +1,1354 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Advanced Personalization API", + "description": "The Advanced Personalization API lets you access user profiles built based on the behavior of your users on your website or app.\n\n## Client libraries\n\nUse Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps.\nThe official API clients are covered by Algolia's [Service Level Agreement](https://www.algolia.com/policies/sla/).\n\nSee: [Algolia's ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/)\n\n## Base URLs\n\nThe Advanced Personalization API can be reached from multiple domains, each specific to a region.\n\n- `https://ai-personalization.eu.algolia.com`\n- `https://ai-personalization.us.algolia.com`\n\nUse the URL that matches your [analytics region](https://dashboard.algolia.com/account/infrastructure/analytics).\n\n**All requests must use HTTPS.**\n\n## Authentication\n\nTo authenticate your API requests, add these headers:\n\n- `x-algolia-application-id`. Your Algolia application ID.\n- `x-algolia-api-key`. An API key with the `search`, `browse` and `recommendation` ACL permissions.\n\nYou can find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account).\n\n## Request format\n\nRequest bodies must be JSON objects.\n\n## Response status and errors\n\nThe Advanced Personalization API returns JSON responses.\nSince JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API response.\n\nSuccessful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status.\nError responses have a `message` property with more information.\n\n## Rate limiting\n\nWhen making requests to the Advanced Personalization API, you are limited to 500 API calls per minute per application.\n\nThe following headers provide information about your current limit:\n\n- `x-ratelimit-limit`: The number of requests allowed every 60 seconds.\n- `x-ratelimit-remaining`: The number of requests remaining in the current 60 second period.\n- `x-ratelimit-reset`: [Unix timestamp](https://www.unixtimestamp.com/) of the next time period.\n\n## Version\n\nThe current version of the Advanced Personalization API is version 2, as indicated by the `/2/` in each endpoint's URL.\n", + "version": "2.0.0" + }, + "servers": [ + { + "url": "https://ai-personalization.{region}.algolia.com", + "variables": { + "region": { + "description": "Use the URL that matches your [analytics region](https://dashboard.algolia.com/account/infrastructure/analytics).\n", + "enum": [ + "eu", + "us" + ], + "default": "eu" + } + } + } + ], + "security": [ + { + "applicationId": [], + "apiKey": [] + } + ], + "tags": [ + { + "name": "config", + "x-displayName": "Configuration", + "description": "Manage your Advanced Personalization configuration.\n\nThe configuration defines the indices, facet attributes and events that describe your user's \nbehaviour on your website or app. It helps Advanced Personalization determine how personalization should affect the search results.\n" + }, + { + "name": "users", + "x-displayName": "Users", + "description": "Manage user profiles generated by Advanced Personalization.\n\nUser profiles contain the affinities each user has for the different facets in your index.\n", + "externalDocs": { + "url": "https://www.algolia.com/doc/guides/personalization/ai-personalization/what-is-ai-personalization/concepts/user-profiles/", + "description": "Related guide: User Profiles.\n" + } + } + ], + "externalDocs": { + "url": "https://www.algolia.com/doc/guides/personalization/ai-personalization/what-is-ai-personalization/" + }, + "paths": { + "/{path}": { + "get": { + "operationId": "customGet", + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + }, + "post": { + "operationId": "customPost", + "requestBody": { + "description": "Parameters to send with the custom request.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + }, + "put": { + "operationId": "customPut", + "requestBody": { + "description": "Parameters to send with the custom request.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + }, + "delete": { + "operationId": "customDelete", + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + } + }, + "/2/config": { + "get": { + "tags": [ + "config" + ], + "operationId": "getConfig", + "x-acl": [ + "search", + "browse", + "recommendation" + ], + "summary": "Retrieve the configuration", + "description": "Retrieves a list of configuration objects for each index.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/configurationObject" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "put": { + "tags": [ + "config" + ], + "operationId": "putConfig", + "x-acl": [ + "search", + "browse", + "recommendation" + ], + "summary": "Update the configuration", + "description": "Updates the configuration.\n\nThe configuration is a list of configuration objects for each index. To configure Advanced Personalization for an index, create a new configuration object for the index.\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "configurationParameters", + "type": "object", + "properties": { + "indices": { + "type": "array", + "items": { + "title": "configurationParametersObject", + "type": "object", + "properties": { + "index": { + "type": "string" + }, + "affinities": { + "type": "array", + "items": { + "type": "string" + } + }, + "source": { + "title": "source", + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/sourceType" + }, + "events": { + "$ref": "#/components/schemas/events" + } + }, + "required": [ + "type" + ] + } + } + }, + "required": [ + "index", + "affinities", + "source" + ] + }, + "personalizationReRanking": { + "$ref": "#/components/schemas/personalizationReRanking" + }, + "profileType": { + "$ref": "#/components/schemas/profileType" + }, + "features": { + "$ref": "#/components/schemas/features" + } + }, + "required": [ + "indices", + "personalizationReRanking", + "profileType", + "features" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "putConfigResponse", + "type": "object", + "properties": { + "status": { + "type": "number" + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/issue" + } + }, + "warnings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/issue" + } + }, + "message": { + "type": "string" + } + }, + "required": [ + "status", + "errors", + "warnings", + "message" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest-2" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled-2" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/2/users": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUsers", + "x-acl": [ + "search", + "browse", + "recommendation" + ], + "summary": "Get a list of user profiles", + "description": "Retrieves a list of user profiles in [lexicographical order](https://www.educative.io/answers/what-is-a-lexicographic-order).", + "parameters": [ + { + "$ref": "#/components/parameters/startDate" + }, + { + "$ref": "#/components/parameters/endDate" + }, + { + "$ref": "#/components/parameters/indices" + }, + { + "$ref": "#/components/parameters/affinity" + }, + { + "$ref": "#/components/parameters/limit" + }, + { + "$ref": "#/components/parameters/nextPageToken" + }, + { + "$ref": "#/components/parameters/previousPageToken" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "getUsersResponse", + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/user" + } + }, + "previousPageToken": { + "type": "string" + }, + "nextPageToken": { + "type": "string" + } + }, + "required": [ + "users" + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "422": { + "$ref": "#/components/responses/GenericUnprocessableEntity" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/2/users/{userID}": { + "get": { + "tags": [ + "users" + ], + "operationId": "getUser", + "x-acl": [ + "search", + "browse", + "recommendation" + ], + "summary": "Get a user profile", + "description": "Retrieves a user profile.", + "parameters": [ + { + "$ref": "#/components/parameters/userID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/user" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadUserID" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "404": { + "$ref": "#/components/responses/GenericNotFound" + }, + "422": { + "$ref": "#/components/responses/InvalidUserID" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "delete": { + "tags": [ + "users" + ], + "operationId": "deleteUser", + "x-acl": [ + "search", + "browse", + "recommendation" + ], + "summary": "Delete a user profile", + "description": "Deletes a user profile.", + "parameters": [ + { + "$ref": "#/components/parameters/userID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "deleteUserResponse", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "userID": { + "type": "string" + }, + "deletedUntil": { + "type": "string" + }, + "deletedAt": { + "type": "string" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadUserID" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "422": { + "$ref": "#/components/responses/InvalidUserID" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + } + }, + "components": { + "securitySchemes": { + "applicationId": { + "type": "apiKey", + "in": "header", + "name": "x-algolia-application-id", + "description": "Your Algolia application ID." + }, + "apiKey": { + "type": "apiKey", + "in": "header", + "name": "x-algolia-api-key", + "description": "Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n" + } + }, + "parameters": { + "PathInPath": { + "name": "path", + "in": "path", + "description": "Path of the endpoint, anything after \"/1\" must be specified.", + "required": true, + "schema": { + "type": "string", + "example": "/keys" + } + }, + "Parameters": { + "name": "parameters", + "in": "query", + "description": "Query parameters to apply to the current query.", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "startDate": { + "name": "startDate", + "description": "Filter users by start date (in RFC3339 format).\nOnly users that were updated after the passed date will be returned.\n", + "in": "query", + "schema": { + "type": "string", + "example": "2024-06-27T08:27:26Z" + } + }, + "endDate": { + "name": "endDate", + "description": "Filter users by end date (in RFC3339 format).\nOnly users that were updated before the passed date will be returned.\n", + "in": "query", + "schema": { + "type": "string", + "example": "2024-06-28T08:27:26Z" + } + }, + "indices": { + "name": "indices", + "description": "Filter users by matching indices.\nIf multiple indices are passed, returned users will match all indices.\n", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "singleIndex": { + "value": [ + "products_EN" + ], + "summary": "Filter by single index" + }, + "multipleIndices": { + "value": [ + "products_EN", + "products_FR" + ], + "summary": "Filter by multiple indices" + } + }, + "style": "form", + "explode": false + }, + "affinity": { + "name": "affinity", + "description": "Filter users by affinity name and value.\nIf multiple values are passed, returned users will match all values.\n", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "examples": { + "affinityName": { + "value": "brand", + "summary": "Filter by single affinity name" + }, + "affinityValuePair": { + "value": "brand:Nike", + "summary": "Filter by single affinity name and value" + }, + "multipleAffinityNames": { + "value": "brand,color", + "summary": "Filter by multiple affinity names" + }, + "multipleAffinityValuePairs": { + "value": "brand:Nike,color:white", + "summary": "Filter by multiple affinity name and value pairs" + } + } + }, + "limit": { + "name": "limit", + "description": "Limit the number of users in the response.\nThe value of this parameter ranges from 1 to 1000.\n", + "in": "query", + "schema": { + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 1000 + } + }, + "nextPageToken": { + "name": "nextPageToken", + "description": "Reference for the next page, when navigating forward using pagination.\nCan't be used in the same request as `previousPageToken`.\n", + "in": "query", + "schema": { + "type": "string" + } + }, + "previousPageToken": { + "name": "previousPageToken", + "description": "Reference for the previous page, when navigating backward using pagination.\nCan't be used in the same request as `nextPageToken`.\n", + "in": "query", + "schema": { + "type": "string" + } + }, + "userID": { + "name": "userID", + "description": "ID of the user.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + }, + "schemas": { + "ErrorBase": { + "description": "Error.", + "type": "object", + "x-keep-model": true, + "additionalProperties": true, + "properties": { + "message": { + "type": "string", + "example": "Invalid Application-Id or API-Key" + } + } + }, + "sourceType": { + "title": "type", + "type": "string", + "enum": [ + "insights" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "view", + "click", + "conversion" + ] + }, + "subtype": { + "type": "string", + "enum": [ + "addToCart", + "purchase" + ] + }, + "event": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/eventType" + }, + "subtype": { + "$ref": "#/components/schemas/subtype" + }, + "name": { + "type": "string" + } + }, + "required": [ + "type", + "name" + ] + }, + "events": { + "type": "object", + "properties": { + "viewDetails": { + "type": "array", + "items": { + "$ref": "#/components/schemas/event" + } + }, + "viewListing": { + "type": "array", + "items": { + "$ref": "#/components/schemas/event" + } + }, + "addToCart": { + "type": "array", + "items": { + "$ref": "#/components/schemas/event" + } + }, + "purchase": { + "type": "array", + "items": { + "$ref": "#/components/schemas/event" + } + } + }, + "required": [ + "viewDetails", + "viewListing", + "addToCart", + "purchase" + ] + }, + "issue": { + "type": "object", + "description": "An issue is either an 'error' or a 'warning' that is generated by the validator.", + "properties": { + "code": { + "type": "string" + }, + "index": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "index", + "message" + ] + }, + "personalizationReRanking": { + "type": "string", + "description": "The impact that personalization has on the re-ranking of search results.", + "enum": [ + "none", + "low", + "medium", + "high", + "maximum" + ] + }, + "profileType": { + "type": "string", + "enum": [ + "basic" + ], + "description": "The type of user profiles to generate.\n\nBasic profiles are based on past behaviors, ensuring search results align with previous interests.\n" + }, + "status": { + "title": "status", + "type": "string", + "enum": [ + "pending", + "active", + "paused" + ] + }, + "errorCodes": { + "title": "errorCodes", + "type": "string", + "enum": [ + "blocked", + "deleted", + "no_perso_access", + "all_attr_value_filtered", + "missing_index", + "no_events_last_30_days", + "pending_pipelines", + "invalid_config", + "all_facets_invalid" + ] + }, + "Configuration_status": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/status" + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/errorCodes" + } + }, + "lastUpdatedAt": { + "type": "string" + } + } + }, + "realtime": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether the realtime personalization feature is enabled." + } + } + }, + "features": { + "type": "object", + "properties": { + "realtime": { + "$ref": "#/components/schemas/realtime" + } + } + }, + "configurationObject": { + "type": "object", + "properties": { + "indices": { + "type": "array", + "items": { + "title": "configurationObject", + "type": "object", + "properties": { + "index": { + "type": "string" + }, + "affinities": { + "type": "array", + "items": { + "type": "string" + } + }, + "source": { + "title": "source", + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/sourceType" + }, + "events": { + "$ref": "#/components/schemas/events" + } + } + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/issue" + } + }, + "warnings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/issue" + } + }, + "lastUpdatedAt": { + "type": "string" + } + }, + "required": [ + "index", + "affinities", + "source", + "errors", + "warnings", + "lastUpdatedAt" + ] + } + }, + "personalizationReRanking": { + "$ref": "#/components/schemas/personalizationReRanking" + }, + "profileType": { + "$ref": "#/components/schemas/profileType" + }, + "status": { + "$ref": "#/components/schemas/Configuration_status" + }, + "features": { + "$ref": "#/components/schemas/features" + } + }, + "required": [ + "indices", + "personalzationReRanking", + "profileType", + "status", + "features" + ] + }, + "unauthorized": { + "type": "integer", + "description": "HTTP status code for an authorization error.", + "enum": [ + 401 + ] + }, + "ErrorMessages_unauthorized": { + "type": "string", + "description": "Details about the response, such as error messages.", + "enum": [ + "Unauthorized" + ] + }, + "ErrorResponses_unauthorized": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/unauthorized" + }, + "message": { + "$ref": "#/components/schemas/ErrorMessages_unauthorized" + } + } + }, + "internalServerError": { + "type": "integer", + "description": "HTTP status code for an internal server error.", + "enum": [ + 500 + ] + }, + "ErrorMessages_internalServerError": { + "type": "string", + "description": "Details about the response, such as error messages.", + "enum": [ + "Internal Server Error" + ] + }, + "ErrorResponses_internalServerError": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/internalServerError" + }, + "message": { + "$ref": "#/components/schemas/ErrorMessages_internalServerError" + } + } + }, + "badRequest": { + "type": "integer", + "description": "HTTP status code for a bad request error.", + "enum": [ + 400 + ] + }, + "ErrorMessages_badRequest": { + "type": "string", + "description": "Details about the response, such as error messages.", + "enum": [ + "Invalid request body" + ] + }, + "ErrorResponses_badRequest": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/badRequest" + }, + "message": { + "$ref": "#/components/schemas/ErrorMessages_badRequest" + } + } + }, + "paymentRequired": { + "type": "integer", + "description": "HTTP status code for a payment required error.", + "enum": [ + 402 + ] + }, + "featureNotEnabled": { + "type": "string", + "description": "Details about the response, such as error messages.", + "enum": [ + "Predictive profiles are not allowed for this app. Please contact support to upgrade your plan: https://support.algolia.com/", + "Realtime Personalization is not allowed for this app. Please contact support to upgrade your plan: https://support.algolia.com/" + ] + }, + "ErrorResponses_featureNotEnabled": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/paymentRequired" + }, + "message": { + "$ref": "#/components/schemas/featureNotEnabled" + } + } + }, + "user": { + "type": "object", + "properties": { + "userID": { + "type": "string" + }, + "affinities": { + "type": "array", + "items": { + "title": "affinity", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "indices": { + "type": "array", + "items": { + "type": "string", + "minimum": 1 + } + }, + "value": { + "type": "string" + }, + "score": { + "type": "number", + "minimum": 1, + "maximum": 20 + }, + "lastUpdatedAt": { + "type": "string" + } + }, + "required": [ + "name", + "indices", + "value", + "score", + "lastUpdatedAt" + ] + } + }, + "lastUpdatedAt": { + "type": "string" + } + }, + "required": [ + "userID", + "affinities", + "lastUpdatedAt" + ] + }, + "unprocessableEntity": { + "type": "integer", + "description": "HTTP status code for an unprocessable entity error.", + "enum": [ + 422 + ] + }, + "genericUnprocessableEntity": { + "type": "string", + "description": "Details about the response, such as error messages.", + "enum": [ + "Unprocessable Entity" + ] + }, + "ErrorResponses_genericUnprocessableEntity": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/unprocessableEntity" + }, + "message": { + "$ref": "#/components/schemas/genericUnprocessableEntity" + } + } + }, + "badUserID": { + "type": "string", + "description": "Details about the response, such as error messages.", + "enum": [ + "Invalid userID format" + ] + }, + "ErrorResponses_badUserID": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/badRequest" + }, + "message": { + "$ref": "#/components/schemas/badUserID" + } + } + }, + "notFound": { + "type": "integer", + "description": "HTTP status code for a not found error.", + "enum": [ + 404 + ] + }, + "genericNotFound": { + "type": "string", + "description": "Details about the response, such as error messages.", + "enum": [ + "Not Found" + ] + }, + "ErrorResponses_genericNotFound": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/notFound" + }, + "message": { + "$ref": "#/components/schemas/genericNotFound" + } + } + }, + "invalidUserID": { + "type": "string", + "description": "Details about the response, such as error messages.", + "enum": [ + "UserID must contain only alphanumeric", + "equal", + "plus", + "slash", + "hyphen", + "or underscore characters", + "and be between 1 and 129 characters long" + ] + }, + "ErrorResponses_invalidUserID": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/unprocessableEntity" + }, + "message": { + "$ref": "#/components/schemas/invalidUserID" + } + } + } + }, + "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" + } + } + } + }, + "Unauthorized": { + "description": "Not authorized to access this resource.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponses_unauthorized" + } + } + } + }, + "InternalServerError": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponses_internalServerError" + } + } + } + }, + "BadRequest-2": { + "description": "Bad request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponses_badRequest" + } + } + } + }, + "FeatureNotEnabled-2": { + "description": "Feature not enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponses_featureNotEnabled" + } + } + } + }, + "GenericUnprocessableEntity": { + "description": "Unprocessable entity.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponses_genericUnprocessableEntity" + } + } + } + }, + "BadUserID": { + "description": "Bad user ID.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponses_badUserID" + } + } + } + }, + "GenericNotFound": { + "description": "Not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponses_genericNotFound" + } + } + } + }, + "InvalidUserID": { + "description": "Invalid user ID format.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponses_invalidUserID" + } + } + } + } + } + }, + "x-tagGroups": [ + { + "name": "Advanced Personalization", + "tags": [ + "config", + "users" + ] + } + ] +} \ No newline at end of file diff --git a/src/data/analytics.json b/src/data/analytics.json index 3dc6b4c..466f6b3 100644 --- a/src/data/analytics.json +++ b/src/data/analytics.json @@ -10,7 +10,11 @@ "url": "https://analytics.{region}.algolia.com", "variables": { "region": { - "enum": ["us", "de"], + "description": "The region where your Algolia application is hosted.", + "enum": [ + "us", + "de" + ], "default": "us" } } @@ -98,8 +102,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["analytics"] + } }, "post": { "operationId": "customPost", @@ -146,8 +149,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["analytics"] + } }, "put": { "operationId": "customPut", @@ -194,8 +196,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["analytics"] + } }, "delete": { "operationId": "customDelete", @@ -232,15 +233,19 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["analytics"] + } } }, "/2/searches": { "get": { - "tags": ["analytics"], + "tags": [ + "search" + ], "operationId": "getTopSearches", - "x-acl": ["analytics"], + "x-mcp-tool": true, + "x-acl": [ + "analytics" + ], "summary": "Retrieve top searches", "description": "Returns the most popular searches. For each search, it also includes the average number of hits.\n\nIf you set the `clickAnalytics` query parameter to `true`, the response also includes\n\n- Tracked searches count. Tracked searches are Search API requests with the `clickAnalytics` parameter set to `true`. This differs from the response's `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`.\n- Click count\n- Click-through rate (CTR)\n- Conversion count\n- Conversion rate (CR)\n- Average click position\n\nIf you set the `revenueAnalytics` query parameter to `true`, the response also includes:\n\n- Add-to-cart count\n- Add-to-cart rate (ATCR)\n- Purchase count\n- Purchase rate\n- Revenue details for each currency\n\n**There's a difference between 0% rates and null rates:**\n\n- **Null** means there were no queries: since Algolia didn't receive any events, the rates (CTR, CR, ATCR, purchase rate) are null.\n- **0% rates** mean there _were_ queries but no [click or conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started/) were received.\n", "parameters": [ @@ -314,9 +319,13 @@ }, "/2/searches/count": { "get": { - "tags": ["analytics"], + "tags": [ + "search" + ], "operationId": "getSearchesCount", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve number of searches", "description": "Retrieves the number of searches within a time range, including a daily breakdown.\n\nBy default, the analyzed period includes the last eight days including the current day.\n", "parameters": [ @@ -353,7 +362,10 @@ "title": "getSearchesCountResponse", "type": "object", "additionalProperties": false, - "required": ["dates", "count"], + "required": [ + "dates", + "count" + ], "properties": { "count": { "$ref": "#/components/schemas/parameters_count" @@ -365,7 +377,10 @@ "title": "dailySearches", "type": "object", "additionalProperties": false, - "required": ["date", "count"], + "required": [ + "date", + "count" + ], "properties": { "date": { "$ref": "#/components/schemas/date" @@ -398,9 +413,13 @@ }, "/2/searches/noResults": { "get": { - "tags": ["analytics"], + "tags": [ + "search" + ], "operationId": "getSearchesNoResults", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve the most frequent searches without results", "description": "Retrieves the 1,000 most frequent searches that produced zero results.", "parameters": [ @@ -443,7 +462,9 @@ "title": "getSearchesNoResultsResponse", "type": "object", "additionalProperties": false, - "required": ["searches"], + "required": [ + "searches" + ], "properties": { "searches": { "type": "array", @@ -452,7 +473,11 @@ "title": "dailySearchesNoResults", "type": "object", "additionalProperties": false, - "required": ["search", "count", "withFilterCount"], + "required": [ + "search", + "count", + "withFilterCount" + ], "properties": { "search": { "$ref": "#/components/schemas/search" @@ -488,9 +513,13 @@ }, "/2/searches/noClicks": { "get": { - "tags": ["analytics"], + "tags": [ + "click" + ], "operationId": "getSearchesNoClicks", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve top searches without clicks", "description": "Retrieves the most popular searches that didn't lead to any clicks, from the 1,000 most frequent searches.\n\nFor each search, it also returns the number of displayed search results that remained unclicked.\n", "parameters": [ @@ -533,7 +562,9 @@ "title": "getSearchesNoClicksResponse", "type": "object", "additionalProperties": false, - "required": ["searches"], + "required": [ + "searches" + ], "properties": { "searches": { "type": "array", @@ -542,7 +573,11 @@ "title": "dailySearchesNoClicks", "type": "object", "additionalProperties": false, - "required": ["search", "count", "nbHits"], + "required": [ + "search", + "count", + "nbHits" + ], "properties": { "search": { "$ref": "#/components/schemas/search" @@ -581,9 +616,14 @@ }, "/2/searches/noResultRate": { "get": { - "tags": ["analytics"], + "tags": [ + "search" + ], "operationId": "getNoResultsRate", - "x-acl": ["analytics"], + "x-mcp-tool": true, + "x-acl": [ + "analytics" + ], "summary": "Retrieve no results rate", "description": "Retrieves the fraction of searches that didn't return any results within a time range, including a daily breakdown.\nIt also returns the count of searches and searches without results used to compute the rates.\n\nBy default, the analyzed period includes the last eight days including the current day.\n", "parameters": [ @@ -620,7 +660,12 @@ "title": "getNoResultsRateResponse", "type": "object", "additionalProperties": false, - "required": ["rate", "count", "noResultCount", "dates"], + "required": [ + "rate", + "count", + "noResultCount", + "dates" + ], "properties": { "rate": { "$ref": "#/components/schemas/noResultsRate" @@ -638,7 +683,12 @@ "title": "dailyNoResultsRates", "type": "object", "additionalProperties": false, - "required": ["date", "noResultCount", "count", "rate"], + "required": [ + "date", + "noResultCount", + "count", + "rate" + ], "properties": { "date": { "$ref": "#/components/schemas/date" @@ -677,9 +727,13 @@ }, "/2/searches/noClickRate": { "get": { - "tags": ["analytics"], + "tags": [ + "click" + ], "operationId": "getNoClickRate", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve no click rate", "description": "Retrieves the fraction of searches that didn't lead to any click within a time range, including a daily breakdown.\nIt also returns the number of tracked searches and tracked searches without clicks.\n\nBy default, the analyzed period includes the last eight days including the current day.\n", "parameters": [ @@ -716,7 +770,12 @@ "title": "getNoClickRateResponse", "type": "object", "additionalProperties": false, - "required": ["dates", "count", "noClickCount", "rate"], + "required": [ + "dates", + "count", + "noClickCount", + "rate" + ], "properties": { "rate": { "$ref": "#/components/schemas/noClickRate" @@ -734,7 +793,12 @@ "title": "dailyNoClickRates", "type": "object", "additionalProperties": false, - "required": ["rate", "count", "noClickCount", "date"], + "required": [ + "rate", + "count", + "noClickCount", + "date" + ], "properties": { "rate": { "$ref": "#/components/schemas/noClickRate" @@ -773,9 +837,14 @@ }, "/2/hits": { "get": { - "tags": ["analytics"], + "tags": [ + "search" + ], "operationId": "getTopHits", - "x-acl": ["analytics"], + "x-mcp-tool": true, + "x-acl": [ + "analytics" + ], "summary": "Retrieve top search results", "description": "Retrieves the object IDs of the 1,000 most frequent search results.\n\nIf you set the `clickAnalytics` query parameter to true, the response also includes:\n\n- Tracked searches count. Tracked searches are Search API requests with the `clickAnalytics` parameter set to `true`. This differs from the response's `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`.\n- Click count\n- Click-through rate (CTR)\n- Conversion count\n- Conversion rate (CR)\n- Average click position\n\nIf you set the `revenueAnalytics` parameter to `true`, the response also includes:\n\n- Add-to-cart count\n- Add-to-cart rate (ATCR)\n- Purchase count\n- Purchase rate\n- Revenue details for each currency\n\n**There's a difference between 0% rates and null rates:**\n\n- **Null** means there were no queries: since Algolia didn't receive any events, the rates (CTR, CR, ATCR, purchase rate) are null.\n- **0% rates** mean there _were_ queries but no [click or conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started/) were received.\n", "parameters": [ @@ -846,9 +915,13 @@ }, "/2/users/count": { "get": { - "tags": ["analytics"], + "tags": [ + "user" + ], "operationId": "getUsersCount", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve number of users", "description": "Retrieves the number of unique users within a time range, including a daily breakdown.\n\nSince it returns the number of unique users, the sum of the daily values might be different from the total number.\n\nBy default:\n\n- Algolia distinguishes search users by their IP address, _unless_ you include a pseudonymous user identifier in your search requests with the `userToken` API parameter or `x-algolia-usertoken` request header.\n- The analyzed period includes the last eight days including the current day.\n", "externalDocs": { @@ -889,7 +962,10 @@ "title": "getUsersCountResponse", "type": "object", "additionalProperties": false, - "required": ["dates", "count"], + "required": [ + "dates", + "count" + ], "properties": { "count": { "type": "integer", @@ -902,7 +978,10 @@ "title": "dailyUsers", "type": "object", "additionalProperties": false, - "required": ["date", "count"], + "required": [ + "date", + "count" + ], "properties": { "date": { "$ref": "#/components/schemas/date" @@ -936,9 +1015,13 @@ }, "/2/filters": { "get": { - "tags": ["analytics"], + "tags": [ + "filter" + ], "operationId": "getTopFilterAttributes", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve top filters", "description": "Retrieves the 1,000 most frequently used filter attributes.\n\nThese are attributes of your records that you included in the `attributesForFaceting` setting.\n", "parameters": [ @@ -1003,9 +1086,13 @@ }, "/2/filters/{attribute}": { "get": { - "tags": ["analytics"], + "tags": [ + "filter" + ], "operationId": "getTopFilterForAttribute", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve top filter values", "description": "Retrieves the 1,000 most frequent filter (facet) values for a filter attribute.\n\nThese are attributes of your records that you included in the `attributesForFaceting` setting.\n", "parameters": [ @@ -1073,9 +1160,13 @@ }, "/2/filters/noResults": { "get": { - "tags": ["analytics"], + "tags": [ + "filter" + ], "operationId": "getTopFiltersNoResults", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve top filters for a search without results", "description": "Retrieves the 1,000 most frequently used filters for a search that didn't return any results.\n\nTo get the most frequent searches without results, use the [Retrieve searches without results](#tag/search/operation/getSearchesNoResults) operation.\n", "parameters": [ @@ -1140,9 +1231,13 @@ }, "/2/countries": { "get": { - "tags": ["analytics"], + "tags": [ + "user" + ], "operationId": "getTopCountries", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve top countries", "description": "Retrieves the countries with the most searches in your index.", "parameters": [ @@ -1185,7 +1280,9 @@ "title": "getTopCountriesResponse", "type": "object", "additionalProperties": false, - "required": ["countries"], + "required": [ + "countries" + ], "properties": { "countries": { "type": "array", @@ -1194,7 +1291,10 @@ "title": "topCountry", "type": "object", "additionalProperties": false, - "required": ["country", "count"], + "required": [ + "country", + "count" + ], "properties": { "country": { "description": "Country code.", @@ -1229,9 +1329,13 @@ }, "/2/clicks/averageClickPosition": { "get": { - "tags": ["analytics"], + "tags": [ + "click" + ], "operationId": "getAverageClickPosition", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve average click position", "description": "Retrieves the average click position of your search results, including a daily breakdown.\n\nThe average click position is the average of all clicked search result positions.\nFor example, if users only ever click on the first result for any search, the average click position is 1.\nBy default, the analyzed period includes the last eight days including the current day.\n\nAn average of `null` when `clickAnalytics` is enabled means Algolia didn't receive any [click events](https://www.algolia.com/doc/guides/sending-events/getting-started/) for the queries.\nThe average is `null` until Algolia receives at least one click event.\n", "parameters": [ @@ -1268,7 +1372,11 @@ "title": "getAverageClickPositionResponse", "type": "object", "additionalProperties": false, - "required": ["average", "clickCount", "dates"], + "required": [ + "average", + "clickCount", + "dates" + ], "properties": { "average": { "$ref": "#/components/schemas/averageClickPosition" @@ -1283,7 +1391,11 @@ "title": "dailyAverageClicks", "type": "object", "additionalProperties": false, - "required": ["average", "clickCount", "date"], + "required": [ + "average", + "clickCount", + "date" + ], "properties": { "average": { "$ref": "#/components/schemas/averageClickPosition" @@ -1319,9 +1431,13 @@ }, "/2/clicks/positions": { "get": { - "tags": ["analytics"], + "tags": [ + "click" + ], "operationId": "getClickPositions", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve click positions", "description": "Retrieves the positions in the search results and their associated number of clicks.\n\nThis lets you check how many clicks the first, second, or tenth search results receive.\n\nAn average of `0` when `clickAnalytics` is enabled means Algolia didn't receive any [click events](https://www.algolia.com/doc/guides/sending-events/getting-started/) for the queries.\n", "parameters": [ @@ -1358,7 +1474,9 @@ "title": "getClickPositionsResponse", "type": "object", "additionalProperties": false, - "required": ["positions"], + "required": [ + "positions" + ], "properties": { "positions": { "$ref": "#/components/schemas/clickPositions" @@ -1385,9 +1503,13 @@ }, "/2/clicks/clickThroughRate": { "get": { - "tags": ["analytics"], + "tags": [ + "click" + ], "operationId": "getClickThroughRate", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve click-through rate", "description": "Retrieves the click-through rate (CTR) for all your searches with at least one click event, including a daily breakdown.\n\nBy default, the analyzed period includes the last eight days including the current day.\n\n**There's a difference between a 0 and null CTR when `clickAnalytics` is enabled:**\n\n- **Null** means there were no queries: since Algolia didn't receive any events, CTR is null.\n- **0** mean there _were_ queries but no [click events](https://www.algolia.com/doc/guides/sending-events/getting-started/) were received.\n", "parameters": [ @@ -1424,7 +1546,12 @@ "title": "getClickThroughRateResponse", "type": "object", "additionalProperties": false, - "required": ["dates", "clickCount", "trackedSearchCount", "rate"], + "required": [ + "dates", + "clickCount", + "trackedSearchCount", + "rate" + ], "properties": { "rate": { "$ref": "#/components/schemas/clickThroughRate" @@ -1442,7 +1569,12 @@ "title": "dailyClickThroughRates", "type": "object", "additionalProperties": false, - "required": ["rate", "clickCount", "trackedSearchCount", "date"], + "required": [ + "rate", + "clickCount", + "trackedSearchCount", + "date" + ], "properties": { "rate": { "$ref": "#/components/schemas/clickThroughRate" @@ -1481,9 +1613,13 @@ }, "/2/conversions/conversionRate": { "get": { - "tags": ["analytics"], + "tags": [ + "click" + ], "operationId": "getConversionRate", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve conversion rate", "description": "Retrieves the conversion rate (CR) for all your searches with at least one conversion event, including a daily breakdown.\n\nBy default, the analyzed period includes the last eight days including the current day.\n\n**There's a difference between a 0 and null CR when `clickAnalytics` is enabled:**\n\n- **Null** means there were no queries: since Algolia didn't receive any events, CR is null.\n- **0** mean there _were_ queries but no [conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started/) were received.\n", "parameters": [ @@ -1520,7 +1656,12 @@ "title": "getConversionRateResponse", "type": "object", "additionalProperties": false, - "required": ["dates", "trackedSearchCount", "conversionCount", "rate"], + "required": [ + "dates", + "trackedSearchCount", + "conversionCount", + "rate" + ], "properties": { "rate": { "$ref": "#/components/schemas/conversionRate" @@ -1538,7 +1679,12 @@ "title": "dailyConversionRates", "type": "object", "additionalProperties": false, - "required": ["rate", "trackedSearchCount", "conversionCount", "date"], + "required": [ + "rate", + "trackedSearchCount", + "conversionCount", + "date" + ], "properties": { "rate": { "$ref": "#/components/schemas/conversionRate" @@ -1577,9 +1723,13 @@ }, "/2/conversions/addToCartRate": { "get": { - "tags": ["analytics"], + "tags": [ + "click" + ], "operationId": "getAddToCartRate", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve add-to-cart rate", "description": "Retrieves the add-to-cart rate for all your searches with at least one add-to-cart event, including a daily breakdown.\n\nBy default, the analyzed period includes the last eight days including the current day.\n\nThe rate is the number of add-to-cart conversion events divided by the number of tracked searches.\nA search is tracked if it returns a queryID (`clickAnalytics` is `true`).\nThis differs from the response's `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`.\n\n**There's a difference between a 0 and null add-to-cart rate when `clickAnalytics` is enabled:**\n\n- **Null** means there were no queries: since Algolia didn't receive any events, the add-to-cart rate is null.\n- **0** mean there _were_ queries but no [add-to-cart events](https://www.algolia.com/doc/guides/sending-events/getting-started/) were received.\n", "parameters": [ @@ -1616,7 +1766,12 @@ "title": "getAddToCartRateResponse", "type": "object", "additionalProperties": false, - "required": ["dates", "trackedSearchCount", "addToCartCount", "rate"], + "required": [ + "dates", + "trackedSearchCount", + "addToCartCount", + "rate" + ], "properties": { "rate": { "$ref": "#/components/schemas/addToCartRate" @@ -1634,7 +1789,12 @@ "title": "dailyAddToCartRates", "type": "object", "additionalProperties": false, - "required": ["rate", "trackedSearchCount", "addToCartCount", "date"], + "required": [ + "rate", + "trackedSearchCount", + "addToCartCount", + "date" + ], "properties": { "rate": { "$ref": "#/components/schemas/addToCartRate" @@ -1673,9 +1833,13 @@ }, "/2/conversions/purchaseRate": { "get": { - "tags": ["analytics"], + "tags": [ + "click" + ], "operationId": "getPurchaseRate", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve purchase rate", "description": "Retrieves the purchase rate for all your searches with at least one purchase event, including a daily breakdown.\n\nBy default, the analyzed period includes the last eight days including the current day.\n\nThe rate is the number of purchase conversion events divided by the number of tracked searches.\nA search is tracked if it returns a query ID (`clickAnalytics` is `true`).\nThis differs from the response's `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`.\n\n**There's a difference between a 0 and null purchase rate when `clickAnalytics` is enabled:**\n\n- **Null** means there were no queries: since Algolia didn't receive any events, the purchase rate is null.\n- **0** mean there _were_ queries but no [purchase conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started/) were received.\n", "parameters": [ @@ -1712,7 +1876,12 @@ "title": "getPurchaseRateResponse", "type": "object", "additionalProperties": false, - "required": ["dates", "trackedSearchCount", "purchaseCount", "rate"], + "required": [ + "dates", + "trackedSearchCount", + "purchaseCount", + "rate" + ], "properties": { "rate": { "$ref": "#/components/schemas/purchaseRate" @@ -1730,7 +1899,12 @@ "title": "dailyPurchaseRates", "type": "object", "additionalProperties": false, - "required": ["rate", "trackedSearchCount", "purchaseCount", "date"], + "required": [ + "rate", + "trackedSearchCount", + "purchaseCount", + "date" + ], "properties": { "rate": { "$ref": "#/components/schemas/purchaseRate" @@ -1769,9 +1943,13 @@ }, "/2/conversions/revenue": { "get": { - "tags": ["analytics"], + "tags": [ + "revenue" + ], "operationId": "getRevenue", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve revenue data", "description": "Retrieves revenue-related metrics, such as the total revenue or the average order value.\n\nTo retrieve revenue-related metrics, send purchase events.\nBy default, the analyzed period includes the last eight days including the current day.\n\nRevenue is based on purchase conversion events (a conversion event with an `eventSubtype` attribute of `purchase`).\nThe revenue is the `price` attribute multiplied by the `quantity` attribute for each object in the event's `objectData` array.\n", "parameters": [ @@ -1797,7 +1975,10 @@ "title": "getRevenue", "type": "object", "additionalProperties": false, - "required": ["currencies", "dates"], + "required": [ + "currencies", + "dates" + ], "properties": { "currencies": { "$ref": "#/components/schemas/currencies" @@ -1809,7 +1990,10 @@ "title": "dailyRevenue", "type": "object", "additionalProperties": false, - "required": ["currencies", "date"], + "required": [ + "currencies", + "date" + ], "properties": { "currencies": { "$ref": "#/components/schemas/currencies" @@ -1842,9 +2026,13 @@ }, "/2/status": { "get": { - "tags": ["analytics"], + "tags": [ + "status" + ], "operationId": "getStatus", - "x-acl": ["analytics"], + "x-acl": [ + "analytics" + ], "summary": "Retrieve update status", "description": "Retrieves the time when the Analytics data for the specified index was last updated.\n\nIf the index has been recently created or no search has been performed yet the updated time is `null`.\n\nThe Analytics data is updated every 5 minutes.\n", "parameters": [ @@ -1861,7 +2049,9 @@ "title": "getStatusResponse", "type": "object", "additionalProperties": false, - "required": ["updatedAt"], + "required": [ + "updatedAt" + ], "properties": { "updatedAt": { "$ref": "#/components/schemas/updatedAtNullable" @@ -1890,7 +2080,9 @@ "get": { "x-helper": true, "x-asynchronous-helper": false, - "tags": ["analytics"], + "tags": [ + "Api Key" + ], "operationId": "setClientApiKey", "summary": "Switch the API key used to authenticate requests", "description": "Switch the API key used to authenticate requests.\n", @@ -2077,12 +2269,20 @@ "orderBy": { "type": "string", "description": "Attribute by which to order the response items.\n\nIf the `clickAnalytics` parameter is false, only `searchCount` is available.\n", - "enum": ["searchCount", "clickThroughRate", "conversionRate", "averageClickPosition"], + "enum": [ + "searchCount", + "clickThroughRate", + "conversionRate", + "averageClickPosition" + ], "default": "searchCount" }, "direction": { "type": "string", - "enum": ["asc", "desc"], + "enum": [ + "asc", + "desc" + ], "default": "asc" }, "search": { @@ -2104,7 +2304,9 @@ "type": "object", "title": "Top searches", "additionalProperties": false, - "required": ["searches"], + "required": [ + "searches" + ], "properties": { "searches": { "type": "array", @@ -2113,7 +2315,11 @@ "title": "topSearch", "type": "object", "additionalProperties": false, - "required": ["search", "count", "nbHits"], + "required": [ + "search", + "count", + "nbHits" + ], "properties": { "search": { "$ref": "#/components/schemas/search" @@ -2175,7 +2381,10 @@ "description": "Range of positions in the search results, using the pattern `[start,end]`.\n\nFor positions 11 and up, click events are summed over the specified range.\n`-1` indicates the end of the list of search results.\n", "minItems": 2, "maxItems": 2, - "example": [21, -1], + "example": [ + 21, + -1 + ], "items": { "type": "integer" } @@ -2230,7 +2439,9 @@ "type": "object", "title": "Top searches with click analytics", "additionalProperties": false, - "required": ["searches"], + "required": [ + "searches" + ], "properties": { "searches": { "type": "array", @@ -2360,7 +2571,9 @@ "type": "object", "title": "Top searches with revenue analytics", "additionalProperties": false, - "required": ["searches"], + "required": [ + "searches" + ], "properties": { "searches": { "type": "array", @@ -2503,7 +2716,9 @@ "type": "object", "title": "Top search results", "additionalProperties": false, - "required": ["hits"], + "required": [ + "hits" + ], "properties": { "hits": { "type": "array", @@ -2512,7 +2727,10 @@ "title": "topHit", "type": "object", "additionalProperties": false, - "required": ["hit", "count"], + "required": [ + "hit", + "count" + ], "properties": { "hit": { "$ref": "#/components/schemas/hit" @@ -2529,7 +2747,9 @@ "type": "object", "title": "Top search results with click analytics", "additionalProperties": false, - "required": ["hits"], + "required": [ + "hits" + ], "properties": { "hits": { "type": "array", @@ -2578,7 +2798,9 @@ "type": "object", "title": "Top search results with revenue analytics", "additionalProperties": false, - "required": ["hits"], + "required": [ + "hits" + ], "properties": { "hits": { "type": "array", @@ -2664,7 +2886,10 @@ "getTopFilterAttribute": { "type": "object", "additionalProperties": false, - "required": ["attribute", "count"], + "required": [ + "attribute", + "count" + ], "properties": { "attribute": { "$ref": "#/components/schemas/attribute" @@ -2677,7 +2902,9 @@ "getTopFilterAttributesResponse": { "type": "object", "additionalProperties": false, - "required": ["attributes"], + "required": [ + "attributes" + ], "properties": { "attributes": { "type": "array", @@ -2691,7 +2918,15 @@ "operator": { "description": "Character that characterizes how the filter is applied.\n\nFor example, for a facet filter `facet:value`, `:` is the operator.\nFor a numeric filter `count>50`, `>` is the operator.\n", "type": "string", - "enum": [":", "<", "<=", "=", "!=", ">", ">="], + "enum": [ + ":", + "<", + "<=", + "=", + "!=", + ">", + ">=" + ], "example": ":" }, "value": { @@ -2702,7 +2937,12 @@ "getTopFilterForAttribute": { "type": "object", "additionalProperties": false, - "required": ["operator", "attribute", "value", "count"], + "required": [ + "operator", + "attribute", + "value", + "count" + ], "properties": { "attribute": { "$ref": "#/components/schemas/attribute" @@ -2721,7 +2961,9 @@ "getTopFilterForAttributeResponse": { "type": "object", "additionalProperties": false, - "required": ["values"], + "required": [ + "values" + ], "properties": { "values": { "type": "array", @@ -2735,7 +2977,11 @@ "getTopFiltersNoResultsValue": { "type": "object", "additionalProperties": false, - "required": ["attribute", "operator", "value"], + "required": [ + "attribute", + "operator", + "value" + ], "properties": { "attribute": { "$ref": "#/components/schemas/attribute" @@ -2751,7 +2997,10 @@ "getTopFiltersNoResultsValues": { "type": "object", "additionalProperties": false, - "required": ["values", "count"], + "required": [ + "values", + "count" + ], "properties": { "count": { "$ref": "#/components/schemas/parameters_count" @@ -2768,7 +3017,9 @@ "getTopFiltersNoResultsResponse": { "type": "object", "additionalProperties": false, - "required": ["values"], + "required": [ + "values" + ], "properties": { "values": { "oneOf": [ @@ -2869,11 +3120,19 @@ "x-tagGroups": [ { "name": "Metrics", - "tags": ["search", "click", "revenue", "filter", "user"] + "tags": [ + "search", + "click", + "revenue", + "filter", + "user" + ] }, { "name": "Other", - "tags": ["status"] + "tags": [ + "status" + ] } ] -} +} \ No newline at end of file diff --git a/src/data/composition-full.json b/src/data/composition-full.json new file mode 100644 index 0000000..2a20669 --- /dev/null +++ b/src/data/composition-full.json @@ -0,0 +1,4099 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Composition API", + "description": "Composition API.", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://{applicationId}.algolia.net", + "variables": { + "applicationId": { + "default": "ALGOLIA_APPLICATION_ID" + } + } + }, + { + "url": "https://{applicationId}-1.algolianet.com", + "variables": { + "applicationId": { + "default": "ALGOLIA_APPLICATION_ID" + } + } + }, + { + "url": "https://{applicationId}-2.algolianet.com", + "variables": { + "applicationId": { + "default": "ALGOLIA_APPLICATION_ID" + } + } + }, + { + "url": "https://{applicationId}-3.algolianet.com", + "variables": { + "applicationId": { + "default": "ALGOLIA_APPLICATION_ID" + } + } + }, + { + "url": "https://{applicationId}-dsn.algolia.net", + "variables": { + "applicationId": { + "default": "ALGOLIA_APPLICATION_ID" + } + } + } + ], + "security": [ + { + "applicationId": [], + "apiKey": [] + } + ], + "tags": [ + { + "name": "Compositions", + "description": "Manage your compositions and composition settings.\n" + }, + { + "name": "Rules", + "description": "Manage your compositions rules.\n" + }, + { + "name": "Search", + "description": "Search one or more indices for matching records or facet values." + } + ], + "paths": { + "/{path}": { + "get": { + "operationId": "customGet", + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + }, + "post": { + "operationId": "customPost", + "requestBody": { + "description": "Parameters to send with the custom request.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + }, + "put": { + "operationId": "customPut", + "requestBody": { + "description": "Parameters to send with the custom request.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + }, + "delete": { + "operationId": "customDelete", + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + } + }, + "/1/compositions/{compositionID}/run": { + "post": { + "tags": [ + "Search" + ], + "operationId": "search", + "x-use-read-transporter": true, + "x-cacheable": true, + "x-acl": [ + "search" + ], + "summary": "Run a Composition", + "description": "Runs a query on a single composition and returns matching results.", + "parameters": [ + { + "$ref": "#/components/parameters/compositionID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "requestBody", + "type": "object", + "additionalProperties": false, + "properties": { + "params": { + "$ref": "#/components/schemas/params" + } + } + } + } + } + }, + "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" + } + } + } + }, + "/1/compositions/{compositionID}/facets/{facetName}/query": { + "post": { + "tags": [ + "Search" + ], + "operationId": "searchForFacetValues", + "x-use-read-transporter": true, + "x-cacheable": true, + "x-acl": [ + "search" + ], + "summary": "Search for facet values", + "description": "Searches for values of a specified facet attribute on the composition's main source's index.\n\n- By default, facet values are sorted by decreasing count.\n You can adjust this with the `sortFacetValueBy` parameter.\n- Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**.\n", + "parameters": [ + { + "$ref": "#/components/parameters/compositionID" + }, + { + "name": "facetName", + "description": "Facet attribute in which to search for values.\n\nThis attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.\n", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "searchForFacetValuesRequest", + "type": "object", + "additionalProperties": false, + "properties": { + "params": { + "title": "searchForFacetValuesParams", + "type": "object", + "properties": { + "query": { + "$ref": "#/components/schemas/query" + }, + "maxFacetHits": { + "$ref": "#/components/schemas/maxFacetHits" + }, + "searchQuery": { + "$ref": "#/components/schemas/params" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/searchForFacetValuesResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/IndexNotFound" + } + } + } + }, + "/1/compositions/{compositionID}": { + "get": { + "tags": [ + "Compositions" + ], + "operationId": "getComposition", + "x-acl": [ + "editSettings", + "settings" + ], + "summary": "Retrieve a composition", + "description": "Retrieve a single composition in the current Algolia application.\n", + "parameters": [ + { + "$ref": "#/components/parameters/compositionID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/composition" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/CompositionNotFound" + } + } + } + }, + "/1/compositions/*/batch": { + "post": { + "tags": [ + "Compositions" + ], + "operationId": "multipleBatch", + "description": "Adds, updates, or deletes compositions with a single API request.\n", + "x-acl": [ + "editSettings" + ], + "summary": "Batch action to multiple compositions", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "batchParams", + "description": "Batch parameters.", + "type": "object", + "additionalProperties": false, + "properties": { + "requests": { + "type": "array", + "items": { + "title": "multipleBatchRequest", + "type": "object", + "additionalProperties": false, + "properties": { + "action": { + "$ref": "#/components/schemas/action" + }, + "body": { + "$ref": "#/components/schemas/batchCompositionAction" + } + }, + "required": [ + "action", + "body" + ] + } + } + }, + "required": [ + "requests" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "multipleBatchResponse", + "type": "object", + "additionalProperties": false, + "properties": { + "taskID": { + "type": "object", + "description": "Task IDs. One for each index.", + "additionalProperties": { + "$ref": "#/components/schemas/taskID" + } + } + }, + "required": [ + "taskID" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/IndexNotFound" + } + } + } + }, + "/1/compositions/{compositionID}/rules/{objectID}": { + "get": { + "tags": [ + "Rules" + ], + "operationId": "getRule", + "x-acl": [ + "settings" + ], + "summary": "Retrieve a rule", + "description": "Retrieves a rule by its ID.\nTo find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).\n", + "parameters": [ + { + "$ref": "#/components/parameters/compositionID" + }, + { + "$ref": "#/components/parameters/ObjectIDRule" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/compositionRule" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/IndexNotFound" + } + } + } + }, + "/1/compositions/{compositionID}/rules/batch": { + "post": { + "tags": [ + "Rules" + ], + "operationId": "saveRules", + "x-acl": [ + "editSettings" + ], + "summary": "Create or update or delete composition rules", + "description": "Create or update or delete multiple composition rules.\n", + "x-codegen-request-body-name": "rules", + "parameters": [ + { + "$ref": "#/components/parameters/compositionID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "compositionRulesBatchParams", + "description": "Composition rules batch parameters.", + "type": "object", + "additionalProperties": false, + "properties": { + "requests": { + "type": "array", + "items": { + "title": "rulesMultipleBatchRequest", + "type": "object", + "additionalProperties": false, + "properties": { + "action": { + "$ref": "#/components/schemas/action" + }, + "body": { + "$ref": "#/components/schemas/rulesBatchCompositionAction" + } + }, + "required": [ + "action", + "body" + ] + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "rulesMultipleBatchResponse", + "type": "object", + "additionalProperties": false, + "properties": { + "taskID": { + "$ref": "#/components/schemas/taskID" + } + }, + "required": [ + "taskID" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/IndexNotFound" + } + } + } + }, + "/1/compositions/{compositionID}/rules/search": { + "post": { + "tags": [ + "Rules" + ], + "operationId": "searchCompositionRules", + "x-acl": [ + "settings" + ], + "summary": "Search for composition rules", + "description": "Searches for composition rules in your index.", + "parameters": [ + { + "$ref": "#/components/parameters/compositionID" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "searchCompositionRulesParams", + "type": "object", + "description": "Composition Rules search parameters.", + "additionalProperties": false, + "properties": { + "query": { + "$ref": "#/components/schemas/parameters_query" + }, + "anchoring": { + "$ref": "#/components/schemas/anchoring" + }, + "context": { + "type": "string", + "description": "Only return composition rules that match the context (exact match).", + "example": "mobile" + }, + "page": { + "$ref": "#/components/schemas/parameters_page" + }, + "hitsPerPage": { + "$ref": "#/components/schemas/parameters_hitsPerPage" + }, + "enabled": { + "oneOf": [ + { + "type": "boolean", + "description": "If `true`, return only enabled composition rules.\nIf `false`, return only inactive composition rules.\nBy default, _all_ composition rules are returned.\n" + }, + { + "type": "null" + } + ], + "default": null + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "searchCompositionRulesResponse", + "type": "object", + "additionalProperties": false, + "required": [ + "hits", + "nbHits", + "page", + "nbPages" + ], + "properties": { + "hits": { + "type": "array", + "description": "Composition rules that matched the search criteria.", + "items": { + "$ref": "#/components/schemas/compositionRule" + } + }, + "nbHits": { + "type": "integer", + "description": "Number of composition rules that matched the search criteria." + }, + "page": { + "type": "integer", + "description": "Current page." + }, + "nbPages": { + "type": "integer", + "description": "Number of pages." + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/IndexNotFound" + } + } + } + }, + "/1/compositions/{compositionID}/task/{taskID}": { + "get": { + "tags": [ + "Compositions" + ], + "operationId": "getTask", + "x-acl": [ + "editSettings", + "settings", + "addObject", + "deleteObject", + "deleteIndex" + ], + "description": "Checks the status of a given task.\n", + "summary": "Check task status", + "parameters": [ + { + "$ref": "#/components/parameters/compositionID" + }, + { + "name": "taskID", + "in": "path", + "description": "Unique task identifier.", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "example": 1506303845001 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTaskResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/IndexNotFound" + } + } + } + }, + "/1/compositions": { + "get": { + "tags": [ + "Compositions" + ], + "operationId": "listCompositions", + "x-acl": [ + "editSettings", + "settings" + ], + "summary": "List compositions", + "description": "Lists all compositions in the current Algolia application.\n", + "parameters": [ + { + "$ref": "#/components/parameters/Page" + }, + { + "$ref": "#/components/parameters/HitsPerPage" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/listCompositionsResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/CompositionNotFound" + } + } + } + }, + "/setClientApiKey": { + "get": { + "x-helper": true, + "x-asynchronous-helper": false, + "tags": [ + "Api Key" + ], + "operationId": "setClientApiKey", + "summary": "Switch the API key used to authenticate requests", + "description": "Switch the API key used to authenticate requests.\n", + "parameters": [ + { + "in": "query", + "name": "apiKey", + "description": "API key to be used from now on.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No content." + } + } + } + }, + "/waitForCompositionTask": { + "get": { + "x-helper": true, + "tags": [ + "Records" + ], + "operationId": "waitForCompositionTask", + "summary": "Wait for operation to complete", + "description": "Wait for a task to complete to ensure synchronized composition updates.\n\nAll Algolia write operations are asynchronous. When you make a request for a write operation, for example, to upsert or delete a composition, Algolia creates a task on a queue and returns a taskID. The task itself runs separately, depending on the server load.\n", + "parameters": [ + { + "in": "query", + "name": "compositionID", + "description": "The ID of the composition on which the operation was performed.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "taskID", + "description": "The taskID returned by the operation.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTaskResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/CompositionNotFound" + } + } + } + } + }, + "components": { + "securitySchemes": { + "applicationId": { + "type": "apiKey", + "in": "header", + "name": "x-algolia-application-id", + "description": "Your Algolia application ID." + }, + "apiKey": { + "type": "apiKey", + "in": "header", + "name": "x-algolia-api-key", + "description": "Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n" + } + }, + "parameters": { + "PathInPath": { + "name": "path", + "in": "path", + "description": "Path of the endpoint, anything after \"/1\" must be specified.", + "required": true, + "schema": { + "type": "string", + "example": "/keys" + } + }, + "Parameters": { + "name": "parameters", + "in": "query", + "description": "Query parameters to apply to the current query.", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "compositionID": { + "in": "path", + "name": "compositionID", + "description": "Unique Composition ObjectID.", + "required": true, + "schema": { + "$ref": "#/components/schemas/compositionObjectID" + } + }, + "ObjectIDRule": { + "in": "path", + "name": "objectID", + "description": "Unique identifier of a rule object.", + "required": true, + "schema": { + "$ref": "#/components/schemas/ruleID" + } + }, + "Page": { + "in": "query", + "name": "page", + "description": "Requested page of the API response.\nIf `null`, the API response is not paginated.\n", + "required": false, + "schema": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "default": null + } + }, + "HitsPerPage": { + "in": "query", + "name": "hitsPerPage", + "description": "Number of hits per page.", + "required": false, + "schema": { + "type": "integer", + "default": 100 + } + } + }, + "schemas": { + "ErrorBase": { + "description": "Error.", + "type": "object", + "x-keep-model": true, + "additionalProperties": true, + "properties": { + "message": { + "type": "string", + "example": "Invalid Application-Id or API-Key" + } + } + }, + "compositionObjectID": { + "type": "string", + "description": "Unique Composition ObjectID." + }, + "query": { + "type": "string", + "description": "Search query.", + "default": "", + "x-categories": [ + "Search" + ] + }, + "filters": { + "type": "string", + "description": "Filter expression to only include items that match the filter criteria in the response.\n\nYou can use these filter expressions:\n\n- **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`.\n- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive).\n- **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value.\n- **Tag filters.** `_tags:` or just `` (case-sensitive).\n- **Boolean filters.** `: true | false`.\n\nYou can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions:\n\n- You can only combine filters of the same type with `OR`.\n **Not supported:** `facet:value OR num > 3`.\n- You can't use `NOT` with combinations of filters.\n **Not supported:** `NOT(facet:value OR facet:value)`\n- You can't combine conjunctions (`AND`) with `OR`.\n **Not supported:** `facet:value OR (facet:value AND facet:value)`\n\nUse quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes.\nIf a facet attribute is an array, the filter matches if it matches at least one element of the array.\n\nFor more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).\n", + "example": "(category:Book OR category:Ebook) AND _tags:published", + "x-categories": [ + "Filtering" + ] + }, + "page": { + "type": "integer", + "description": "Page of search results to retrieve.", + "default": 0, + "minimum": 0, + "x-categories": [ + "Pagination" + ] + }, + "facetFilters": { + "description": "Filter the search by facet values, so that only records with the same facet values are retrieved.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\n- `[filter1, filter2]` is interpreted as `filter1 AND filter2`.\n- `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`.\n- `facet:-value` is interpreted as `NOT facet:value`.\n\nWhile it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash:\n`facet:\\-value`.\n", + "example": [ + [ + "category:Book", + "category:-Movie" + ], + "author:John Doe" + ], + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/facetFilters" + } + }, + { + "type": "string" + } + ], + "x-categories": [ + "Filtering" + ] + }, + "optionalFilters": { + "description": "Filters to promote or demote records in the search results.\n\nOptional filters work like facet filters, but they don't exclude records from the search results.\nRecords that match the optional filter rank before records that don't match.\nIf you're using a negative filter `facet:-value`, matching records rank after records that don't match.\n\n- Optional filters don't work on virtual replicas.\n- Optional filters are applied _after_ sort-by attributes.\n- Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/)).\n- Optional filters don't work with numeric attributes.\n", + "example": [ + "category:Book", + "author:John Doe" + ], + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/optionalFilters" + } + }, + { + "type": "string" + } + ], + "x-categories": [ + "Filtering" + ] + }, + "numericFilters": { + "description": "Filter by numeric facets.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\nYou can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`.\nComparisons are precise up to 3 decimals.\nYou can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries.\nThe same combination rules apply as for `facetFilters`.\n", + "example": [ + [ + "inStock = 1", + "deliveryDate < 1441755506" + ], + "price < 1000" + ], + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/numericFilters" + } + }, + { + "type": "string" + } + ], + "x-categories": [ + "Filtering" + ] + }, + "hitsPerPage": { + "type": "integer", + "description": "Number of hits per page.", + "default": 20, + "minimum": 1, + "maximum": 1000, + "x-categories": [ + "Pagination" + ] + }, + "aroundLatLng": { + "type": "string", + "description": "Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude.\n\nOnly records included within a circle around this central location are included in the results.\nThe radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings.\nThis parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.\n", + "example": "40.71,-74.01", + "default": "", + "x-categories": [ + "Geo-Search" + ] + }, + "aroundLatLngViaIP": { + "type": "boolean", + "description": "Whether to obtain the coordinates from the request's IP address.", + "default": false, + "x-categories": [ + "Geo-Search" + ] + }, + "aroundRadiusAll": { + "title": "all", + "type": "string", + "description": "Return all records with a valid `_geoloc` attribute. Don't filter by distance.", + "enum": [ + "all" + ] + }, + "aroundRadius": { + "description": "Maximum radius for a search around a central location.\n\nThis parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters.\nBy default, the search radius is determined automatically from the density of hits around the central location.\nThe search radius is small if there are many hits close to the central coordinates.\n", + "oneOf": [ + { + "type": "integer", + "minimum": 1, + "description": "Maximum search radius around a central location in meters." + }, + { + "$ref": "#/components/schemas/aroundRadiusAll" + } + ], + "x-categories": [ + "Geo-Search" + ] + }, + "aroundPrecisionFromValue": { + "title": "range objects", + "type": "array", + "items": { + "title": "range", + "type": "object", + "description": "Range object with lower and upper values in meters to define custom ranges.", + "properties": { + "from": { + "type": "integer", + "description": "Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.", + "example": 20 + }, + "value": { + "type": "integer", + "description": "Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal." + } + } + } + }, + "aroundPrecision": { + "description": "Precision of a coordinate-based search in meters to group results with similar distances.\n\nThe Geo ranking criterion considers all matches within the same range of distances to be equal.\n", + "oneOf": [ + { + "type": "integer", + "default": 10, + "description": "Distance in meters to group results by similar distances.\n\nFor example, if you set `aroundPrecision` to 100, records wihin 100 meters to the central coordinate are considered to have the same distance,\nas are records between 100 and 199 meters.\n" + }, + { + "$ref": "#/components/schemas/aroundPrecisionFromValue" + } + ], + "x-categories": [ + "Geo-Search" + ] + }, + "insideBoundingBoxArray": { + "type": "array", + "items": { + "type": "array", + "minItems": 4, + "maxItems": 4, + "items": { + "type": "number", + "format": "double" + } + }, + "description": "Coordinates for a rectangular area in which to search.\n\nEach bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair:\n`[p1 lat, p1 long, p2 lat, p2 long]`.\nProvide multiple bounding boxes as nested arrays.\nFor more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).\n", + "example": [ + [ + 47.3165, + 4.9665, + 47.3424, + 5.0201 + ], + [ + 40.9234, + 2.1185, + 38.643, + 1.9916 + ] + ], + "x-categories": [ + "Geo-Search" + ] + }, + "insideBoundingBox": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/components/schemas/insideBoundingBoxArray" + } + ] + }, + "insidePolygon": { + "type": "array", + "items": { + "type": "array", + "minItems": 6, + "maxItems": 20000, + "items": { + "type": "number", + "format": "double" + } + }, + "description": "Coordinates of a polygon in which to search.\n\nPolygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude.\nProvide multiple polygons as nested arrays.\nFor more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).\nThis parameter is ignored if you also specify `insideBoundingBox`.\n", + "example": [ + [ + 47.3165, + 4.9665, + 47.3424, + 5.0201, + 47.32, + 4.9 + ], + [ + 40.9234, + 2.1185, + 38.643, + 1.9916, + 39.2587, + 2.0104 + ] + ], + "x-categories": [ + "Geo-Search" + ] + }, + "supportedLanguage": { + "type": "string", + "description": "ISO code for a supported language.", + "enum": [ + "af", + "ar", + "az", + "bg", + "bn", + "ca", + "cs", + "cy", + "da", + "de", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "ga", + "gl", + "he", + "hi", + "hu", + "hy", + "id", + "is", + "it", + "ja", + "ka", + "kk", + "ko", + "ku", + "ky", + "lt", + "lv", + "mi", + "mn", + "mr", + "ms", + "mt", + "nb", + "nl", + "no", + "ns", + "pl", + "ps", + "pt", + "pt-br", + "qu", + "ro", + "ru", + "sk", + "sq", + "sv", + "sw", + "ta", + "te", + "th", + "tl", + "tn", + "tr", + "tt", + "uk", + "ur", + "uz", + "zh" + ] + }, + "userToken": { + "type": "string", + "description": "Unique pseudonymous or anonymous user identifier.\n\nThis helps with analytics and click and conversion events.\nFor more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).\n", + "example": "test-user-123", + "x-categories": [ + "Personalization" + ] + }, + "params": { + "title": "Composition Search parameters as object", + "type": "object", + "additionalProperties": false, + "properties": { + "query": { + "$ref": "#/components/schemas/query" + }, + "filters": { + "$ref": "#/components/schemas/filters" + }, + "page": { + "$ref": "#/components/schemas/page" + }, + "getRankingInfo": { + "type": "boolean", + "description": "Whether the search response should include detailed ranking information." + }, + "relevancyStrictness": { + "type": "integer" + }, + "facetFilters": { + "$ref": "#/components/schemas/facetFilters" + }, + "optionalFilters": { + "$ref": "#/components/schemas/optionalFilters" + }, + "numericFilters": { + "$ref": "#/components/schemas/numericFilters" + }, + "hitsPerPage": { + "$ref": "#/components/schemas/hitsPerPage" + }, + "aroundLatLng": { + "$ref": "#/components/schemas/aroundLatLng" + }, + "aroundLatLngViaIP": { + "$ref": "#/components/schemas/aroundLatLngViaIP" + }, + "aroundRadius": { + "$ref": "#/components/schemas/aroundRadius" + }, + "aroundPrecision": { + "$ref": "#/components/schemas/aroundPrecision" + }, + "minimumAroundRadius": { + "type": "integer", + "description": "Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", + "minimum": 1, + "x-categories": [ + "Geo-Search" + ] + }, + "insideBoundingBox": { + "$ref": "#/components/schemas/insideBoundingBox" + }, + "insidePolygon": { + "$ref": "#/components/schemas/insidePolygon" + }, + "queryLanguages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + }, + "example": [ + "es" + ], + "description": "Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries.\n\nThis setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings.\nThis setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages.\nTo support this, you must place the CJK language **first**.\n\n**You should always specify a query language.**\nIf you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).\n", + "default": [], + "x-categories": [ + "Languages" + ] + }, + "naturalLanguages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + }, + "description": "ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches):\n\n- Sets `removeStopWords` and `ignorePlurals` to the list of provided languages.\n- Sets `removeWordsIfNoResults` to `allOptional`.\n- Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.\n", + "default": [], + "x-categories": [ + "Languages" + ] + }, + "enableRules": { + "type": "boolean", + "description": "Whether to enable rules.", + "default": true, + "x-categories": [ + "Rules" + ] + }, + "ruleContexts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Assigns a rule context to the search query.\n\n[Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.\n", + "default": [], + "example": [ + "mobile" + ], + "x-categories": [ + "Rules" + ] + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "clickAnalytics": { + "type": "boolean", + "description": "Whether to include a `queryID` attribute in the response.\n\nThe query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).\n", + "default": false, + "x-categories": [ + "Analytics" + ] + }, + "analytics": { + "type": "boolean", + "description": "Whether this search will be included in Analytics.", + "default": true, + "x-categories": [ + "Analytics" + ] + }, + "analyticsTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).", + "default": [], + "x-categories": [ + "Analytics" + ] + }, + "enableABTest": { + "type": "boolean", + "description": "Whether to enable A/B testing for this search.", + "default": true, + "x-categories": [ + "Advanced" + ] + }, + "enableReRanking": { + "type": "boolean", + "description": "Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).\n\nThis setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.\n", + "default": true, + "x-categories": [ + "Filtering" + ] + } + } + }, + "objectID": { + "type": "string", + "description": "Unique record identifier.", + "example": "test-record-123" + }, + "compositionRunSearchResponse": { + "type": "object", + "additionalProperties": true, + "properties": { + "objectID": { + "$ref": "#/components/schemas/objectID" + }, + "appliedRules": { + "type": "array", + "items": { + "title": "compositionRunAppliedRules", + "type": "object", + "properties": { + "objectID": { + "$ref": "#/components/schemas/objectID" + } + }, + "required": [ + "objectID" + ] + } + } + }, + "required": [ + "objectID" + ] + }, + "compositionsSearchResponse": { + "type": "object", + "additionalProperties": true, + "properties": { + "run": { + "type": "array", + "items": { + "$ref": "#/components/schemas/compositionRunSearchResponse" + } + } + }, + "required": [ + "run" + ] + }, + "compositionBaseSearchResponse": { + "type": "object", + "additionalProperties": true, + "required": [ + "processingTimeMS" + ], + "properties": { + "compositions": { + "$ref": "#/components/schemas/compositionsSearchResponse" + } + } + }, + "processingTimeMS": { + "type": "integer", + "description": "Time the server took to process the request, in milliseconds.", + "example": 20 + }, + "RedirectRuleIndexMetadata": { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "Source index for the redirect rule." + }, + "dest": { + "type": "string", + "description": "Destination index for the redirect rule." + }, + "reason": { + "type": "string", + "description": "Reason for the redirect rule." + }, + "succeed": { + "type": "boolean", + "description": "Redirect rule status." + }, + "data": { + "title": "redirectRuleIndexData", + "type": "object", + "description": "Redirect rule data.", + "required": [ + "ruleObjectID" + ], + "properties": { + "ruleObjectID": { + "type": "string" + } + } + } + }, + "required": [ + "data", + "succeed", + "reason", + "dest", + "source" + ] + }, + "order": { + "description": "Explicit order of facets or facet values.\n\nThis setting lets you always show specific facets or facet values at the top of the list.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "facets": { + "description": "Order of facet names.", + "type": "object", + "additionalProperties": false, + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + }, + "sortRemainingBy": { + "description": "Order of facet values that aren't explicitly positioned with the `order` setting.\n\n- `count`.\n Order remaining facet values by decreasing count.\n The count is the number of matching records containing this facet value.\n\n- `alpha`.\n Sort facet values alphabetically.\n\n- `hidden`.\n Don't show facet values that aren't explicitly positioned.\n", + "type": "string", + "enum": [ + "count", + "alpha", + "hidden" + ] + }, + "hide": { + "description": "Hide facet values.", + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "type": "object", + "additionalProperties": false, + "properties": { + "order": { + "$ref": "#/components/schemas/order" + }, + "sortRemainingBy": { + "$ref": "#/components/schemas/sortRemainingBy" + }, + "hide": { + "$ref": "#/components/schemas/hide" + } + } + }, + "values": { + "description": "Order of facet values. One object for each facet.", + "type": "object", + "additionalProperties": { + "x-additionalPropertiesName": "facet", + "$ref": "#/components/schemas/value" + } + }, + "facetOrdering": { + "description": "Order of facet names and facet values in your UI.", + "type": "object", + "additionalProperties": false, + "properties": { + "facets": { + "$ref": "#/components/schemas/facets" + }, + "values": { + "$ref": "#/components/schemas/values" + } + } + }, + "redirectURL": { + "description": "The redirect rule container.", + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string" + } + } + }, + "bannerImageUrl": { + "description": "URL for an image to show inside a banner.", + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string" + } + } + }, + "bannerImage": { + "description": "Image to show inside a banner.", + "type": "object", + "additionalProperties": false, + "properties": { + "urls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/bannerImageUrl" + } + }, + "title": { + "type": "string" + } + } + }, + "bannerLink": { + "description": "Link for a banner defined in the Merchandising Studio.", + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string" + } + } + }, + "banner": { + "description": "Banner with image and link to redirect users.", + "type": "object", + "additionalProperties": false, + "properties": { + "image": { + "$ref": "#/components/schemas/bannerImage" + }, + "link": { + "$ref": "#/components/schemas/bannerLink" + } + } + }, + "banners": { + "description": "Banners defined in the Merchandising Studio for a given search.", + "type": "array", + "items": { + "$ref": "#/components/schemas/banner" + } + }, + "widgets": { + "description": "Widgets returned from any rules that are applied to the current search.", + "type": "object", + "additionalProperties": false, + "properties": { + "banners": { + "$ref": "#/components/schemas/banners" + } + } + }, + "renderingContent": { + "description": "Extra data that can be used in the search UI.\n\nYou can use this to control aspects of your search UI, such as the order of facet names and values\nwithout changing your frontend code.\n", + "type": "object", + "additionalProperties": false, + "properties": { + "facetOrdering": { + "$ref": "#/components/schemas/facetOrdering" + }, + "redirect": { + "$ref": "#/components/schemas/redirectURL" + }, + "widgets": { + "$ref": "#/components/schemas/widgets" + } + }, + "x-categories": [ + "Advanced" + ] + }, + "userData": { + "example": { + "settingID": "f2a7b51e3503acc6a39b3784ffb84300", + "pluginVersion": "1.6.0" + }, + "description": "An object with custom data.\n\nYou can store up to 32kB as custom data.\n", + "default": {}, + "x-categories": [ + "Advanced" + ] + }, + "baseSearchResponse": { + "type": "object", + "additionalProperties": true, + "required": [ + "processingTimeMS" + ], + "properties": { + "abTestID": { + "type": "integer", + "description": "A/B test ID. This is only included in the response for indices that are part of an A/B test." + }, + "abTestVariantID": { + "type": "integer", + "minimum": 1, + "description": "Variant ID. This is only included in the response for indices that are part of an A/B test." + }, + "aroundLatLng": { + "type": "string", + "description": "Computed geographical location.", + "example": "40.71,-74.01", + "pattern": "^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$" + }, + "automaticRadius": { + "type": "string", + "description": "Distance from a central coordinate provided by `aroundLatLng`." + }, + "exhaustive": { + "title": "exhaustive", + "type": "object", + "description": "Whether certain properties of the search response are calculated exhaustive (exact) or approximated.", + "properties": { + "facetsCount": { + "type": "boolean", + "title": "facetsCount", + "description": "Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-)." + }, + "facetValues": { + "type": "boolean", + "title": "facetValues", + "description": "The value is `false` if not all facet values are retrieved." + }, + "nbHits": { + "type": "boolean", + "title": "nbHits", + "description": "Whether the `nbHits` is exhaustive (`true`) or approximate (`false`). When the query takes more than 50ms to be processed, the engine makes an approximation. This can happen when using complex filters on millions of records, when typo-tolerance was not exhaustive, or when enough hits have been retrieved (for example, after the engine finds 10,000 exact matches). `nbHits` is reported as non-exhaustive whenever an approximation is made, even if the approximation didn’t, in the end, impact the exhaustivity of the query." + }, + "rulesMatch": { + "type": "boolean", + "title": "rulesMatch", + "description": "Rules matching exhaustivity. The value is `false` if rules were enable for this query, and could not be fully processed due a timeout. This is generally caused by the number of alternatives (such as typos) which is too large." + }, + "typo": { + "type": "boolean", + "title": "typo", + "description": "Whether the typo search was exhaustive (`true`) or approximate (`false`). An approximation is done when the typo search query part takes more than 10% of the query budget (ie. 5ms by default) to be processed (this can happen when a lot of typo alternatives exist for the query). This field will not be included when typo-tolerance is entirely disabled." + } + } + }, + "appliedRules": { + "description": "Rules applied to the query.", + "title": "appliedRules", + "type": "array", + "items": { + "type": "object" + } + }, + "exhaustiveFacetsCount": { + "type": "boolean", + "description": "See the `facetsCount` field of the `exhaustive` object in the response.", + "deprecated": true + }, + "exhaustiveNbHits": { + "type": "boolean", + "description": "See the `nbHits` field of the `exhaustive` object in the response.", + "deprecated": true + }, + "exhaustiveTypo": { + "type": "boolean", + "description": "See the `typo` field of the `exhaustive` object in the response.", + "deprecated": true + }, + "facets": { + "title": "facets", + "type": "object", + "additionalProperties": { + "x-additionalPropertiesName": "facet", + "type": "object", + "additionalProperties": { + "x-additionalPropertiesName": "facet count", + "type": "integer" + } + }, + "description": "Facet counts.", + "example": { + "category": { + "food": 1, + "tech": 42 + } + } + }, + "facets_stats": { + "type": "object", + "description": "Statistics for numerical facets.", + "additionalProperties": { + "title": "facetStats", + "type": "object", + "properties": { + "min": { + "type": "number", + "format": "double", + "description": "Minimum value in the results." + }, + "max": { + "type": "number", + "format": "double", + "description": "Maximum value in the results." + }, + "avg": { + "type": "number", + "format": "double", + "description": "Average facet value in the results." + }, + "sum": { + "type": "number", + "format": "double", + "description": "Sum of all values in the results." + } + } + } + }, + "index": { + "type": "string", + "example": "indexName", + "description": "Index name used for the query." + }, + "indexUsed": { + "type": "string", + "description": "Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query.", + "example": "indexNameAlt" + }, + "message": { + "type": "string", + "description": "Warnings about the query." + }, + "nbSortedHits": { + "type": "integer", + "description": "Number of hits selected and sorted by the relevant sort algorithm.", + "example": 20 + }, + "parsedQuery": { + "type": "string", + "description": "Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched.", + "example": "george clo" + }, + "processingTimeMS": { + "$ref": "#/components/schemas/processingTimeMS" + }, + "processingTimingsMS": { + "type": "object", + "description": "Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues." + }, + "queryAfterRemoval": { + "type": "string", + "description": "Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set." + }, + "redirect": { + "title": "redirect", + "type": "object", + "description": "[Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only.\n", + "properties": { + "index": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RedirectRuleIndexMetadata" + } + } + } + }, + "renderingContent": { + "$ref": "#/components/schemas/renderingContent" + }, + "serverTimeMS": { + "type": "integer", + "description": "Time the server took to process the request, in milliseconds.", + "example": 20 + }, + "serverUsed": { + "type": "string", + "description": "Host name of the server that processed the request.", + "example": "c2-uk-3.algolia.net" + }, + "userData": { + "$ref": "#/components/schemas/userData" + }, + "queryID": { + "type": "string", + "description": "Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).", + "example": "a00dbc80a8d13c4565a442e7e2dca80a" + }, + "_automaticInsights": { + "type": "boolean", + "description": "Whether automatic events collection is enabled for the application." + } + } + }, + "nbHits": { + "type": "integer", + "description": "Number of results (hits).", + "example": 20 + }, + "nbPages": { + "type": "integer", + "description": "Number of pages of results.", + "example": 1 + }, + "SearchPagination": { + "type": "object", + "additionalProperties": false, + "properties": { + "page": { + "$ref": "#/components/schemas/page" + }, + "nbHits": { + "$ref": "#/components/schemas/nbHits" + }, + "nbPages": { + "$ref": "#/components/schemas/nbPages" + }, + "hitsPerPage": { + "$ref": "#/components/schemas/hitsPerPage" + } + }, + "required": [ + "page", + "nbHits", + "nbPages", + "hitsPerPage" + ] + }, + "highlightedValue": { + "type": "string", + "description": "Highlighted attribute value, including HTML tags.", + "example": "George Clooney" + }, + "matchLevel": { + "type": "string", + "description": "Whether the whole query string matches or only a part.", + "enum": [ + "none", + "partial", + "full" + ] + }, + "highlightResultOption": { + "type": "object", + "description": "Surround words that match the query with HTML tags for highlighting.", + "additionalProperties": false, + "properties": { + "value": { + "$ref": "#/components/schemas/highlightedValue" + }, + "matchLevel": { + "$ref": "#/components/schemas/matchLevel" + }, + "matchedWords": { + "type": "array", + "description": "List of matched words from the search query.", + "example": [ + "action" + ], + "items": { + "type": "string" + } + }, + "fullyHighlighted": { + "type": "boolean", + "description": "Whether the entire attribute value is highlighted." + } + }, + "required": [ + "value", + "matchLevel", + "matchedWords" + ], + "x-discriminator-fields": [ + "matchLevel", + "matchedWords" + ] + }, + "highlightResultMap": { + "type": "object", + "description": "Surround words that match the query with HTML tags for highlighting.", + "x-is-free-form": false, + "additionalProperties": { + "x-additionalPropertiesName": "attribute", + "$ref": "#/components/schemas/highlightResult" + } + }, + "highlightResult": { + "oneOf": [ + { + "$ref": "#/components/schemas/highlightResultOption" + }, + { + "$ref": "#/components/schemas/highlightResultMap" + }, + { + "$ref": "#/components/schemas/highlightResultArray" + } + ] + }, + "highlightResultArray": { + "type": "array", + "description": "Surround words that match the query with HTML tags for highlighting.", + "items": { + "$ref": "#/components/schemas/highlightResult" + } + }, + "snippetResultOption": { + "type": "object", + "description": "Snippets that show the context around a matching search query.", + "additionalProperties": false, + "properties": { + "value": { + "$ref": "#/components/schemas/highlightedValue" + }, + "matchLevel": { + "$ref": "#/components/schemas/matchLevel" + } + }, + "required": [ + "value", + "matchLevel" + ], + "x-discriminator-fields": [ + "matchLevel" + ] + }, + "snippetResultMap": { + "type": "object", + "description": "Snippets that show the context around a matching search query.", + "x-is-free-form": false, + "additionalProperties": { + "x-additionalPropertiesName": "attribute", + "$ref": "#/components/schemas/snippetResult" + } + }, + "snippetResult": { + "oneOf": [ + { + "$ref": "#/components/schemas/snippetResultOption" + }, + { + "$ref": "#/components/schemas/snippetResultMap" + }, + { + "$ref": "#/components/schemas/snippetResultArray" + } + ] + }, + "snippetResultArray": { + "type": "array", + "description": "Snippets that show the context around a matching search query.", + "items": { + "$ref": "#/components/schemas/snippetResult" + } + }, + "matchedGeoLocation": { + "type": "object", + "properties": { + "lat": { + "type": "number", + "format": "double", + "description": "Latitude of the matched location." + }, + "lng": { + "type": "number", + "format": "double", + "description": "Longitude of the matched location." + }, + "distance": { + "type": "integer", + "description": "Distance between the matched location and the search location (in meters)." + } + } + }, + "personalization": { + "type": "object", + "properties": { + "filtersScore": { + "type": "integer", + "description": "The score of the filters." + }, + "rankingScore": { + "type": "integer", + "description": "The score of the ranking." + }, + "score": { + "type": "integer", + "description": "The score of the event." + } + } + }, + "rankingInfo": { + "type": "object", + "description": "Object with detailed information about the record's ranking.", + "additionalProperties": false, + "properties": { + "filters": { + "type": "integer", + "minimum": 0, + "description": "Whether a filter matched the query." + }, + "firstMatchedWord": { + "type": "integer", + "minimum": 0, + "description": "Position of the first matched word in the best matching attribute of the record." + }, + "geoDistance": { + "type": "integer", + "minimum": 0, + "description": "Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters)." + }, + "geoPrecision": { + "type": "integer", + "minimum": 1, + "description": "Precision used when computing the geo distance, in meters." + }, + "matchedGeoLocation": { + "$ref": "#/components/schemas/matchedGeoLocation" + }, + "personalization": { + "$ref": "#/components/schemas/personalization" + }, + "nbExactWords": { + "type": "integer", + "minimum": 0, + "description": "Number of exactly matched words." + }, + "nbTypos": { + "type": "integer", + "minimum": 0, + "description": "Number of typos encountered when matching the record." + }, + "promoted": { + "type": "boolean", + "description": "Whether the record was promoted by a rule." + }, + "proximityDistance": { + "type": "integer", + "minimum": 0, + "description": "Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0." + }, + "userScore": { + "type": "integer", + "description": "Overall ranking of the record, expressed as a single integer. This attribute is internal." + }, + "words": { + "type": "integer", + "minimum": 1, + "description": "Number of matched words." + }, + "promotedByReRanking": { + "type": "boolean", + "description": "Whether the record is re-ranked." + } + }, + "required": [ + "nbTypos", + "firstMatchedWord", + "geoDistance", + "nbExactWords", + "userScore" + ] + }, + "compositionRankingInfo": { + "type": "object", + "additionalProperties": false, + "properties": { + "composed": { + "title": "composedRankingInfo", + "type": "object", + "additionalProperties": { + "title": "compositionIdRankingInfo", + "x-additionalPropertiesName": "composition-id", + "type": "object", + "properties": { + "index": { + "type": "string" + }, + "injectedItemKey": { + "type": "string" + } + }, + "required": [ + "index", + "injectedItemKey" + ] + } + } + } + }, + "Hit_rankingInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/rankingInfo" + }, + { + "$ref": "#/components/schemas/compositionRankingInfo" + } + ] + }, + "distinctSeqID": { + "type": "integer" + }, + "hit": { + "type": "object", + "description": "Search result.\n\nA hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.\n", + "x-is-generic": true, + "additionalProperties": true, + "required": [ + "objectID" + ], + "properties": { + "objectID": { + "$ref": "#/components/schemas/objectID" + }, + "_highlightResult": { + "$ref": "#/components/schemas/highlightResultMap" + }, + "_snippetResult": { + "$ref": "#/components/schemas/snippetResultMap" + }, + "_rankingInfo": { + "$ref": "#/components/schemas/Hit_rankingInfo" + }, + "_distinctSeqID": { + "$ref": "#/components/schemas/distinctSeqID" + } + } + }, + "searchHits": { + "type": "object", + "additionalProperties": true, + "properties": { + "hits": { + "type": "array", + "description": "Search results (hits).\n\nHits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.\n", + "items": { + "$ref": "#/components/schemas/hit" + } + }, + "query": { + "$ref": "#/components/schemas/query" + }, + "params": { + "type": "string", + "description": "URL-encoded string of all search parameters.", + "example": "query=a&hitsPerPage=20" + } + }, + "required": [ + "hits", + "query", + "params" + ] + }, + "resultsInjectedItemInfoResponse": { + "type": "object", + "additionalProperties": true, + "properties": { + "key": { + "type": "string" + }, + "appliedRules": { + "type": "array", + "items": { + "title": "resultsInjectedItemAppliedRulesInfoResponse", + "type": "object", + "properties": { + "objectID": { + "$ref": "#/components/schemas/objectID" + } + }, + "required": [ + "objectID" + ] + } + } + }, + "required": [ + "key" + ] + }, + "resultsCompositionsResponse": { + "type": "object", + "additionalProperties": true, + "properties": { + "compositions": { + "title": "resultsCompositionsInfoResponse", + "type": "object", + "additionalProperties": { + "title": "resultsCompositionInfoResponse", + "x-additionalPropertiesName": "composition-id", + "type": "object", + "properties": { + "injectedItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/resultsInjectedItemInfoResponse" + } + } + }, + "required": [ + "injectedItems" + ] + } + } + }, + "required": [ + "compositions" + ] + }, + "searchResultsItem": { + "allOf": [ + { + "$ref": "#/components/schemas/baseSearchResponse" + }, + { + "$ref": "#/components/schemas/SearchPagination" + }, + { + "$ref": "#/components/schemas/searchHits" + }, + { + "$ref": "#/components/schemas/resultsCompositionsResponse" + } + ] + }, + "searchResults": { + "type": "object", + "additionalProperties": false, + "properties": { + "results": { + "type": "array", + "description": "Search results.", + "items": { + "$ref": "#/components/schemas/searchResultsItem" + } + } + }, + "required": [ + "results" + ] + }, + "searchResponse": { + "additionalProperties": true, + "allOf": [ + { + "$ref": "#/components/schemas/compositionBaseSearchResponse" + }, + { + "$ref": "#/components/schemas/searchResults" + } + ] + }, + "maxFacetHits": { + "type": "integer", + "description": "Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + "maximum": 100, + "default": 10, + "x-categories": [ + "Advanced" + ] + }, + "searchForFacetValuesResults": { + "type": "object", + "additionalProperties": false, + "required": [ + "facetHits", + "exhaustiveFacetsCount", + "indexName" + ], + "x-discriminator-fields": [ + "facetHits" + ], + "properties": { + "indexName": { + "type": "string" + }, + "facetHits": { + "type": "array", + "description": "Matching facet values.", + "items": { + "title": "facetHits", + "type": "object", + "additionalProperties": false, + "required": [ + "value", + "highlighted", + "count" + ], + "properties": { + "value": { + "description": "Facet value.", + "example": "Mobile phone", + "type": "string" + }, + "highlighted": { + "$ref": "#/components/schemas/highlightedValue" + }, + "count": { + "description": "Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).", + "type": "integer" + } + } + } + }, + "exhaustiveFacetsCount": { + "type": "boolean", + "description": "Whether the facet count is exhaustive (true) or approximate (false).\nFor more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).\n" + }, + "processingTimeMS": { + "$ref": "#/components/schemas/processingTimeMS" + } + } + }, + "searchForFacetValuesResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "results": { + "type": "array", + "description": "Search for facet values results.", + "items": { + "$ref": "#/components/schemas/searchForFacetValuesResults" + } + } + } + }, + "typoToleranceEnum": { + "type": "string", + "title": "typo tolerance", + "description": "- `min`. Return matches with the lowest number of typos.\n For example, if you have matches without typos, only include those.\n But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos).\n- `strict`. Return matches with the two lowest numbers of typos.\n With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.\n", + "enum": [ + "min", + "strict" + ] + }, + "typoTolerance": { + "description": "Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied.\n\nIf typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) are also active.\n", + "oneOf": [ + { + "type": "boolean", + "default": true, + "description": "Whether typo tolerance is active. If true, matches with typos are included in the search results and rank after exact matches." + }, + { + "$ref": "#/components/schemas/typoToleranceEnum" + } + ], + "x-categories": [ + "Typos" + ] + }, + "booleanString": { + "type": "string", + "enum": [ + "true", + "false" + ] + }, + "ignorePlurals": { + "description": "Treat singular, plurals, and other forms of declensions as equivalent.\nYou should only use this feature for the languages used in your index.\n", + "example": [ + "ca", + "es" + ], + "oneOf": [ + { + "type": "array", + "description": "ISO code for languages for which this feature should be active.\nThis overrides languages you set with `queryLanguages`.\n", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + } + }, + { + "$ref": "#/components/schemas/booleanString" + }, + { + "type": "boolean", + "description": "If true, `ignorePlurals` is active for all languages included in `queryLanguages`, or for all supported languages, if `queryLanguges` is empty.\nIf false, singulars, plurals, and other declensions won't be considered equivalent.\n", + "default": false + } + ], + "x-categories": [ + "Languages" + ] + }, + "removeStopWords": { + "description": "Removes stop words from the search query.\n\nStop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own.\nIn English, \"the\", \"a\", or \"and\" are stop words.\n\nYou should only use this feature for the languages used in your index.\n", + "example": [ + "ca", + "es" + ], + "oneOf": [ + { + "type": "array", + "description": "ISO code for languages for which stop words should be removed. This overrides languages you set in `queryLanguges`.", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + } + }, + { + "type": "boolean", + "default": false, + "description": "If true, stop words are removed for all languages you included in `queryLanguages`, or for all supported languages, if `queryLanguages` is empty.\nIf false, stop words are not removed.\n" + } + ], + "x-categories": [ + "Languages" + ] + }, + "queryType": { + "type": "string", + "enum": [ + "prefixLast", + "prefixAll", + "prefixNone" + ], + "description": "Determines if and how query words are interpreted as prefixes.\n\nBy default, only the last query word is treated as a prefix (`prefixLast`).\nTo turn off prefix search, use `prefixNone`.\nAvoid `prefixAll`, which treats all query words as prefixes.\nThis might lead to counterintuitive results and makes your search slower.\n\nFor more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).\n", + "default": "prefixLast", + "x-categories": [ + "Query strategy" + ] + }, + "removeWordsIfNoResults": { + "type": "string", + "enum": [ + "none", + "lastWords", + "firstWords", + "allOptional" + ], + "example": "firstWords", + "description": "Strategy for removing words from the query when it doesn't return any results.\nThis helps to avoid returning empty search results.\n\n- `none`.\n No words are removed when a query doesn't return results.\n\n- `lastWords`.\n Treat the last (then second to last, then third to last) word as optional,\n until there are results or at most 5 words have been removed.\n\n- `firstWords`.\n Treat the first (then second, then third) word as optional,\n until there are results or at most 5 words have been removed.\n\n- `allOptional`.\n Treat all words as optional.\n\nFor more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).\n", + "default": "none", + "x-categories": [ + "Query strategy" + ] + }, + "exactOnSingleWordQuery": { + "type": "string", + "enum": [ + "attribute", + "none", + "word" + ], + "description": "Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.\n\n- `attribute`.\n The Exact ranking criterion is 1 if the query word and attribute value are the same.\n For example, a search for \"road\" will match the value \"road\", but not \"road trip\".\n\n- `none`.\n The Exact ranking criterion is ignored on single-word searches.\n\n- `word`.\n The Exact ranking criterion is 1 if the query word is found in the attribute value.\n The query word must have at least 3 characters and must not be a stop word.\n Only exact matches will be highlighted,\n partial and prefix matches won't.\n", + "default": "attribute", + "x-categories": [ + "Query strategy" + ] + }, + "alternativesAsExact": { + "type": "string", + "enum": [ + "ignorePlurals", + "singleWordSynonym", + "multiWordsSynonym", + "ignoreConjugations" + ], + "x-categories": [ + "Query strategy" + ] + }, + "advancedSyntaxFeatures": { + "type": "string", + "enum": [ + "exactPhrase", + "excludeWords" + ], + "x-categories": [ + "Query strategy" + ] + }, + "distinct": { + "description": "Determines how many records of a group are included in the search results.\n\nRecords with the same value for the `attributeForDistinct` attribute are considered a group.\nThe `distinct` setting controls how many members of the group are returned.\nThis is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature).\n\nThe `distinct` setting is ignored if `attributeForDistinct` is not set.\n", + "example": 1, + "oneOf": [ + { + "type": "boolean", + "description": "Whether deduplication is turned on. If true, only one member of a group is shown in the search results." + }, + { + "type": "integer", + "description": "Number of members of a group of records to include in the search results.\n\n- Don't use `distinct > 1` for records that might be [promoted by rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/).\n The number of hits won't be correct and faceting won't work as expected.\n- With `distinct > 1`, the `hitsPerPage` parameter controls the number of returned groups.\n For example, with `hitsPerPage: 10` and `distinct: 2`, up to 20 records are returned.\n Likewise, the `nbHits` response attribute contains the number of returned groups.\n", + "minimum": 0, + "maximum": 4, + "default": 0 + } + ], + "x-categories": [ + "Advanced" + ] + }, + "mainInjectionQueryParameters": { + "title": "Composition Main Injection Query parameters as object", + "type": "object", + "additionalProperties": false, + "properties": { + "attributesToRetrieve": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "author", + "title", + "content" + ], + "description": "Attributes to include in the API response.\n\nTo reduce the size of your response, you can retrieve only some of the attributes.\nAttribute names are case-sensitive.\n\n- `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings.\n- To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`.\n- The `objectID` attribute is always included.\n", + "default": [ + "*" + ], + "x-categories": [ + "Attributes" + ] + }, + "restrictSearchableAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "title", + "author" + ], + "description": "Restricts a search to a subset of your searchable attributes.\nAttribute names are case-sensitive.\n", + "default": [], + "x-categories": [ + "Filtering" + ] + }, + "filters": { + "$ref": "#/components/schemas/filters" + }, + "facetFilters": { + "$ref": "#/components/schemas/facetFilters" + }, + "optionalFilters": { + "$ref": "#/components/schemas/optionalFilters" + }, + "numericFilters": { + "$ref": "#/components/schemas/numericFilters" + }, + "sumOrFiltersScores": { + "type": "boolean", + "description": "Whether to sum all filter scores.\n\nIf true, all filter scores are summed.\nOtherwise, the maximum filter score is kept.\nFor more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).\n", + "default": false, + "x-categories": [ + "Filtering" + ] + }, + "facets": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Facets for which to retrieve facet values that match the search criteria and the number of matching facet values.\n\nTo retrieve all facets, use the wildcard character `*`.\nFor more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).\n", + "default": [], + "example": [ + "*" + ], + "x-categories": [ + "Faceting" + ] + }, + "maxValuesPerFacet": { + "type": "integer", + "description": "Maximum number of facet values to return for each facet.", + "default": 100, + "maximum": 1000, + "x-categories": [ + "Faceting" + ] + }, + "facetingAfterDistinct": { + "type": "boolean", + "description": "Whether faceting should be applied after deduplication with `distinct`.\n\nThis leads to accurate facet counts when using faceting in combination with `distinct`.\nIt's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting,\nas `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.\n", + "default": false, + "x-categories": [ + "Faceting" + ] + }, + "sortFacetValuesBy": { + "type": "string", + "description": "Order in which to retrieve facet values.\n\n- `count`.\n Facet values are retrieved by decreasing count.\n The count is the number of matching records containing this facet value.\n\n- `alpha`.\n Retrieve facet values alphabetically.\n\nThis setting doesn't influence how facet values are displayed in your UI (see `renderingContent`).\nFor more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).\n", + "default": "count", + "x-categories": [ + "Faceting" + ] + }, + "attributesToHighlight": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "author", + "title", + "conten", + "content" + ], + "description": "Attributes to highlight.\n\nBy default, all searchable attributes are highlighted.\nUse `*` to highlight all attributes or use an empty array `[]` to turn off highlighting.\nAttribute names are case-sensitive.\n\nWith highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`.\nYou can use this to visually highlight matching parts of a search query in your UI.\n\nFor more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/).\n", + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "attributesToSnippet": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "content:80", + "description" + ], + "description": "Attributes for which to enable snippets.\nAttribute names are case-sensitive.\n\nSnippets provide additional context to matched words.\nIf you enable snippets, they include 10 words, including the matched word.\nThe matched word will also be wrapped by HTML tags for highlighting.\nYou can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`,\nwhere `NUMBER` is the number of words to be extracted.\n", + "default": [], + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "highlightPreTag": { + "type": "string", + "description": "HTML tag to insert before the highlighted parts in all highlighted results and snippets.", + "default": "", + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "highlightPostTag": { + "type": "string", + "description": "HTML tag to insert after the highlighted parts in all highlighted results and snippets.", + "default": "", + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "snippetEllipsisText": { + "type": "string", + "description": "String used as an ellipsis indicator when a snippet is truncated.", + "default": "…", + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "restrictHighlightAndSnippetArrays": { + "type": "boolean", + "description": "Whether to restrict highlighting and snippeting to items that at least partially matched the search query.\nBy default, all items are highlighted and snippeted.\n", + "default": false, + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "hitsPerPage": { + "$ref": "#/components/schemas/hitsPerPage" + }, + "length": { + "type": "integer", + "description": "Number of hits to retrieve (used in combination with `offset`).", + "minimum": 0, + "maximum": 1000, + "x-categories": [ + "Pagination" + ] + }, + "minWordSizefor1Typo": { + "type": "integer", + "description": "Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + "default": 4, + "x-categories": [ + "Typos" + ] + }, + "minWordSizefor2Typos": { + "type": "integer", + "description": "Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + "default": 8, + "x-categories": [ + "Typos" + ] + }, + "typoTolerance": { + "$ref": "#/components/schemas/typoTolerance" + }, + "allowTyposOnNumericTokens": { + "type": "boolean", + "description": "Whether to allow typos on numbers in the search query.\n\nTurn off this setting to reduce the number of irrelevant matches\nwhen searching in large sets of similar numbers.\n", + "default": true, + "x-categories": [ + "Typos" + ] + }, + "disableTypoToleranceOnAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "sku" + ], + "description": "Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).\nAttribute names are case-sensitive.\n\nReturning only exact matches can help when:\n\n- [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/).\n- Reducing the number of matches when you have too many.\n This can happen with attributes that are long blocks of text, such as product descriptions.\n\nConsider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.\n", + "default": [], + "x-categories": [ + "Typos" + ] + }, + "ignorePlurals": { + "$ref": "#/components/schemas/ignorePlurals" + }, + "removeStopWords": { + "$ref": "#/components/schemas/removeStopWords" + }, + "queryLanguages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + }, + "example": [ + "es" + ], + "description": "Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries.\n\nThis setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings.\nThis setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages.\nTo support this, you must place the CJK language **first**.\n\n**You should always specify a query language.**\nIf you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).\n", + "default": [], + "x-categories": [ + "Languages" + ] + }, + "naturalLanguages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + }, + "description": "ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches):\n\n- Sets `removeStopWords` and `ignorePlurals` to the list of provided languages.\n- Sets `removeWordsIfNoResults` to `allOptional`.\n- Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.\n", + "default": [], + "x-categories": [ + "Languages" + ] + }, + "decompoundQuery": { + "type": "boolean", + "description": "Whether to split compound words in the query into their building blocks.\n\nFor more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words).\nWord segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.\nDecompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).\nFor example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).\n", + "default": true, + "x-categories": [ + "Languages" + ] + }, + "enableRules": { + "type": "boolean", + "description": "Whether to enable rules.", + "default": true, + "x-categories": [ + "Rules" + ] + }, + "ruleContexts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Assigns a rule context to the search query.\n\n[Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.\n", + "default": [], + "example": [ + "mobile" + ], + "x-categories": [ + "Rules" + ] + }, + "enablePersonalization": { + "type": "boolean", + "description": "Whether to enable Personalization.", + "default": false, + "x-categories": [ + "Personalization" + ] + }, + "personalizationImpact": { + "type": "integer", + "description": "Impact that Personalization should have on this search.\n\nThe higher this value is, the more Personalization determines the ranking compared to other factors.\nFor more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).\n", + "default": 100, + "minimum": 0, + "maximum": 100, + "x-categories": [ + "Personalization" + ] + }, + "queryType": { + "$ref": "#/components/schemas/queryType" + }, + "removeWordsIfNoResults": { + "$ref": "#/components/schemas/removeWordsIfNoResults" + }, + "advancedSyntax": { + "type": "boolean", + "description": "Whether to support phrase matching and excluding words from search queries.\n\nUse the `advancedSyntaxFeatures` parameter to control which feature is supported.\n", + "default": false, + "x-categories": [ + "Query strategy" + ] + }, + "optionalWords": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "blue", + "iphone case" + ], + "description": "Words that should be considered optional when found in the query.\n\nBy default, records must match all words in the search query to be included in the search results.\nAdding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words.\nFor example, if the search query is \"action video\" and \"video\" is an optional word,\nthe search engine runs two queries. One for \"action video\" and one for \"action\".\nRecords that match all words are ranked higher.\n\nFor a search query with 4 or more words **and** all its words are optional,\nthe number of matched words required for a record to be included in the search results increases for every 1,000 records:\n\n- If `optionalWords` has less than 10 words, the required number of matched words increases by 1:\n results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words.\n- If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down).\n For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words.\n\nFor more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).\n", + "default": [], + "x-categories": [ + "Query strategy" + ] + }, + "disableExactOnAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "description" + ], + "description": "Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).\nAttribute names are case-sensitive.\n\nThis can be useful for attributes with long values, where the likelihood of an exact match is high,\nsuch as product descriptions.\nTurning off the Exact ranking criterion for these attributes favors exact matching on other attributes.\nThis reduces the impact of individual attributes with a lot of content on ranking.\n", + "default": [], + "x-categories": [ + "Query strategy" + ] + }, + "exactOnSingleWordQuery": { + "$ref": "#/components/schemas/exactOnSingleWordQuery" + }, + "alternativesAsExact": { + "type": "array", + "items": { + "$ref": "#/components/schemas/alternativesAsExact" + }, + "description": "Determine which plurals and synonyms should be considered an exact matches.\n\nBy default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching.\nFor example:\n\n- \"swimsuit\" and \"swimsuits\" are treated the same\n- \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)).\n\n- `ignorePlurals`.\n Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.\n\n- `singleWordSynonym`.\n Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches.\n\n- `multiWordsSynonym`.\n Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.\n", + "default": [ + "ignorePlurals", + "singleWordSynonym" + ], + "x-categories": [ + "Query strategy" + ] + }, + "advancedSyntaxFeatures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/advancedSyntaxFeatures" + }, + "description": "Advanced search syntax features you want to support.\n\n- `exactPhrase`.\n Phrases in quotes must match exactly.\n For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".\n\n- `excludeWords`.\n Query words prefixed with a `-` must not occur in a record.\n For example, `search -engine` matches records that contain \"search\" but not \"engine\".\n\nThis setting only has an effect if `advancedSyntax` is true.\n", + "default": [ + "exactPhrase", + "excludeWords" + ], + "x-categories": [ + "Query strategy" + ] + }, + "distinct": { + "$ref": "#/components/schemas/distinct" + }, + "getRankingInfo": { + "type": "boolean", + "description": "Whether the search response should include detailed ranking information." + }, + "clickAnalytics": { + "type": "boolean", + "description": "Whether to include a `queryID` attribute in the response.\n\nThe query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).\n", + "default": false, + "x-categories": [ + "Analytics" + ] + }, + "analytics": { + "type": "boolean", + "description": "Whether this search will be included in Analytics.", + "default": true, + "x-categories": [ + "Analytics" + ] + }, + "analyticsTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).", + "default": [], + "x-categories": [ + "Analytics" + ] + }, + "synonyms": { + "type": "boolean", + "description": "Whether to take into account an index's synonyms for this search.", + "default": true, + "x-categories": [ + "Advanced" + ] + }, + "replaceSynonymsInHighlight": { + "type": "boolean", + "description": "Whether to replace a highlighted word with the matched synonym.\n\nBy default, the original words are highlighted even if a synonym matches.\nFor example, with `home` as a synonym for `house` and a search for `home`,\nrecords matching either \"home\" or \"house\" are included in the search results,\nand either \"home\" or \"house\" are highlighted.\n\nWith `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records,\nbut all occurrences of \"house\" are replaced by \"home\" in the highlighted response.\n", + "default": false, + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "minProximity": { + "type": "integer", + "minimum": 1, + "maximum": 7, + "description": "Minimum proximity score for two matching words.\n\nThis adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity)\nby equally scoring matches that are farther apart.\n\nFor example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.\n", + "default": 1, + "x-categories": [ + "Advanced" + ] + }, + "responseFields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Properties to include in the API response of `search` and `browse` requests.\n\nBy default, all response properties are included.\nTo reduce the response size, you can select, which attributes should be included.\n\nYou can't exclude these properties:\n`message`, `warning`, `cursor`, `serverUsed`, `indexUsed`,\n`abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter.\n\nDon't exclude properties that you might need in your search UI.\n", + "default": [ + "*" + ], + "x-categories": [ + "Advanced" + ] + }, + "maxFacetHits": { + "$ref": "#/components/schemas/maxFacetHits" + }, + "percentileComputation": { + "type": "boolean", + "description": "Whether to include this search when calculating processing-time percentiles.", + "default": true, + "x-categories": [ + "Advanced" + ] + }, + "attributeCriteriaComputedByMinProximity": { + "type": "boolean", + "description": "Whether the best matching attribute should be determined by minimum proximity.\n\nThis setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting.\nIf true, the best matching attribute is selected based on the minimum proximity of multiple matches.\nOtherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.\n", + "default": false, + "x-categories": [ + "Advanced" + ] + }, + "enableABTest": { + "type": "boolean", + "description": "Whether to enable A/B testing for this search.", + "default": true, + "x-categories": [ + "Advanced" + ] + }, + "enableReRanking": { + "type": "boolean", + "description": "Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).\n\nThis setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.\n", + "default": true, + "x-categories": [ + "Filtering" + ] + } + } + }, + "optionalWordsArray": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "blue", + "iphone case" + ], + "description": "List of [optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).", + "default": [], + "x-categories": [ + "Query strategy" + ] + }, + "optionalWords": { + "description": "Words that should be considered optional when found in the query.\n\nBy default, records must match all words in the search query to be included in the search results.\nAdding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words.\nFor example, if the search query is \"action video\" and \"video\" is an optional word,\nthe search engine runs two queries. One for \"action video\" and one for \"action\".\nRecords that match all words are ranked higher.\n\nFor a search query with 4 or more words **and** all its words are optional,\nthe number of matched words required for a record to be included in the search results increases for every 1,000 records:\n\n- If `optionalWords` has less than 10 words, the required number of matched words increases by 1:\n results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words.\n- If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down).\n For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words.\n\nFor more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).\n", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/components/schemas/optionalWordsArray" + } + ] + }, + "injectedItemsQueryParameters": { + "title": "Composition injectedItems Query parameters as object", + "type": "object", + "additionalProperties": false, + "properties": { + "attributesToRetrieve": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "author", + "title", + "content" + ], + "description": "Attributes to include in the API response.\n\nTo reduce the size of your response, you can retrieve only some of the attributes.\nAttribute names are case-sensitive.\n\n- `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings.\n- To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`.\n- The `objectID` attribute is always included.\n", + "default": [ + "*" + ], + "x-categories": [ + "Attributes" + ] + }, + "restrictSearchableAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "title", + "author" + ], + "description": "Restricts a search to a subset of your searchable attributes.\nAttribute names are case-sensitive.\n", + "default": [], + "x-categories": [ + "Filtering" + ] + }, + "filters": { + "$ref": "#/components/schemas/filters" + }, + "facetFilters": { + "$ref": "#/components/schemas/facetFilters" + }, + "optionalFilters": { + "$ref": "#/components/schemas/optionalFilters" + }, + "numericFilters": { + "$ref": "#/components/schemas/numericFilters" + }, + "attributesToHighlight": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "author", + "title", + "conten", + "content" + ], + "description": "Attributes to highlight.\n\nBy default, all searchable attributes are highlighted.\nUse `*` to highlight all attributes or use an empty array `[]` to turn off highlighting.\nAttribute names are case-sensitive.\n\nWith highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`.\nYou can use this to visually highlight matching parts of a search query in your UI.\n\nFor more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/).\n", + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "attributesToSnippet": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "content:80", + "description" + ], + "description": "Attributes for which to enable snippets.\nAttribute names are case-sensitive.\n\nSnippets provide additional context to matched words.\nIf you enable snippets, they include 10 words, including the matched word.\nThe matched word will also be wrapped by HTML tags for highlighting.\nYou can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`,\nwhere `NUMBER` is the number of words to be extracted.\n", + "default": [], + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "highlightPreTag": { + "type": "string", + "description": "HTML tag to insert before the highlighted parts in all highlighted results and snippets.", + "default": "", + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "highlightPostTag": { + "type": "string", + "description": "HTML tag to insert after the highlighted parts in all highlighted results and snippets.", + "default": "", + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "snippetEllipsisText": { + "type": "string", + "description": "String used as an ellipsis indicator when a snippet is truncated.", + "default": "…", + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "restrictHighlightAndSnippetArrays": { + "type": "boolean", + "description": "Whether to restrict highlighting and snippeting to items that at least partially matched the search query.\nBy default, all items are highlighted and snippeted.\n", + "default": false, + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "minWordSizefor1Typo": { + "type": "integer", + "description": "Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + "default": 4, + "x-categories": [ + "Typos" + ] + }, + "minWordSizefor2Typos": { + "type": "integer", + "description": "Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + "default": 8, + "x-categories": [ + "Typos" + ] + }, + "typoTolerance": { + "$ref": "#/components/schemas/typoTolerance" + }, + "allowTyposOnNumericTokens": { + "type": "boolean", + "description": "Whether to allow typos on numbers in the search query.\n\nTurn off this setting to reduce the number of irrelevant matches\nwhen searching in large sets of similar numbers.\n", + "default": true, + "x-categories": [ + "Typos" + ] + }, + "disableTypoToleranceOnAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "sku" + ], + "description": "Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).\nAttribute names are case-sensitive.\n\nReturning only exact matches can help when:\n\n- [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/).\n- Reducing the number of matches when you have too many.\n This can happen with attributes that are long blocks of text, such as product descriptions.\n\nConsider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.\n", + "default": [], + "x-categories": [ + "Typos" + ] + }, + "ignorePlurals": { + "$ref": "#/components/schemas/ignorePlurals" + }, + "removeStopWords": { + "$ref": "#/components/schemas/removeStopWords" + }, + "queryLanguages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + }, + "example": [ + "es" + ], + "description": "Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries.\n\nThis setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings.\nThis setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages.\nTo support this, you must place the CJK language **first**.\n\n**You should always specify a query language.**\nIf you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).\n", + "default": [], + "x-categories": [ + "Languages" + ] + }, + "naturalLanguages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + }, + "description": "ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches):\n\n- Sets `removeStopWords` and `ignorePlurals` to the list of provided languages.\n- Sets `removeWordsIfNoResults` to `allOptional`.\n- Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.\n", + "default": [], + "x-categories": [ + "Languages" + ] + }, + "decompoundQuery": { + "type": "boolean", + "description": "Whether to split compound words in the query into their building blocks.\n\nFor more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words).\nWord segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.\nDecompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).\nFor example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).\n", + "default": true, + "x-categories": [ + "Languages" + ] + }, + "enableRules": { + "type": "boolean", + "description": "Whether to enable rules.", + "default": true, + "x-categories": [ + "Rules" + ] + }, + "ruleContexts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Assigns a rule context to the search query.\n\n[Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.\n", + "default": [], + "example": [ + "mobile" + ], + "x-categories": [ + "Rules" + ] + }, + "enablePersonalization": { + "type": "boolean", + "description": "Whether to enable Personalization.", + "default": false, + "x-categories": [ + "Personalization" + ] + }, + "personalizationImpact": { + "type": "integer", + "description": "Impact that Personalization should have on this search.\n\nThe higher this value is, the more Personalization determines the ranking compared to other factors.\nFor more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).\n", + "default": 100, + "minimum": 0, + "maximum": 100, + "x-categories": [ + "Personalization" + ] + }, + "queryType": { + "$ref": "#/components/schemas/queryType" + }, + "removeWordsIfNoResults": { + "$ref": "#/components/schemas/removeWordsIfNoResults" + }, + "advancedSyntax": { + "type": "boolean", + "description": "Whether to support phrase matching and excluding words from search queries.\n\nUse the `advancedSyntaxFeatures` parameter to control which feature is supported.\n", + "default": false, + "x-categories": [ + "Query strategy" + ] + }, + "optionalWords": { + "$ref": "#/components/schemas/optionalWords" + }, + "disableExactOnAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "description" + ], + "description": "Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).\nAttribute names are case-sensitive.\n\nThis can be useful for attributes with long values, where the likelihood of an exact match is high,\nsuch as product descriptions.\nTurning off the Exact ranking criterion for these attributes favors exact matching on other attributes.\nThis reduces the impact of individual attributes with a lot of content on ranking.\n", + "default": [], + "x-categories": [ + "Query strategy" + ] + }, + "exactOnSingleWordQuery": { + "$ref": "#/components/schemas/exactOnSingleWordQuery" + }, + "alternativesAsExact": { + "type": "array", + "items": { + "$ref": "#/components/schemas/alternativesAsExact" + }, + "description": "Determine which plurals and synonyms should be considered an exact matches.\n\nBy default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching.\nFor example:\n\n- \"swimsuit\" and \"swimsuits\" are treated the same\n- \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)).\n\n- `ignorePlurals`.\n Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.\n\n- `singleWordSynonym`.\n Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches.\n\n- `multiWordsSynonym`.\n Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.\n", + "default": [ + "ignorePlurals", + "singleWordSynonym" + ], + "x-categories": [ + "Query strategy" + ] + }, + "advancedSyntaxFeatures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/advancedSyntaxFeatures" + }, + "description": "Advanced search syntax features you want to support.\n\n- `exactPhrase`.\n Phrases in quotes must match exactly.\n For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".\n\n- `excludeWords`.\n Query words prefixed with a `-` must not occur in a record.\n For example, `search -engine` matches records that contain \"search\" but not \"engine\".\n\nThis setting only has an effect if `advancedSyntax` is true.\n", + "default": [ + "exactPhrase", + "excludeWords" + ], + "x-categories": [ + "Query strategy" + ] + }, + "distinct": { + "$ref": "#/components/schemas/distinct" + }, + "getRankingInfo": { + "type": "boolean", + "description": "Whether the search response should include detailed ranking information." + }, + "clickAnalytics": { + "type": "boolean", + "description": "Whether to include a `queryID` attribute in the response.\n\nThe query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).\n", + "default": false, + "x-categories": [ + "Analytics" + ] + }, + "analytics": { + "type": "boolean", + "description": "Whether this search will be included in Analytics.", + "default": true, + "x-categories": [ + "Analytics" + ] + }, + "analyticsTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).", + "default": [], + "x-categories": [ + "Analytics" + ] + }, + "synonyms": { + "type": "boolean", + "description": "Whether to take into account an index's synonyms for this search.", + "default": true, + "x-categories": [ + "Advanced" + ] + }, + "replaceSynonymsInHighlight": { + "type": "boolean", + "description": "Whether to replace a highlighted word with the matched synonym.\n\nBy default, the original words are highlighted even if a synonym matches.\nFor example, with `home` as a synonym for `house` and a search for `home`,\nrecords matching either \"home\" or \"house\" are included in the search results,\nand either \"home\" or \"house\" are highlighted.\n\nWith `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records,\nbut all occurrences of \"house\" are replaced by \"home\" in the highlighted response.\n", + "default": false, + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "minProximity": { + "type": "integer", + "minimum": 1, + "maximum": 7, + "description": "Minimum proximity score for two matching words.\n\nThis adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity)\nby equally scoring matches that are farther apart.\n\nFor example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.\n", + "default": 1, + "x-categories": [ + "Advanced" + ] + }, + "responseFields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Properties to include in the API response of `search` and `browse` requests.\n\nBy default, all response properties are included.\nTo reduce the response size, you can select, which attributes should be included.\n\nYou can't exclude these properties:\n`message`, `warning`, `cursor`, `serverUsed`, `indexUsed`,\n`abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter.\n\nDon't exclude properties that you might need in your search UI.\n", + "default": [ + "*" + ], + "x-categories": [ + "Advanced" + ] + }, + "maxFacetHits": { + "$ref": "#/components/schemas/maxFacetHits" + }, + "percentileComputation": { + "type": "boolean", + "description": "Whether to include this search when calculating processing-time percentiles.", + "default": true, + "x-categories": [ + "Advanced" + ] + }, + "attributeCriteriaComputedByMinProximity": { + "type": "boolean", + "description": "Whether the best matching attribute should be determined by minimum proximity.\n\nThis setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting.\nIf true, the best matching attribute is selected based on the minimum proximity of multiple matches.\nOtherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.\n", + "default": false, + "x-categories": [ + "Advanced" + ] + }, + "enableABTest": { + "type": "boolean", + "description": "Whether to enable A/B testing for this search.", + "default": true, + "x-categories": [ + "Advanced" + ] + }, + "enableReRanking": { + "type": "boolean", + "description": "Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).\n\nThis setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.\n", + "default": true, + "x-categories": [ + "Filtering" + ] + } + } + }, + "injectedItem": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "injected Item unique identifier." + }, + "source": { + "title": "injectedItemSource", + "type": "object", + "additionalProperties": false, + "properties": { + "search": { + "title": "injectedItemSourceSearch", + "type": "object", + "additionalProperties": false, + "properties": { + "index": { + "type": "string", + "description": "Composition Main Index name.", + "example": "Products" + }, + "params": { + "$ref": "#/components/schemas/injectedItemsQueryParameters" + } + }, + "required": [ + "index" + ] + } + }, + "required": [ + "search" + ] + }, + "position": { + "type": "integer", + "minimum": 0, + "maximum": 19 + }, + "length": { + "type": "integer", + "minimum": 0, + "maximum": 20 + } + }, + "required": [ + "key", + "source", + "position", + "length" + ] + }, + "compositionBehavior": { + "type": "object", + "additionalProperties": false, + "properties": { + "injection": { + "title": "injection", + "type": "object", + "additionalProperties": false, + "properties": { + "main": { + "title": "main", + "type": "object", + "additionalProperties": false, + "properties": { + "source": { + "title": "compositionSource", + "type": "object", + "additionalProperties": false, + "properties": { + "search": { + "title": "compositionSourceSearch", + "type": "object", + "additionalProperties": false, + "properties": { + "index": { + "type": "string", + "description": "Composition Main Index name.", + "example": "Products" + }, + "params": { + "$ref": "#/components/schemas/mainInjectionQueryParameters" + } + }, + "required": [ + "index" + ] + } + }, + "required": [ + "search" + ] + } + }, + "required": [ + "source" + ] + }, + "injectedItems": { + "type": "array", + "description": "list of injected items of the current Composition.", + "minItems": 0, + "maxItems": 2, + "items": { + "$ref": "#/components/schemas/injectedItem" + } + } + }, + "required": [ + "main" + ] + } + }, + "required": [ + "injection" + ] + }, + "composition": { + "type": "object", + "additionalProperties": false, + "properties": { + "objectID": { + "$ref": "#/components/schemas/objectID" + }, + "name": { + "type": "string", + "description": "Composition name.", + "example": "my lovely crafted composition" + }, + "description": { + "type": "string", + "description": "Composition description.", + "example": "my lovely crafted composition that is used for X purpose" + }, + "behavior": { + "$ref": "#/components/schemas/compositionBehavior" + } + }, + "required": [ + "objectID", + "behavior", + "name" + ] + }, + "action": { + "type": "string", + "enum": [ + "upsert", + "delete" + ], + "description": "Type of Composition Batch operation." + }, + "deleteCompositionAction": { + "type": "object", + "description": "Operation arguments when deleting.", + "additionalProperties": false, + "properties": { + "objectID": { + "$ref": "#/components/schemas/objectID" + } + }, + "required": [ + "objectID" + ] + }, + "batchCompositionAction": { + "oneOf": [ + { + "$ref": "#/components/schemas/composition" + }, + { + "$ref": "#/components/schemas/deleteCompositionAction" + } + ] + }, + "taskID": { + "type": "integer", + "format": "int64", + "example": 1514562690001, + "description": "Unique identifier of a task.\n\nA successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`.\n" + }, + "ruleID": { + "title": "objectID", + "type": "string", + "description": "Unique identifier of a rule object." + }, + "anchoring": { + "type": "string", + "description": "Which part of the search query the pattern should match:\n\n- `startsWith`. The pattern must match the beginning of the query.\n- `endsWith`. The pattern must match the end of the query.\n- `is`. The pattern must match the query exactly.\n- `contains`. The pattern must match anywhere in the query.\n\nEmpty queries are only allowed as patterns with `anchoring: is`.\n", + "enum": [ + "is", + "startsWith", + "endsWith", + "contains" + ] + }, + "context": { + "type": "string", + "pattern": "[A-Za-z0-9_-]+", + "description": "An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter.\nFor example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`.\nA rule context must only contain alphanumeric characters.\n", + "example": "mobile" + }, + "condition": { + "type": "object", + "additionalProperties": false, + "properties": { + "pattern": { + "type": "string", + "description": "Query pattern that triggers the rule.\n\nYou can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name.\nThe rule is triggered if the query matches the literal string or a value of the specified facet.\nFor example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\".\n", + "example": "{facet:genre}" + }, + "anchoring": { + "$ref": "#/components/schemas/anchoring" + }, + "alternatives": { + "type": "boolean", + "description": "Whether the pattern should match plurals, synonyms, and typos.", + "default": false + }, + "context": { + "$ref": "#/components/schemas/context" + }, + "filters": { + "type": "string", + "description": "Filters that trigger the rule.\n\nYou can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected.\nYou can use `filters` on its own or combine it with the `pattern` parameter.\n", + "example": "genre:comedy" + } + } + }, + "timeRange": { + "type": "object", + "additionalProperties": false, + "properties": { + "from": { + "type": "integer", + "format": "int64", + "description": "When the rule should start to be active, in Unix epoch time." + }, + "until": { + "type": "integer", + "format": "int64", + "description": "When the rule should stop to be active, in Unix epoch time." + } + }, + "required": [ + "from", + "until" + ] + }, + "compositionRule": { + "type": "object", + "additionalProperties": false, + "properties": { + "objectID": { + "$ref": "#/components/schemas/objectID" + }, + "conditions": { + "type": "array", + "minItems": 0, + "maxItems": 25, + "description": "Conditions that trigger a composition rule.", + "items": { + "$ref": "#/components/schemas/condition" + } + }, + "consequence": { + "title": "compositionRuleConsequence", + "type": "object", + "description": "Effect of the rule.", + "additionalProperties": false, + "properties": { + "behavior": { + "$ref": "#/components/schemas/compositionBehavior" + } + }, + "required": [ + "behavior" + ] + }, + "description": { + "type": "string", + "description": "Description of the rule's purpose to help you distinguish between different rules.", + "example": "Display a promotional banner" + }, + "enabled": { + "type": "boolean", + "default": true, + "description": "Whether the rule is active." + }, + "validity": { + "type": "array", + "description": "Time periods when the rule is active.", + "items": { + "$ref": "#/components/schemas/timeRange" + } + } + }, + "required": [ + "objectID", + "conditions", + "consequence" + ] + }, + "deleteCompositionRuleAction": { + "type": "object", + "description": "Operation arguments when deleting.", + "additionalProperties": false, + "properties": { + "objectID": { + "$ref": "#/components/schemas/objectID" + } + }, + "required": [ + "objectID" + ] + }, + "rulesBatchCompositionAction": { + "oneOf": [ + { + "$ref": "#/components/schemas/compositionRule" + }, + { + "$ref": "#/components/schemas/deleteCompositionRuleAction" + } + ] + }, + "parameters_query": { + "type": "string", + "description": "Search query for rules.", + "default": "" + }, + "parameters_page": { + "type": "integer", + "minimum": 0, + "description": "Requested page of the API response.\n\nAlgolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)).\n\n- `hitsPerPage`: sets the number of search results (_hits_) displayed per page.\n- `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on.\n\nFor example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.\n" + }, + "parameters_hitsPerPage": { + "type": "integer", + "default": 20, + "minimum": 1, + "maximum": 1000, + "description": "Maximum number of hits per page.\n\nAlgolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)).\n\n- `hitsPerPage`: sets the number of search results (_hits_) displayed per page.\n- `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on.\n\nFor example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.\n" + }, + "taskStatus": { + "type": "string", + "enum": [ + "published", + "notPublished" + ], + "description": "Task status, `published` if the task is completed, `notPublished` otherwise." + }, + "GetTaskResponse": { + "title": "getTaskResponse", + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "$ref": "#/components/schemas/taskStatus" + } + }, + "required": [ + "status" + ] + }, + "listCompositionsResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "type": "array", + "description": "All compositions in your Algolia application.", + "items": { + "$ref": "#/components/schemas/composition" + } + }, + "nbPages": { + "type": "integer", + "description": "Number of pages.", + "example": 100 + }, + "page": { + "type": "integer", + "description": "Current page.", + "example": 0 + }, + "hitsPerPage": { + "type": "integer", + "description": "Number of items per page.", + "example": 20 + }, + "nbHits": { + "type": "integer", + "description": "Number of items.", + "example": 200 + } + }, + "required": [ + "hitsPerPage", + "items", + "nbHits", + "nbPages", + "page" + ] + } + }, + "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" + } + } + } + }, + "CompositionNotFound": { + "description": "Composition not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBase" + } + } + } + } + } + }, + "x-tagGroups": [ + { + "name": "Search", + "tags": [ + "Compositions" + ] + } + ] +} \ No newline at end of file diff --git a/src/data/composition.json b/src/data/composition.json new file mode 100644 index 0000000..98eaae9 --- /dev/null +++ b/src/data/composition.json @@ -0,0 +1,1823 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Composition API", + "description": "The Algolia Composition API lets you run composed search requests on your Compositions.\n\n## Client libraries\n\nUse Algolia's API clients and libraries to reliably integrate Algolia's APIs with your apps.\n\nSee: [Algolia's ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/)\n\n## Base URLs\n\nThe base URLs for requests to the Composition API are:\n\n- `https://{APPLICATION_ID}.algolia.net`\n- `https://{APPLICATION_ID}-dsn.algolia.net`.\n If your subscription includes a [Distributed Search Network](https://dashboard.algolia.com/infra),\n this ensures that requests are sent to servers closest to users.\n\nBoth URLs provide high availability by distributing requests with load balancing.\n\n**All requests must use HTTPS.**\n\n## Retry strategy\n\nTo guarantee high availability, implement a retry strategy for all API requests using the URLs of your servers as fallbacks:\n\n- `https://{APPLICATION_ID}-1.algolianet.com`\n- `https://{APPLICATION_ID}-2.algolianet.com`\n- `https://{APPLICATION_ID}-3.algolianet.com`\n\nThese URLs use a different DNS provider than the primary URLs.\nYou should randomize this list to ensure an even load across the three servers.\n\nAll Algolia API clients implement this retry strategy.\n\n## Authentication\n\nTo authenticate your API requests, add these headers:\n\n- `x-algolia-application-id`. Your Algolia application ID.\n- `x-algolia-api-key`. An API key with the necessary permissions to make the request.\n The required access control list (ACL) to make a request is listed in each endpoint's reference.\n\nYou can find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account).\n\n## Request format\n\nDepending on the endpoint, request bodies are either JSON objects or arrays of JSON objects,\n\n## Parameters\n\nParameters are passed as query parameters for GET and DELETE requests,\nand in the request body for POST and PUT requests.\n\nQuery parameters must be [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding).\nNon-ASCII characters must be UTF-8 encoded.\nPlus characters (`+`) are interpreted as spaces.\nArrays as query parameters must be one of:\n\n- A comma-separated string: `attributesToRetrieve=title,description`\n- A URL-encoded JSON array: `attributesToRetrieve=%5B%22title%22,%22description%22%D`\n\n## Response status and errors\n\nThe Composition API returns JSON responses.\nSince JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API response.\n\nSuccessful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status.\nError responses have a `message` property with more information.\n\n## Version\n\nThe current version of the Composition API is version 1, as indicated by the `/1/` in each endpoint's URL.\n", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://{applicationId}.algolia.net", + "variables": { + "applicationId": { + "default": "ALGOLIA_APPLICATION_ID" + } + } + }, + { + "url": "https://{applicationId}-1.algolianet.com", + "variables": { + "applicationId": { + "default": "ALGOLIA_APPLICATION_ID" + } + } + }, + { + "url": "https://{applicationId}-2.algolianet.com", + "variables": { + "applicationId": { + "default": "ALGOLIA_APPLICATION_ID" + } + } + }, + { + "url": "https://{applicationId}-3.algolianet.com", + "variables": { + "applicationId": { + "default": "ALGOLIA_APPLICATION_ID" + } + } + }, + { + "url": "https://{applicationId}-dsn.algolia.net", + "variables": { + "applicationId": { + "default": "ALGOLIA_APPLICATION_ID" + } + } + } + ], + "security": [ + { + "applicationId": [], + "apiKey": [] + } + ], + "tags": [ + { + "name": "Compositions", + "description": "Manage your compositions and composition settings.\n" + }, + { + "name": "Rules", + "description": "Manage your compositions rules.\n" + }, + { + "name": "Search", + "description": "Search one composition for matching records or facet values." + } + ], + "paths": { + "/1/compositions/{compositionID}/run": { + "post": { + "tags": [ + "Search" + ], + "operationId": "search", + "x-use-read-transporter": true, + "x-cacheable": true, + "x-acl": [ + "search" + ], + "summary": "Run a Composition", + "description": "Runs a query on a single composition and returns matching results.", + "parameters": [ + { + "$ref": "#/components/parameters/compositionID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "requestBody", + "type": "object", + "additionalProperties": false, + "properties": { + "params": { + "$ref": "#/components/schemas/params" + } + } + } + } + } + }, + "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" + } + } + } + }, + "/1/compositions/{compositionID}/facets/{facetName}/query": { + "post": { + "tags": [ + "Search" + ], + "operationId": "searchForFacetValues", + "x-use-read-transporter": true, + "x-cacheable": true, + "x-acl": [ + "search" + ], + "summary": "Search for facet values", + "description": "Searches for values of a specified facet attribute on the composition's main source's index.\n\n- By default, facet values are sorted by decreasing count.\n You can adjust this with the `sortFacetValueBy` parameter.\n- Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**.\n", + "parameters": [ + { + "$ref": "#/components/parameters/compositionID" + }, + { + "name": "facetName", + "description": "Facet attribute in which to search for values.\n\nThis attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.\n", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "searchForFacetValuesRequest", + "type": "object", + "additionalProperties": false, + "properties": { + "params": { + "title": "searchForFacetValuesParams", + "type": "object", + "properties": { + "query": { + "$ref": "#/components/schemas/query" + }, + "maxFacetHits": { + "$ref": "#/components/schemas/maxFacetHits" + }, + "searchQuery": { + "$ref": "#/components/schemas/params" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/searchForFacetValuesResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/IndexNotFound" + } + } + } + } + }, + "components": { + "securitySchemes": { + "applicationId": { + "type": "apiKey", + "in": "header", + "name": "x-algolia-application-id", + "description": "Your Algolia application ID." + }, + "apiKey": { + "type": "apiKey", + "in": "header", + "name": "x-algolia-api-key", + "description": "Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n" + } + }, + "schemas": { + "compositionObjectID": { + "type": "string", + "description": "Unique Composition ObjectID." + }, + "query": { + "type": "string", + "description": "Search query.", + "default": "", + "x-categories": [ + "Search" + ] + }, + "filters": { + "type": "string", + "description": "Filter expression to only include items that match the filter criteria in the response.\n\nYou can use these filter expressions:\n\n- **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`.\n- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive).\n- **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value.\n- **Tag filters.** `_tags:` or just `` (case-sensitive).\n- **Boolean filters.** `: true | false`.\n\nYou can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions:\n\n- You can only combine filters of the same type with `OR`.\n **Not supported:** `facet:value OR num > 3`.\n- You can't use `NOT` with combinations of filters.\n **Not supported:** `NOT(facet:value OR facet:value)`\n- You can't combine conjunctions (`AND`) with `OR`.\n **Not supported:** `facet:value OR (facet:value AND facet:value)`\n\nUse quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes.\nIf a facet attribute is an array, the filter matches if it matches at least one element of the array.\n\nFor more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).\n", + "example": "(category:Book OR category:Ebook) AND _tags:published", + "x-categories": [ + "Filtering" + ] + }, + "page": { + "type": "integer", + "description": "Page of search results to retrieve.", + "default": 0, + "minimum": 0, + "x-categories": [ + "Pagination" + ] + }, + "facetFilters": { + "description": "Filter the search by facet values, so that only records with the same facet values are retrieved.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\n- `[filter1, filter2]` is interpreted as `filter1 AND filter2`.\n- `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`.\n- `facet:-value` is interpreted as `NOT facet:value`.\n\nWhile it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash:\n`facet:\\-value`.\n", + "example": [ + [ + "category:Book", + "category:-Movie" + ], + "author:John Doe" + ], + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/facetFilters" + } + }, + { + "type": "string" + } + ], + "x-categories": [ + "Filtering" + ] + }, + "optionalFilters": { + "description": "Filters to promote or demote records in the search results.\n\nOptional filters work like facet filters, but they don't exclude records from the search results.\nRecords that match the optional filter rank before records that don't match.\nIf you're using a negative filter `facet:-value`, matching records rank after records that don't match.\n\n- Optional filters don't work on virtual replicas.\n- Optional filters are applied _after_ sort-by attributes.\n- Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/)).\n- Optional filters don't work with numeric attributes.\n", + "example": [ + "category:Book", + "author:John Doe" + ], + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/optionalFilters" + } + }, + { + "type": "string" + } + ], + "x-categories": [ + "Filtering" + ] + }, + "numericFilters": { + "description": "Filter by numeric facets.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\nYou can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`.\nComparisons are precise up to 3 decimals.\nYou can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries.\nThe same combination rules apply as for `facetFilters`.\n", + "example": [ + [ + "inStock = 1", + "deliveryDate < 1441755506" + ], + "price < 1000" + ], + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/numericFilters" + } + }, + { + "type": "string" + } + ], + "x-categories": [ + "Filtering" + ] + }, + "hitsPerPage": { + "type": "integer", + "description": "Number of hits per page.", + "default": 20, + "minimum": 1, + "maximum": 1000, + "x-categories": [ + "Pagination" + ] + }, + "aroundLatLng": { + "type": "string", + "description": "Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude.\n\nOnly records included within a circle around this central location are included in the results.\nThe radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings.\nThis parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.\n", + "example": "40.71,-74.01", + "default": "", + "x-categories": [ + "Geo-Search" + ] + }, + "aroundLatLngViaIP": { + "type": "boolean", + "description": "Whether to obtain the coordinates from the request's IP address.", + "default": false, + "x-categories": [ + "Geo-Search" + ] + }, + "aroundRadiusAll": { + "title": "all", + "type": "string", + "description": "Return all records with a valid `_geoloc` attribute. Don't filter by distance.", + "enum": [ + "all" + ] + }, + "aroundRadius": { + "description": "Maximum radius for a search around a central location.\n\nThis parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters.\nBy default, the search radius is determined automatically from the density of hits around the central location.\nThe search radius is small if there are many hits close to the central coordinates.\n", + "oneOf": [ + { + "type": "integer", + "minimum": 1, + "description": "Maximum search radius around a central location in meters." + }, + { + "$ref": "#/components/schemas/aroundRadiusAll" + } + ], + "x-categories": [ + "Geo-Search" + ] + }, + "aroundPrecisionFromValue": { + "title": "range objects", + "type": "array", + "items": { + "title": "range", + "type": "object", + "description": "Range object with lower and upper values in meters to define custom ranges.", + "properties": { + "from": { + "type": "integer", + "description": "Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.", + "example": 20 + }, + "value": { + "type": "integer", + "description": "Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal." + } + } + } + }, + "aroundPrecision": { + "description": "Precision of a coordinate-based search in meters to group results with similar distances.\n\nThe Geo ranking criterion considers all matches within the same range of distances to be equal.\n", + "oneOf": [ + { + "type": "integer", + "default": 10, + "description": "Distance in meters to group results by similar distances.\n\nFor example, if you set `aroundPrecision` to 100, records wihin 100 meters to the central coordinate are considered to have the same distance,\nas are records between 100 and 199 meters.\n" + }, + { + "$ref": "#/components/schemas/aroundPrecisionFromValue" + } + ], + "x-categories": [ + "Geo-Search" + ] + }, + "insideBoundingBoxArray": { + "type": "array", + "items": { + "type": "array", + "minItems": 4, + "maxItems": 4, + "items": { + "type": "number", + "format": "double" + } + }, + "description": "Coordinates for a rectangular area in which to search.\n\nEach bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair:\n`[p1 lat, p1 long, p2 lat, p2 long]`.\nProvide multiple bounding boxes as nested arrays.\nFor more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).\n", + "example": [ + [ + 47.3165, + 4.9665, + 47.3424, + 5.0201 + ], + [ + 40.9234, + 2.1185, + 38.643, + 1.9916 + ] + ], + "x-categories": [ + "Geo-Search" + ] + }, + "insideBoundingBox": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/components/schemas/insideBoundingBoxArray" + } + ] + }, + "insidePolygon": { + "type": "array", + "items": { + "type": "array", + "minItems": 6, + "maxItems": 20000, + "items": { + "type": "number", + "format": "double" + } + }, + "description": "Coordinates of a polygon in which to search.\n\nPolygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude.\nProvide multiple polygons as nested arrays.\nFor more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).\nThis parameter is ignored if you also specify `insideBoundingBox`.\n", + "example": [ + [ + 47.3165, + 4.9665, + 47.3424, + 5.0201, + 47.32, + 4.9 + ], + [ + 40.9234, + 2.1185, + 38.643, + 1.9916, + 39.2587, + 2.0104 + ] + ], + "x-categories": [ + "Geo-Search" + ] + }, + "supportedLanguage": { + "type": "string", + "description": "ISO code for a supported language.", + "enum": [ + "af", + "ar", + "az", + "bg", + "bn", + "ca", + "cs", + "cy", + "da", + "de", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "ga", + "gl", + "he", + "hi", + "hu", + "hy", + "id", + "is", + "it", + "ja", + "ka", + "kk", + "ko", + "ku", + "ky", + "lt", + "lv", + "mi", + "mn", + "mr", + "ms", + "mt", + "nb", + "nl", + "no", + "ns", + "pl", + "ps", + "pt", + "pt-br", + "qu", + "ro", + "ru", + "sk", + "sq", + "sv", + "sw", + "ta", + "te", + "th", + "tl", + "tn", + "tr", + "tt", + "uk", + "ur", + "uz", + "zh" + ] + }, + "userToken": { + "type": "string", + "description": "Unique pseudonymous or anonymous user identifier.\n\nThis helps with analytics and click and conversion events.\nFor more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).\n", + "example": "test-user-123", + "x-categories": [ + "Personalization" + ] + }, + "params": { + "title": "Composition Search parameters as object", + "type": "object", + "additionalProperties": false, + "properties": { + "query": { + "$ref": "#/components/schemas/query" + }, + "filters": { + "$ref": "#/components/schemas/filters" + }, + "page": { + "$ref": "#/components/schemas/page" + }, + "getRankingInfo": { + "type": "boolean", + "description": "Whether the search response should include detailed ranking information." + }, + "relevancyStrictness": { + "type": "integer" + }, + "facetFilters": { + "$ref": "#/components/schemas/facetFilters" + }, + "optionalFilters": { + "$ref": "#/components/schemas/optionalFilters" + }, + "numericFilters": { + "$ref": "#/components/schemas/numericFilters" + }, + "hitsPerPage": { + "$ref": "#/components/schemas/hitsPerPage" + }, + "aroundLatLng": { + "$ref": "#/components/schemas/aroundLatLng" + }, + "aroundLatLngViaIP": { + "$ref": "#/components/schemas/aroundLatLngViaIP" + }, + "aroundRadius": { + "$ref": "#/components/schemas/aroundRadius" + }, + "aroundPrecision": { + "$ref": "#/components/schemas/aroundPrecision" + }, + "minimumAroundRadius": { + "type": "integer", + "description": "Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", + "minimum": 1, + "x-categories": [ + "Geo-Search" + ] + }, + "insideBoundingBox": { + "$ref": "#/components/schemas/insideBoundingBox" + }, + "insidePolygon": { + "$ref": "#/components/schemas/insidePolygon" + }, + "queryLanguages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + }, + "example": [ + "es" + ], + "description": "Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries.\n\nThis setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings.\nThis setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages.\nTo support this, you must place the CJK language **first**.\n\n**You should always specify a query language.**\nIf you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).\n", + "default": [], + "x-categories": [ + "Languages" + ] + }, + "naturalLanguages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + }, + "description": "ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches):\n\n- Sets `removeStopWords` and `ignorePlurals` to the list of provided languages.\n- Sets `removeWordsIfNoResults` to `allOptional`.\n- Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.\n", + "default": [], + "x-categories": [ + "Languages" + ] + }, + "enableRules": { + "type": "boolean", + "description": "Whether to enable rules.", + "default": true, + "x-categories": [ + "Rules" + ] + }, + "ruleContexts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Assigns a rule context to the search query.\n\n[Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.\n", + "default": [], + "example": [ + "mobile" + ], + "x-categories": [ + "Rules" + ] + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "clickAnalytics": { + "type": "boolean", + "description": "Whether to include a `queryID` attribute in the response.\n\nThe query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).\n", + "default": false, + "x-categories": [ + "Analytics" + ] + }, + "analytics": { + "type": "boolean", + "description": "Whether this search will be included in Analytics.", + "default": true, + "x-categories": [ + "Analytics" + ] + }, + "analyticsTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).", + "default": [], + "x-categories": [ + "Analytics" + ] + }, + "enableABTest": { + "type": "boolean", + "description": "Whether to enable A/B testing for this search.", + "default": true, + "x-categories": [ + "Advanced" + ] + }, + "enableReRanking": { + "type": "boolean", + "description": "Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).\n\nThis setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.\n", + "default": true, + "x-categories": [ + "Filtering" + ] + } + } + }, + "objectID": { + "type": "string", + "description": "Unique record identifier.", + "example": "test-record-123" + }, + "compositionRunSearchResponse": { + "type": "object", + "additionalProperties": true, + "properties": { + "objectID": { + "$ref": "#/components/schemas/objectID" + }, + "appliedRules": { + "type": "array", + "items": { + "title": "compositionRunAppliedRules", + "type": "object", + "properties": { + "objectID": { + "$ref": "#/components/schemas/objectID" + } + }, + "required": [ + "objectID" + ] + } + } + }, + "required": [ + "objectID" + ] + }, + "compositionsSearchResponse": { + "type": "object", + "additionalProperties": true, + "properties": { + "run": { + "type": "array", + "items": { + "$ref": "#/components/schemas/compositionRunSearchResponse" + } + } + }, + "required": [ + "run" + ] + }, + "compositionBaseSearchResponse": { + "type": "object", + "additionalProperties": true, + "required": [ + "processingTimeMS" + ], + "properties": { + "compositions": { + "$ref": "#/components/schemas/compositionsSearchResponse" + } + } + }, + "processingTimeMS": { + "type": "integer", + "description": "Time the server took to process the request, in milliseconds.", + "example": 20 + }, + "RedirectRuleIndexMetadata": { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "Source index for the redirect rule." + }, + "dest": { + "type": "string", + "description": "Destination index for the redirect rule." + }, + "reason": { + "type": "string", + "description": "Reason for the redirect rule." + }, + "succeed": { + "type": "boolean", + "description": "Redirect rule status." + }, + "data": { + "title": "redirectRuleIndexData", + "type": "object", + "description": "Redirect rule data.", + "required": [ + "ruleObjectID" + ], + "properties": { + "ruleObjectID": { + "type": "string" + } + } + } + }, + "required": [ + "data", + "succeed", + "reason", + "dest", + "source" + ] + }, + "order": { + "description": "Explicit order of facets or facet values.\n\nThis setting lets you always show specific facets or facet values at the top of the list.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "facets": { + "description": "Order of facet names.", + "type": "object", + "additionalProperties": false, + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + }, + "sortRemainingBy": { + "description": "Order of facet values that aren't explicitly positioned with the `order` setting.\n\n- `count`.\n Order remaining facet values by decreasing count.\n The count is the number of matching records containing this facet value.\n\n- `alpha`.\n Sort facet values alphabetically.\n\n- `hidden`.\n Don't show facet values that aren't explicitly positioned.\n", + "type": "string", + "enum": [ + "count", + "alpha", + "hidden" + ] + }, + "hide": { + "description": "Hide facet values.", + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "type": "object", + "additionalProperties": false, + "properties": { + "order": { + "$ref": "#/components/schemas/order" + }, + "sortRemainingBy": { + "$ref": "#/components/schemas/sortRemainingBy" + }, + "hide": { + "$ref": "#/components/schemas/hide" + } + } + }, + "values": { + "description": "Order of facet values. One object for each facet.", + "type": "object", + "additionalProperties": { + "x-additionalPropertiesName": "facet", + "$ref": "#/components/schemas/value" + } + }, + "facetOrdering": { + "description": "Order of facet names and facet values in your UI.", + "type": "object", + "additionalProperties": false, + "properties": { + "facets": { + "$ref": "#/components/schemas/facets" + }, + "values": { + "$ref": "#/components/schemas/values" + } + } + }, + "redirectURL": { + "description": "The redirect rule container.", + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string" + } + } + }, + "bannerImageUrl": { + "description": "URL for an image to show inside a banner.", + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string" + } + } + }, + "bannerImage": { + "description": "Image to show inside a banner.", + "type": "object", + "additionalProperties": false, + "properties": { + "urls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/bannerImageUrl" + } + }, + "title": { + "type": "string" + } + } + }, + "bannerLink": { + "description": "Link for a banner defined in the Merchandising Studio.", + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string" + } + } + }, + "banner": { + "description": "Banner with image and link to redirect users.", + "type": "object", + "additionalProperties": false, + "properties": { + "image": { + "$ref": "#/components/schemas/bannerImage" + }, + "link": { + "$ref": "#/components/schemas/bannerLink" + } + } + }, + "banners": { + "description": "Banners defined in the Merchandising Studio for a given search.", + "type": "array", + "items": { + "$ref": "#/components/schemas/banner" + } + }, + "widgets": { + "description": "Widgets returned from any rules that are applied to the current search.", + "type": "object", + "additionalProperties": false, + "properties": { + "banners": { + "$ref": "#/components/schemas/banners" + } + } + }, + "renderingContent": { + "description": "Extra data that can be used in the search UI.\n\nYou can use this to control aspects of your search UI, such as the order of facet names and values\nwithout changing your frontend code.\n", + "type": "object", + "additionalProperties": false, + "properties": { + "facetOrdering": { + "$ref": "#/components/schemas/facetOrdering" + }, + "redirect": { + "$ref": "#/components/schemas/redirectURL" + }, + "widgets": { + "$ref": "#/components/schemas/widgets" + } + }, + "x-categories": [ + "Advanced" + ] + }, + "userData": { + "example": { + "settingID": "f2a7b51e3503acc6a39b3784ffb84300", + "pluginVersion": "1.6.0" + }, + "description": "An object with custom data.\n\nYou can store up to 32kB as custom data.\n", + "default": {}, + "x-categories": [ + "Advanced" + ] + }, + "baseSearchResponse": { + "type": "object", + "additionalProperties": true, + "required": [ + "processingTimeMS" + ], + "properties": { + "abTestID": { + "type": "integer", + "description": "A/B test ID. This is only included in the response for indices that are part of an A/B test." + }, + "abTestVariantID": { + "type": "integer", + "minimum": 1, + "description": "Variant ID. This is only included in the response for indices that are part of an A/B test." + }, + "aroundLatLng": { + "type": "string", + "description": "Computed geographical location.", + "example": "40.71,-74.01", + "pattern": "^(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)$" + }, + "automaticRadius": { + "type": "string", + "description": "Distance from a central coordinate provided by `aroundLatLng`." + }, + "exhaustive": { + "title": "exhaustive", + "type": "object", + "description": "Whether certain properties of the search response are calculated exhaustive (exact) or approximated.", + "properties": { + "facetsCount": { + "type": "boolean", + "title": "facetsCount", + "description": "Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-)." + }, + "facetValues": { + "type": "boolean", + "title": "facetValues", + "description": "The value is `false` if not all facet values are retrieved." + }, + "nbHits": { + "type": "boolean", + "title": "nbHits", + "description": "Whether the `nbHits` is exhaustive (`true`) or approximate (`false`). When the query takes more than 50ms to be processed, the engine makes an approximation. This can happen when using complex filters on millions of records, when typo-tolerance was not exhaustive, or when enough hits have been retrieved (for example, after the engine finds 10,000 exact matches). `nbHits` is reported as non-exhaustive whenever an approximation is made, even if the approximation didn’t, in the end, impact the exhaustivity of the query." + }, + "rulesMatch": { + "type": "boolean", + "title": "rulesMatch", + "description": "Rules matching exhaustivity. The value is `false` if rules were enable for this query, and could not be fully processed due a timeout. This is generally caused by the number of alternatives (such as typos) which is too large." + }, + "typo": { + "type": "boolean", + "title": "typo", + "description": "Whether the typo search was exhaustive (`true`) or approximate (`false`). An approximation is done when the typo search query part takes more than 10% of the query budget (ie. 5ms by default) to be processed (this can happen when a lot of typo alternatives exist for the query). This field will not be included when typo-tolerance is entirely disabled." + } + } + }, + "appliedRules": { + "description": "Rules applied to the query.", + "title": "appliedRules", + "type": "array", + "items": { + "type": "object" + } + }, + "exhaustiveFacetsCount": { + "type": "boolean", + "description": "See the `facetsCount` field of the `exhaustive` object in the response.", + "deprecated": true + }, + "exhaustiveNbHits": { + "type": "boolean", + "description": "See the `nbHits` field of the `exhaustive` object in the response.", + "deprecated": true + }, + "exhaustiveTypo": { + "type": "boolean", + "description": "See the `typo` field of the `exhaustive` object in the response.", + "deprecated": true + }, + "facets": { + "title": "facets", + "type": "object", + "additionalProperties": { + "x-additionalPropertiesName": "facet", + "type": "object", + "additionalProperties": { + "x-additionalPropertiesName": "facet count", + "type": "integer" + } + }, + "description": "Facet counts.", + "example": { + "category": { + "food": 1, + "tech": 42 + } + } + }, + "facets_stats": { + "type": "object", + "description": "Statistics for numerical facets.", + "additionalProperties": { + "title": "facetStats", + "type": "object", + "properties": { + "min": { + "type": "number", + "format": "double", + "description": "Minimum value in the results." + }, + "max": { + "type": "number", + "format": "double", + "description": "Maximum value in the results." + }, + "avg": { + "type": "number", + "format": "double", + "description": "Average facet value in the results." + }, + "sum": { + "type": "number", + "format": "double", + "description": "Sum of all values in the results." + } + } + } + }, + "index": { + "type": "string", + "example": "indexName", + "description": "Index name used for the query." + }, + "indexUsed": { + "type": "string", + "description": "Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query.", + "example": "indexNameAlt" + }, + "message": { + "type": "string", + "description": "Warnings about the query." + }, + "nbSortedHits": { + "type": "integer", + "description": "Number of hits selected and sorted by the relevant sort algorithm.", + "example": 20 + }, + "parsedQuery": { + "type": "string", + "description": "Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched.", + "example": "george clo" + }, + "processingTimeMS": { + "$ref": "#/components/schemas/processingTimeMS" + }, + "processingTimingsMS": { + "type": "object", + "description": "Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues." + }, + "queryAfterRemoval": { + "type": "string", + "description": "Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set." + }, + "redirect": { + "title": "redirect", + "type": "object", + "description": "[Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only.\n", + "properties": { + "index": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RedirectRuleIndexMetadata" + } + } + } + }, + "renderingContent": { + "$ref": "#/components/schemas/renderingContent" + }, + "serverTimeMS": { + "type": "integer", + "description": "Time the server took to process the request, in milliseconds.", + "example": 20 + }, + "serverUsed": { + "type": "string", + "description": "Host name of the server that processed the request.", + "example": "c2-uk-3.algolia.net" + }, + "userData": { + "$ref": "#/components/schemas/userData" + }, + "queryID": { + "type": "string", + "description": "Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).", + "example": "a00dbc80a8d13c4565a442e7e2dca80a" + }, + "_automaticInsights": { + "type": "boolean", + "description": "Whether automatic events collection is enabled for the application." + } + } + }, + "nbHits": { + "type": "integer", + "description": "Number of results (hits).", + "example": 20 + }, + "nbPages": { + "type": "integer", + "description": "Number of pages of results.", + "example": 1 + }, + "SearchPagination": { + "type": "object", + "additionalProperties": false, + "properties": { + "page": { + "$ref": "#/components/schemas/page" + }, + "nbHits": { + "$ref": "#/components/schemas/nbHits" + }, + "nbPages": { + "$ref": "#/components/schemas/nbPages" + }, + "hitsPerPage": { + "$ref": "#/components/schemas/hitsPerPage" + } + }, + "required": [ + "page", + "nbHits", + "nbPages", + "hitsPerPage" + ] + }, + "highlightedValue": { + "type": "string", + "description": "Highlighted attribute value, including HTML tags.", + "example": "George Clooney" + }, + "matchLevel": { + "type": "string", + "description": "Whether the whole query string matches or only a part.", + "enum": [ + "none", + "partial", + "full" + ] + }, + "highlightResultOption": { + "type": "object", + "description": "Surround words that match the query with HTML tags for highlighting.", + "additionalProperties": false, + "properties": { + "value": { + "$ref": "#/components/schemas/highlightedValue" + }, + "matchLevel": { + "$ref": "#/components/schemas/matchLevel" + }, + "matchedWords": { + "type": "array", + "description": "List of matched words from the search query.", + "example": [ + "action" + ], + "items": { + "type": "string" + } + }, + "fullyHighlighted": { + "type": "boolean", + "description": "Whether the entire attribute value is highlighted." + } + }, + "required": [ + "value", + "matchLevel", + "matchedWords" + ], + "x-discriminator-fields": [ + "matchLevel", + "matchedWords" + ] + }, + "highlightResultMap": { + "type": "object", + "description": "Surround words that match the query with HTML tags for highlighting.", + "x-is-free-form": false, + "additionalProperties": { + "x-additionalPropertiesName": "attribute", + "$ref": "#/components/schemas/highlightResult" + } + }, + "highlightResult": { + "oneOf": [ + { + "$ref": "#/components/schemas/highlightResultOption" + }, + { + "$ref": "#/components/schemas/highlightResultMap" + }, + { + "$ref": "#/components/schemas/highlightResultArray" + } + ] + }, + "highlightResultArray": { + "type": "array", + "description": "Surround words that match the query with HTML tags for highlighting.", + "items": { + "$ref": "#/components/schemas/highlightResult" + } + }, + "snippetResultOption": { + "type": "object", + "description": "Snippets that show the context around a matching search query.", + "additionalProperties": false, + "properties": { + "value": { + "$ref": "#/components/schemas/highlightedValue" + }, + "matchLevel": { + "$ref": "#/components/schemas/matchLevel" + } + }, + "required": [ + "value", + "matchLevel" + ], + "x-discriminator-fields": [ + "matchLevel" + ] + }, + "snippetResultMap": { + "type": "object", + "description": "Snippets that show the context around a matching search query.", + "x-is-free-form": false, + "additionalProperties": { + "x-additionalPropertiesName": "attribute", + "$ref": "#/components/schemas/snippetResult" + } + }, + "snippetResult": { + "oneOf": [ + { + "$ref": "#/components/schemas/snippetResultOption" + }, + { + "$ref": "#/components/schemas/snippetResultMap" + }, + { + "$ref": "#/components/schemas/snippetResultArray" + } + ] + }, + "snippetResultArray": { + "type": "array", + "description": "Snippets that show the context around a matching search query.", + "items": { + "$ref": "#/components/schemas/snippetResult" + } + }, + "matchedGeoLocation": { + "type": "object", + "properties": { + "lat": { + "type": "number", + "format": "double", + "description": "Latitude of the matched location." + }, + "lng": { + "type": "number", + "format": "double", + "description": "Longitude of the matched location." + }, + "distance": { + "type": "integer", + "description": "Distance between the matched location and the search location (in meters)." + } + } + }, + "personalization": { + "type": "object", + "properties": { + "filtersScore": { + "type": "integer", + "description": "The score of the filters." + }, + "rankingScore": { + "type": "integer", + "description": "The score of the ranking." + }, + "score": { + "type": "integer", + "description": "The score of the event." + } + } + }, + "rankingInfo": { + "type": "object", + "description": "Object with detailed information about the record's ranking.", + "additionalProperties": false, + "properties": { + "filters": { + "type": "integer", + "minimum": 0, + "description": "Whether a filter matched the query." + }, + "firstMatchedWord": { + "type": "integer", + "minimum": 0, + "description": "Position of the first matched word in the best matching attribute of the record." + }, + "geoDistance": { + "type": "integer", + "minimum": 0, + "description": "Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters)." + }, + "geoPrecision": { + "type": "integer", + "minimum": 1, + "description": "Precision used when computing the geo distance, in meters." + }, + "matchedGeoLocation": { + "$ref": "#/components/schemas/matchedGeoLocation" + }, + "personalization": { + "$ref": "#/components/schemas/personalization" + }, + "nbExactWords": { + "type": "integer", + "minimum": 0, + "description": "Number of exactly matched words." + }, + "nbTypos": { + "type": "integer", + "minimum": 0, + "description": "Number of typos encountered when matching the record." + }, + "promoted": { + "type": "boolean", + "description": "Whether the record was promoted by a rule." + }, + "proximityDistance": { + "type": "integer", + "minimum": 0, + "description": "Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0." + }, + "userScore": { + "type": "integer", + "description": "Overall ranking of the record, expressed as a single integer. This attribute is internal." + }, + "words": { + "type": "integer", + "minimum": 1, + "description": "Number of matched words." + }, + "promotedByReRanking": { + "type": "boolean", + "description": "Whether the record is re-ranked." + } + }, + "required": [ + "nbTypos", + "firstMatchedWord", + "geoDistance", + "nbExactWords", + "userScore" + ] + }, + "compositionRankingInfo": { + "type": "object", + "additionalProperties": false, + "properties": { + "composed": { + "title": "composedRankingInfo", + "type": "object", + "additionalProperties": { + "title": "compositionIdRankingInfo", + "x-additionalPropertiesName": "composition-id", + "type": "object", + "properties": { + "index": { + "type": "string" + }, + "injectedItemKey": { + "type": "string" + } + }, + "required": [ + "index", + "injectedItemKey" + ] + } + } + } + }, + "Hit_rankingInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/rankingInfo" + }, + { + "$ref": "#/components/schemas/compositionRankingInfo" + } + ] + }, + "distinctSeqID": { + "type": "integer" + }, + "hit": { + "type": "object", + "description": "Search result.\n\nA hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.\n", + "x-is-generic": true, + "additionalProperties": true, + "required": [ + "objectID" + ], + "properties": { + "objectID": { + "$ref": "#/components/schemas/objectID" + }, + "_highlightResult": { + "$ref": "#/components/schemas/highlightResultMap" + }, + "_snippetResult": { + "$ref": "#/components/schemas/snippetResultMap" + }, + "_rankingInfo": { + "$ref": "#/components/schemas/Hit_rankingInfo" + }, + "_distinctSeqID": { + "$ref": "#/components/schemas/distinctSeqID" + } + } + }, + "searchHits": { + "type": "object", + "additionalProperties": true, + "properties": { + "hits": { + "type": "array", + "description": "Search results (hits).\n\nHits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.\n", + "items": { + "$ref": "#/components/schemas/hit" + } + }, + "query": { + "$ref": "#/components/schemas/query" + }, + "params": { + "type": "string", + "description": "URL-encoded string of all search parameters.", + "example": "query=a&hitsPerPage=20" + } + }, + "required": [ + "hits", + "query", + "params" + ] + }, + "resultsInjectedItemInfoResponse": { + "type": "object", + "additionalProperties": true, + "properties": { + "key": { + "type": "string" + }, + "appliedRules": { + "type": "array", + "items": { + "title": "resultsInjectedItemAppliedRulesInfoResponse", + "type": "object", + "properties": { + "objectID": { + "$ref": "#/components/schemas/objectID" + } + }, + "required": [ + "objectID" + ] + } + } + }, + "required": [ + "key" + ] + }, + "resultsCompositionsResponse": { + "type": "object", + "additionalProperties": true, + "properties": { + "compositions": { + "title": "resultsCompositionsInfoResponse", + "type": "object", + "additionalProperties": { + "title": "resultsCompositionInfoResponse", + "x-additionalPropertiesName": "composition-id", + "type": "object", + "properties": { + "injectedItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/resultsInjectedItemInfoResponse" + } + } + }, + "required": [ + "injectedItems" + ] + } + } + }, + "required": [ + "compositions" + ] + }, + "searchResultsItem": { + "allOf": [ + { + "$ref": "#/components/schemas/baseSearchResponse" + }, + { + "$ref": "#/components/schemas/SearchPagination" + }, + { + "$ref": "#/components/schemas/searchHits" + }, + { + "$ref": "#/components/schemas/resultsCompositionsResponse" + } + ] + }, + "searchResults": { + "type": "object", + "additionalProperties": false, + "properties": { + "results": { + "type": "array", + "description": "Search results.", + "items": { + "$ref": "#/components/schemas/searchResultsItem" + } + } + }, + "required": [ + "results" + ] + }, + "searchResponse": { + "additionalProperties": true, + "allOf": [ + { + "$ref": "#/components/schemas/compositionBaseSearchResponse" + }, + { + "$ref": "#/components/schemas/searchResults" + } + ] + }, + "ErrorBase": { + "description": "Error.", + "type": "object", + "x-keep-model": true, + "additionalProperties": true, + "properties": { + "message": { + "type": "string", + "example": "Invalid Application-Id or API-Key" + } + } + }, + "maxFacetHits": { + "type": "integer", + "description": "Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + "maximum": 100, + "default": 10, + "x-categories": [ + "Advanced" + ] + }, + "searchForFacetValuesResults": { + "type": "object", + "additionalProperties": false, + "required": [ + "facetHits", + "exhaustiveFacetsCount", + "indexName" + ], + "x-discriminator-fields": [ + "facetHits" + ], + "properties": { + "indexName": { + "type": "string" + }, + "facetHits": { + "type": "array", + "description": "Matching facet values.", + "items": { + "title": "facetHits", + "type": "object", + "additionalProperties": false, + "required": [ + "value", + "highlighted", + "count" + ], + "properties": { + "value": { + "description": "Facet value.", + "example": "Mobile phone", + "type": "string" + }, + "highlighted": { + "$ref": "#/components/schemas/highlightedValue" + }, + "count": { + "description": "Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).", + "type": "integer" + } + } + } + }, + "exhaustiveFacetsCount": { + "type": "boolean", + "description": "Whether the facet count is exhaustive (true) or approximate (false).\nFor more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).\n" + }, + "processingTimeMS": { + "$ref": "#/components/schemas/processingTimeMS" + } + } + }, + "searchForFacetValuesResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "results": { + "type": "array", + "description": "Search for facet values results.", + "items": { + "$ref": "#/components/schemas/searchForFacetValuesResults" + } + } + } + } + }, + "parameters": { + "compositionID": { + "in": "path", + "name": "compositionID", + "description": "Unique Composition ObjectID.", + "required": true, + "schema": { + "$ref": "#/components/schemas/compositionObjectID" + } + } + }, + "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" + } + } + } + } + } + }, + "x-tagGroups": [ + { + "name": "Compositions", + "tags": [ + "Search" + ] + } + ] +} \ No newline at end of file diff --git a/src/data/crawler.json b/src/data/crawler.json new file mode 100644 index 0000000..22f44de --- /dev/null +++ b/src/data/crawler.json @@ -0,0 +1,3271 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Crawler API", + "description": "The Crawler API lets you manage and run your crawlers.\n\n## Base URL\n\nThe base URL for making requests to the Crawler API is:\n\n- `https://crawler.algolia.com/api`\n\n**All requests must use HTTPS.**\n\n## Availability and authentication\n\nTo authenticate your API requests, use the **basic authentication** header:\n\n- `Authorization: Basic `\n\nWhere `` is a base64-encoded string `:`.\n\n- ``. The Crawler user ID.\n- ``. The Crawler API key.\n\nYou can find both on the [Crawler settings](https://dashboard.algolia.com/crawler/settings) page in the Algolia dashboard.\nThe Crawler credentials are different from your regular Algolia credentials.\n\n## Request format\n\nRequest bodies must be JSON objects.\n\n## Parameters\n\nParameters are passed as query parameters for GET requests,\nand in the request body for POST and PATCH requests.\n\nQuery parameters must be [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding).\nNon-ASCII characters must be UTF-8 encoded.\n\n## Response status and errors\n\nThe Crawler API returns JSON responses.\nSince JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API response.\n\nSuccessful responses return a `2xx` status. Client errors return a `4xx` status.\nServer errors are indicated by a `5xx` status.\nError responses have a `message` property with more information.\n\n## Version\n\nThe current version of the Crawler API is version 1, as indicated by the `/1/` in each endpoint's URL.\n", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://crawler.algolia.com/api", + "description": "The URL of the Crawler API." + } + ], + "security": [ + { + "BasicAuth": [] + } + ], + "tags": [ + { + "name": "actions", + "x-displayName": "State", + "description": "Change the state of crawlers, such as pausing crawl schedules or testing the crawler with specific URLs.\n" + }, + { + "name": "config", + "x-displayName": "Configuration", + "description": "In the Crawler configuration, you specify which URLs to crawl, when to crawl, how to extract records from the crawl, and where to index the extracted records.\n\nThe configuration is versioned, so you can always restore a previous version.\n\nIt's easiest to make configuration changes on the [Crawler page](https://dashboard.algolia.com/crawler) in the Algolia dashboard.\nThe editor has autocomplete and built-in validation so you can try your configuration changes before committing them.\n" + }, + { + "name": "crawlers", + "x-displayName": "Manage", + "description": "A crawler is an object with a name and a [configuration](#tag/config).\nUse these endpoints to create, rename, and delete crawlers.\n" + }, + { + "name": "domains", + "x-displayName": "Domains", + "description": "List registered domains." + }, + { + "name": "tasks", + "x-displayName": "Tasks", + "description": "Task operations." + } + ], + "paths": { + "/1/crawlers": { + "get": { + "operationId": "listCrawlers", + "summary": "List crawlers", + "description": "Lists all your crawlers.", + "tags": [ + "crawlers" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ItemsPerPage" + }, + { + "$ref": "#/components/parameters/Page" + }, + { + "$ref": "#/components/parameters/Name" + }, + { + "$ref": "#/components/parameters/AppID" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/crawlersResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "description": "Invalid credentials." + }, + "404": { + "description": "The call does not have results for this combinaison of query params." + } + } + }, + "post": { + "operationId": "createCrawler", + "summary": "Create a crawler", + "description": "Creates a new crawler with the provided configuration.", + "tags": [ + "crawlers" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "crawlerCreate", + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/CrawlerName" + }, + "config": { + "$ref": "#/components/schemas/Configuration" + } + }, + "required": [ + "name", + "config" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "crawlerCreateResponse", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/CrawlerID" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "description": "The user doesn't have enough rights to create a Crawler." + } + } + } + }, + "/1/crawlers/{id}": { + "get": { + "operationId": "getCrawler", + "summary": "Retrieve crawler details", + "description": "Retrieves details about the specified crawler, optionally with its configuration.\n", + "tags": [ + "crawlers" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + }, + { + "in": "query", + "name": "withConfig", + "schema": { + "type": "boolean" + }, + "description": "Whether the response should include the crawler's configuration." + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCrawlerResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/NoRightsOnCrawler" + } + } + }, + "patch": { + "operationId": "patchCrawler", + "summary": "Change crawler name", + "description": "Change the crawler's name.\n\nWhile you _could_ use this endpoint to replace the crawler configuration,\nyou should [update it](#tag/config/operation/patchConfig) instead since cnfiguration changes made here aren't [versioned](#tag/config/operation/listConfigVersions).\n\nIf you replace the configuration, you must provide the full configuration,\nincluding any settings you want to keep.\n", + "tags": [ + "crawlers" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "patchCrawler", + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/CrawlerName" + }, + "config": { + "$ref": "#/components/schemas/Configuration" + } + } + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/ActionAcknowledged" + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/NoRightsOnCrawler" + } + } + }, + "delete": { + "operationId": "deleteCrawler", + "summary": "Delete a crawler", + "description": "Delete the specified crawler.", + "tags": [ + "crawlers" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ActionAcknowledged" + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/NoRightsOnCrawler" + } + } + } + }, + "/1/crawlers/{id}/run": { + "post": { + "operationId": "runCrawler", + "summary": "Unpause a crawler", + "description": "Unpauses the specified crawler.\nPreviously ongoing crawls will be resumed.\nOtherwise, the crawler waits for its next scheduled run.\n", + "tags": [ + "actions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ActionAcknowledged" + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/NoRightsOnCrawler" + } + } + } + }, + "/1/crawlers/{id}/pause": { + "post": { + "operationId": "pauseCrawler", + "summary": "Pause a crawler", + "description": "Pauses the specified crawler.", + "tags": [ + "actions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ActionAcknowledged" + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/NoRightsOnCrawler" + } + } + } + }, + "/1/crawlers/{id}/reindex": { + "post": { + "operationId": "startReindex", + "summary": "Start a crawl", + "description": "Starts or resumes a crawl.", + "tags": [ + "actions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ActionAcknowledged" + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/NoRightsOnCrawler" + } + } + } + }, + "/1/crawlers/{id}/test": { + "post": { + "operationId": "testUrl", + "summary": "Test crawl a URL", + "description": "Tests a URL with the crawler's configuration and shows the extracted records.\n\nYou can test configuration changes by overriding specific parts before updating the full configuration.\n", + "tags": [ + "actions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "testUrl", + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to test.", + "example": "https://www.algolia.com/blog" + }, + "config": { + "$ref": "#/components/schemas/PartialConfig" + } + }, + "required": [ + "url" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "urlTest", + "type": "object", + "properties": { + "startDate": { + "type": "string", + "description": "Date and time when the test crawl started, in RFC 3339 format.", + "example": "2024-04-02T15:34:29Z" + }, + "endDate": { + "type": "string", + "description": "Date and time when the test crawl finished, in RFC 3339 format.", + "example": "2024-04-02T15:34:29Z" + }, + "logs": { + "type": "array", + "description": "Logs from the record extraction.", + "items": { + "type": "array", + "description": "Parameters associated with each log.", + "items": { + "type": "string", + "example": "Processing url 'https://www.algolia.com/blog'" + } + } + }, + "records": { + "type": "array", + "description": "Extracted records from the URL.", + "items": { + "title": "extractedRecords", + "type": "object", + "properties": { + "indexName": { + "type": "string", + "description": "Name of the index where this record will be stored.", + "example": "testIndex" + }, + "records": { + "type": "array", + "description": "Extracted records.", + "items": { + "type": "object", + "description": "Algolia record.", + "example": { + "objectID": "https://www.algolia.com/blog", + "numberOfLinks": 2 + } + } + }, + "recordsPerExtractor": { + "type": "array", + "description": "Partial records generated by each record extractor.", + "items": { + "title": "recordPerExtractor", + "type": "object", + "properties": { + "index": { + "type": "number", + "description": "Index of the extractor.", + "minimum": 0 + }, + "type": { + "type": "string", + "description": "Extractor type." + }, + "records": { + "type": "array", + "description": "Extracted records.", + "items": { + "type": "object" + } + } + } + }, + "example": [ + { + "index": 0, + "type": "custom", + "records": [ + { + "objectID": "https://www.algolia.com/blog" + } + ] + } + ] + } + } + } + }, + "links": { + "type": "array", + "description": "Links found on the page, which match the configuration and would be processed.\n", + "items": { + "type": "string" + }, + "example": [ + "https://blog.algolia.com/challenging-migration-heroku-google-kubernetes-engine/", + "https://blog.algolia.com/tale-two-engines-algolia-unity/" + ] + }, + "externalData": { + "type": "object", + "description": "External data associated with the tested URL.\n\nExternal data is refreshed automatically at the beginning of the crawl.\n", + "example": { + "externalData1": { + "data1": "val1", + "data2": "val2" + }, + "externalData2": { + "data1": "val1", + "data2": "val2" + } + } + }, + "error": { + "title": "urlTestError", + "type": "object", + "description": "An error.", + "properties": { + "code": { + "type": "string", + "example": "http_internal_server_error" + }, + "message": { + "type": "string", + "example": "HTTP Internal Server Error (500)" + } + }, + "example": {} + } + }, + "required": [ + "startDate", + "endDate", + "logs", + "records", + "links" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/NoRightsOnCrawler" + } + } + } + }, + "/1/crawlers/{id}/urls/crawl": { + "post": { + "operationId": "crawlUrls", + "summary": "Crawl URLs", + "description": "Crawls the specified URLs, extracts records from them, and adds them to the index.\nIf a crawl is currently running (the crawler's `reindexing` property is `true`),\nthe records are added to a temporary index.\n", + "tags": [ + "actions" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "crawlUrls", + "type": "object", + "properties": { + "urls": { + "type": "array", + "description": "URLs to crawl.", + "items": { + "type": "string" + }, + "example": [ + "https://www.algolia.com/products/crawler/" + ] + }, + "save": { + "type": "boolean", + "description": "Whether the specified URLs should be added to the `extraURLs` property of the crawler configuration.\nIf unspecified, the URLs are added to the `extraUrls` field only if they haven't been indexed during the last reindex.\n" + } + }, + "required": [ + "urls" + ] + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/ActionAcknowledged" + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/NoRightsOnCrawler" + } + } + } + }, + "/1/crawlers/{id}/stats/urls": { + "get": { + "operationId": "getStats", + "summary": "Retrieve crawler stats", + "description": "Retrieves information about the number of crawled, skipped, and failed URLs.", + "tags": [ + "crawlers" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "crawlerStats", + "type": "object", + "properties": { + "count": { + "type": "integer", + "minimum": 0, + "description": "Total number of crawled URLs." + }, + "data": { + "type": "array", + "default": [], + "items": { + "$ref": "#/components/schemas/UrlsCrawledGroup" + } + } + }, + "required": [ + "count", + "data" + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/NoRightsOnCrawler" + } + } + } + }, + "/1/crawlers/{id}/config": { + "patch": { + "operationId": "patchConfig", + "summary": "Update crawler configuration", + "description": "Updates the configuration of the specified crawler.\nEvery time you update the configuration, a new version is created.\n", + "tags": [ + "config" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PartialConfig" + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/ActionAcknowledged" + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/NoRightsOnCrawler" + } + } + } + }, + "/1/crawlers/{id}/config/versions": { + "get": { + "operationId": "listConfigVersions", + "summary": "List configuration versions", + "description": "Lists previous versions of the specified crawler's configuration, including who authored the change.\nEvery time you update a crawler's [configuration](#tag/config/operation/patchConfig),\na new version is added.\n", + "tags": [ + "config" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + }, + { + "$ref": "#/components/parameters/ItemsPerPage" + }, + { + "$ref": "#/components/parameters/Page" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/crawlerConfigVersionsResponse" + } + } + } + }, + "404": { + "description": "Not found." + } + } + } + }, + "/1/crawlers/{id}/config/versions/{version}": { + "get": { + "operationId": "getConfigVersion", + "summary": "Retrieve a configuration version", + "description": "Retrieves the specified version of the crawler configuration.\n\nYou can use this to restore a previous version of the configuration.\n", + "tags": [ + "config" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + }, + { + "$ref": "#/components/parameters/CrawlerVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "configVersion", + "type": "object", + "properties": { + "version": { + "$ref": "#/components/schemas/version" + }, + "config": { + "$ref": "#/components/schemas/Configuration" + }, + "createdAt": { + "$ref": "#/components/schemas/createdAt" + }, + "authorId": { + "$ref": "#/components/schemas/authorId" + } + }, + "required": [ + "version", + "config", + "createdAt", + "authorId" + ] + } + } + } + }, + "404": { + "description": "Not found." + } + } + } + }, + "/1/crawlers/{id}/tasks/{taskID}": { + "get": { + "operationId": "getTaskStatus", + "summary": "Retrieve task status", + "description": "Retrieves the status of the specified tasks, whether they're pending or completed.", + "tags": [ + "tasks" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + }, + { + "$ref": "#/components/parameters/TaskIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "taskStatus", + "type": "object", + "properties": { + "pending": { + "type": "boolean", + "description": "Whether the task is pending." + } + }, + "required": [ + "pending" + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/NoRightsOnCrawler" + } + } + } + }, + "/1/crawlers/{id}/tasks/{taskID}/cancel": { + "post": { + "operationId": "cancelBlockingAction", + "summary": "Cancel a blocking task", + "description": "Cancels a blocking task.\n\nTasks that ran into an error will block your crawler's schedule.\nTo unblock the crawler, cancel the blocking task.\n", + "tags": [ + "tasks" + ], + "parameters": [ + { + "$ref": "#/components/parameters/CrawlerIdParameter" + }, + { + "$ref": "#/components/parameters/TaskIdParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/NoRightsOnCrawler" + } + } + } + }, + "/1/domains": { + "get": { + "operationId": "listDomains", + "summary": "List registered domains", + "description": "Lists registered domains.\n\nCrawlers will only run if the URLs match any of the registered domains.\n", + "tags": [ + "domains" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ItemsPerPage" + }, + { + "$ref": "#/components/parameters/Page" + }, + { + "$ref": "#/components/parameters/AppID" + } + ], + "responses": { + "200": { + "description": "Domains", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/domainsResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/MissingAuthorization" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + } + } + } + } + }, + "components": { + "securitySchemes": { + "BasicAuth": { + "type": "http", + "scheme": "basic" + } + }, + "schemas": { + "itemsPerPage": { + "type": "integer", + "description": "Number of items per page of the paginated API response.", + "minimum": 1, + "maximum": 100, + "default": 20 + }, + "page": { + "type": "integer", + "description": "Current page of the paginated API response.", + "minimum": 1, + "maximum": 100, + "default": 1 + }, + "CrawlerName": { + "type": "string", + "maxLength": 64, + "description": "Name of the crawler.", + "example": "test-crawler" + }, + "applicationID": { + "type": "string", + "description": "Algolia application ID where the crawler creates and updates indices.\n" + }, + "total": { + "type": "integer", + "description": "Total number of retrievable items.", + "example": 100 + }, + "Pagination": { + "type": "object", + "description": "Pagination information.", + "properties": { + "itemsPerPage": { + "$ref": "#/components/schemas/itemsPerPage" + }, + "page": { + "$ref": "#/components/schemas/page" + }, + "total": { + "$ref": "#/components/schemas/total" + } + } + }, + "CrawlerID": { + "type": "string", + "description": "Universally unique identifier (UUID) of the crawler.", + "example": "e0f6db8a-24f5-4092-83a4-1b2c6cb6d809" + }, + "crawlersResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/Pagination" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Crawlers.", + "items": { + "title": "crawlerResponse", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/CrawlerID" + }, + "name": { + "$ref": "#/components/schemas/CrawlerName" + } + } + } + } + } + } + ] + }, + "cache": { + "type": "object", + "description": "Whether the crawler should cache crawled pages.\n\nFor more information, see [Partial crawls with caching](https://www.algolia.com/doc/tools/crawler/getting-started/crawler-configuration/#partial-crawls-with-caching).\n", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "Whether the crawler cache is active." + } + } + }, + "urlPattern": { + "type": "string", + "description": "Use [micromatch](https://github.com/micromatch/micromatch) for negation, wildcards, and more.\n", + "example": "https://www.algolia.com/**" + }, + "fileTypes": { + "type": "string", + "description": "For more information, see [Extract data from non-HTML documents](https://www.algolia.com/doc/tools/crawler/extracting-data/non-html-documents/).\n", + "enum": [ + "doc", + "email", + "html", + "odp", + "ods", + "odt", + "pdf", + "ppt", + "xls" + ] + }, + "hostnameAliases": { + "type": "object", + "example": { + "dev.example.com": "example.com" + }, + "description": "Key-value pairs to replace matching hostnames found in a sitemap,\non a page, in canonical links, or redirects.\n\n\nDuring a crawl, this action maps one hostname to another whenever the crawler encounters specific URLs.\nThis helps with links to staging environments (like `dev.example.com`) or external hosting services (such as YouTube).\n\n\nFor example, with this `hostnameAliases` mapping:\n\n {\n hostnameAliases: {\n 'dev.example.com': 'example.com'\n }\n }\n\n1. The crawler encounters `https://dev.example.com/solutions/voice-search/`.\n\n1. `hostnameAliases` transforms the URL to `https://example.com/solutions/voice-search/`.\n\n1. The crawler follows the transformed URL (not the original).\n\n\n**`hostnameAliases` only changes URLs, not page text. In the preceding example, if the extracted text contains the string `dev.example.com`, it remains unchanged.**\n\n\nThe crawler can discover URLs in places such as:\n\n\n- Crawled pages\n\n- Sitemaps\n\n- [Canonical URLs](https://www.algolia.com/doc/tools/crawler/getting-started/crawler-configuration/#canonical-urls-and-crawler-behavior)\n\n- Redirects. \n\n\nHowever, `hostnameAliases` doesn't transform URLs you explicitly set in the `startUrls` or `sitemaps` parameters,\nnor does it affect the `pathsToMatch` action or other configuration elements.\n", + "additionalProperties": { + "type": "string", + "description": "Hostname that should be added in the records.", + "x-additionalPropertiesName": "hostname" + } + }, + "pathAliases": { + "type": "object", + "example": { + "example.com": { + "/foo": "/bar" + } + }, + "description": "Key-value pairs to replace matching paths with new values.\n\nIt doesn't replace:\n\n- URLs in the `startUrls`, `sitemaps`, `pathsToMatch`, and other settings.\n- Paths found in extracted text.\n\nThe crawl continues from the _transformed_ URLs.\n\n\nFor example, if you create a mapping for `{ \"dev.example.com\": { '/foo': '/bar' } }` and the crawler encounters `https://dev.example.com/foo/hello/`,\nit’s transformed to `https://dev.example.com/bar/hello/`.\n\n\n> Compare with the `hostnameAliases` action.\n", + "additionalProperties": { + "type": "object", + "description": "Hostname for which matching paths should be replaced.", + "x-additionalPropertiesName": "hostname", + "additionalProperties": { + "type": "string", + "description": "Key-value pair of a path that should be replaced.", + "x-additionalPropertiesName": "path" + } + } + }, + "configurationRecordExtractorType": { + "type": "string", + "enum": [ + "function" + ] + }, + "Action": { + "type": "object", + "description": "How to process crawled URLs.\n\nEach action defines:\n\n- The targeted subset of URLs it processes.\n- What information to extract from the web pages.\n- The Algolia indices where the extracted records will be stored.\n\nIf a single web page matches several actions,\none record is generated for each action.\n", + "properties": { + "autoGenerateObjectIDs": { + "type": "boolean", + "description": "Whether to generate an `objectID` for records that don't have one.", + "default": true + }, + "cache": { + "$ref": "#/components/schemas/cache" + }, + "discoveryPatterns": { + "type": "array", + "description": "Which _intermediary_ web pages the crawler should visit.\nUse `discoveryPatterns` to define pages that should be visited _just_ for their links to other pages,\n_not_ their content.\nIt functions similarly to the `pathsToMatch` action but without record extraction.\n", + "items": { + "$ref": "#/components/schemas/urlPattern" + } + }, + "fileTypesToMatch": { + "type": "array", + "description": "File types for crawling non-HTML documents.\n", + "maxItems": 100, + "items": { + "$ref": "#/components/schemas/fileTypes" + }, + "default": [ + "html" + ], + "example": [ + "html", + "pdf" + ] + }, + "hostnameAliases": { + "$ref": "#/components/schemas/hostnameAliases" + }, + "indexName": { + "type": "string", + "maxLength": 256, + "description": "Reference to the index used to store the action's extracted records.\n`indexName` is combined with the prefix you specified in `indexPrefix`.\n", + "example": "algolia_website" + }, + "name": { + "type": "string", + "description": "Unique identifier for the action. This option is required if `schedule` is set." + }, + "pathAliases": { + "$ref": "#/components/schemas/pathAliases" + }, + "pathsToMatch": { + "type": "array", + "description": "URLs to which this action should apply.\n\nUses [micromatch](https://github.com/micromatch/micromatch) for negation, wildcards, and more.\n", + "minItems": 1, + "maxItems": 100, + "items": { + "$ref": "#/components/schemas/urlPattern" + } + }, + "recordExtractor": { + "title": "recordExtractor", + "type": "object", + "description": "Function for extracting information from a crawled page and transforming it into Algolia records for indexing.\n\nThe Crawler has an [editor](https://www.algolia.com/doc/tools/crawler/getting-started/crawler-configuration/#the-editor) with autocomplete and validation to help you update the `recordExtractor`.\nFor details, see the [`recordExtractor` documentation](https://www.algolia.com/doc/tools/crawler/apis/configuration/actions/#parameter-param-recordextractor).\n", + "properties": { + "__type": { + "$ref": "#/components/schemas/configurationRecordExtractorType" + }, + "source": { + "type": "string", + "description": "A JavaScript function (as a string) that returns one or more Algolia records for each crawled page.\n" + } + } + }, + "schedule": { + "type": "string", + "description": "How often to perform a complete crawl for this action.\n\nFor mopre information, consult the [`schedule` parameter documentation](https://www.algolia.com/doc/tools/crawler/apis/configuration/schedule/).\n" + }, + "selectorsToMatch": { + "type": "array", + "description": "DOM selectors for nodes that must be present on the page to be processed.\nIf the page doesn't match any of the selectors, it's ignored.\n", + "maxItems": 100, + "items": { + "type": "string", + "description": "Prefix a selector with `!` to ignore matching pages. \n" + }, + "example": [ + ".products", + "!.featured" + ] + } + }, + "required": [ + "indexName", + "recordExtractor" + ] + }, + "ignoreCanonicalTo": { + "oneOf": [ + { + "type": "boolean", + "description": "Determines if the crawler should extract records from a page with a [canonical URL](https://www.algolia.com/doc/tools/crawler/getting-started/crawler-configuration/#canonical-urls-and-crawler-behavior).\n\nIf `ignoreCanonicalTo` is set to:\n\n- `true` all canonical URLs are ignored.\n- One or more URL patterns, the crawler will ignore the canonical URL if it matches a pattern.\n" + }, + { + "type": "array", + "description": "Canonical URLs or URL patterns to ignore.\n", + "items": { + "type": "string", + "description": "Pattern or URL.\n\nCanonical URLs are only ignored if they match this pattern.\n" + } + } + ] + }, + "supportedLanguage": { + "type": "string", + "description": "ISO code for a supported language.", + "enum": [ + "af", + "ar", + "az", + "bg", + "bn", + "ca", + "cs", + "cy", + "da", + "de", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "fi", + "fo", + "fr", + "ga", + "gl", + "he", + "hi", + "hu", + "hy", + "id", + "is", + "it", + "ja", + "ka", + "kk", + "ko", + "ku", + "ky", + "lt", + "lv", + "mi", + "mn", + "mr", + "ms", + "mt", + "nb", + "nl", + "no", + "ns", + "pl", + "ps", + "pt", + "pt-br", + "qu", + "ro", + "ru", + "sk", + "sq", + "sv", + "sw", + "ta", + "te", + "th", + "tl", + "tn", + "tr", + "tt", + "uk", + "ur", + "uz", + "zh" + ] + }, + "userData": { + "example": { + "settingID": "f2a7b51e3503acc6a39b3784ffb84300", + "pluginVersion": "1.6.0" + }, + "description": "An object with custom data.\n\nYou can store up to 32kB as custom data.\n", + "default": {}, + "x-categories": [ + "Advanced" + ] + }, + "maxFacetHits": { + "type": "integer", + "description": "Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", + "maximum": 100, + "default": 10, + "x-categories": [ + "Advanced" + ] + }, + "baseIndexSettings": { + "type": "object", + "additionalProperties": false, + "properties": { + "attributesForFaceting": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "author", + "filterOnly(isbn)", + "searchable(edition)", + "afterDistinct(category)", + "afterDistinct(searchable(publisher))" + ], + "description": "Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/).\n\nFacets are attributes that let you categorize search results.\nThey can be used for filtering search results.\nBy default, no attribute is used for faceting.\nAttribute names are case-sensitive.\n\n**Modifiers**\n\n- `filterOnly(\"ATTRIBUTE\")`.\n Allows the attribute to be used as a filter but doesn't evaluate the facet values.\n\n- `searchable(\"ATTRIBUTE\")`.\n Allows searching for facet values.\n\n- `afterDistinct(\"ATTRIBUTE\")`.\n Evaluates the facet count _after_ deduplication with `distinct`.\n This ensures accurate facet counts.\n You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.\n", + "default": [], + "x-categories": [ + "Faceting" + ] + }, + "replicas": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "virtual(prod_products_price_asc)", + "dev_products_replica" + ], + "description": "Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/).\n\nReplicas are copies of a primary index with the same records but different settings, synonyms, or rules.\nIf you want to offer a different ranking or sorting of your search results, you'll use replica indices.\nAll index operations on a primary index are automatically forwarded to its replicas.\nTo add a replica index, you must provide the complete set of replicas to this parameter.\nIf you omit a replica from this list, the replica turns into a regular, standalone index that will no longer be synced with the primary index.\n\n**Modifier**\n\n- `virtual(\"REPLICA\")`.\n Create a virtual replica,\n Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).\n", + "default": [], + "x-categories": [ + "Ranking" + ] + }, + "paginationLimitedTo": { + "type": "integer", + "example": 100, + "description": "Maximum number of search results that can be obtained through pagination.\n\nHigher pagination limits might slow down your search.\nFor pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed.\n", + "default": 1000, + "maximum": 20000 + }, + "unretrievableAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "total_sales" + ], + "description": "Attributes that can't be retrieved at query time.\n\nThis can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/),\nbut don't want to include it in the search results.\nAttribute names are case-sensitive.\n", + "default": [], + "x-categories": [ + "Attributes" + ] + }, + "disableTypoToleranceOnWords": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "wheel", + "1X2BCD" + ], + "description": "Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words).\nThis also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.\n", + "default": [], + "x-categories": [ + "Typos" + ] + }, + "attributesToTransliterate": { + "description": "Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead).\n\nTransliteration supports searching in any of the Japanese writing systems.\nTo support transliteration, you must set the indexing language to Japanese.\nAttribute names are case-sensitive.\n", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "name", + "description" + ], + "x-categories": [ + "Languages" + ] + }, + "camelCaseAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "description" + ], + "description": "Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.\nAttribute names are case-sensitive.\n", + "default": [], + "x-categories": [ + "Languages" + ] + }, + "decompoundedAttributes": { + "type": "object", + "example": { + "de": [ + "name" + ] + }, + "description": "Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding).\nAttribute names are case-sensitive.\n\nCompound words are formed by combining two or more individual words,\nand are particularly prevalent in Germanic languages—for example, \"firefighter\".\nWith decompounding, the individual components are indexed separately.\n\nYou can specify different lists for different languages.\nDecompounding is supported for these languages:\nDutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`).\nDecompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).\nFor example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).\n", + "default": {}, + "x-categories": [ + "Languages" + ] + }, + "indexLanguages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + }, + "example": [ + "ja" + ], + "description": "Languages for language-specific processing steps, such as word detection and dictionary settings.\n\n**You should always specify an indexing language.**\nIf you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).\n", + "default": [], + "x-categories": [ + "Languages" + ] + }, + "disablePrefixOnAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "sku" + ], + "description": "Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).\nAttribute names are case-sensitive.\n", + "default": [], + "x-categories": [ + "Query strategy" + ] + }, + "allowCompressionOfIntegerArray": { + "type": "boolean", + "description": "Whether arrays with exclusively non-negative integers should be compressed for better performance.\nIf true, the compressed arrays may be reordered.\n", + "default": false, + "x-categories": [ + "Performance" + ] + }, + "numericAttributesForFiltering": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters).\nAttribute names are case-sensitive.\n\nBy default, all numeric attributes are available as numerical filters.\nFor faster indexing, reduce the number of numeric attributes.\n\nTo turn off filtering for all numeric attributes, specify an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`.\n\n**Modifier**\n\n- `equalOnly(\"ATTRIBUTE\")`.\n Support only filtering based on equality comparisons `=` and `!=`.\n", + "example": [ + "equalOnly(quantity)", + "popularity" + ], + "default": [], + "x-categories": [ + "Performance" + ] + }, + "separatorsToIndex": { + "type": "string", + "example": "+#", + "description": "Control which non-alphanumeric characters are indexed.\n\nBy default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`).\nTo include such characters, define them with `separatorsToIndex`.\n\nSeparators are all non-letter characters except spaces and currency characters, such as $€£¥.\n\nWith `separatorsToIndex`, Algolia treats separator characters as separate words.\nFor example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.\n", + "default": "", + "x-categories": [ + "Typos" + ] + }, + "searchableAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "title,alternative_title", + "author", + "unordered(text)", + "emails.personal" + ], + "description": "Attributes used for searching. Attribute names are case-sensitive.\n\nBy default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off.\nWith a non-empty list, Algolia only returns results with matches in the selected attributes.\nIn addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first.\nTo make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`.\nAttributes with the same priority are always unordered.\n\nFor more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/).\n\n**Modifier**\n\n- `unordered(\"ATTRIBUTE\")`.\n Ignore the position of a match within the attribute.\n\nWithout a modifier, matches at the beginning of an attribute rank higher than matches at the end.\n", + "default": [], + "x-categories": [ + "Attributes" + ] + }, + "userData": { + "$ref": "#/components/schemas/userData" + }, + "customNormalization": { + "description": "Characters and their normalized replacements.\nThis overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).\n", + "type": "object", + "example": { + "default": { + "ä": "ae", + "ü": "ue" + } + }, + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "x-categories": [ + "Languages" + ] + }, + "attributeForDistinct": { + "description": "Attribute that should be used to establish groups of results.\nAttribute names are case-sensitive.\n\nAll records with the same value for this attribute are considered a group.\nYou can combine `attributeForDistinct` with the `distinct` search parameter to control\nhow many items per group are included in the search results.\n\nIf you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting.\nThis applies faceting _after_ deduplication, which will result in accurate facet counts.\n", + "example": "url", + "type": "string" + }, + "maxFacetHits": { + "$ref": "#/components/schemas/maxFacetHits" + }, + "keepDiacriticsOnCharacters": { + "type": "string", + "example": "øé", + "description": "Characters for which diacritics should be preserved.\n\nBy default, Algolia removes diacritics from letters.\nFor example, `é` becomes `e`. If this causes issues in your search,\nyou can specify characters that should keep their diacritics.\n", + "default": "", + "x-categories": [ + "Languages" + ] + }, + "customRanking": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "desc(popularity)", + "asc(price)" + ], + "description": "Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/).\nAttribute names are case-sensitive.\n\nThe custom ranking attributes decide which items are shown first if the other ranking criteria are equal.\n\nRecords with missing values for your selected custom ranking attributes are always sorted last.\nBoolean attributes are sorted based on their alphabetical order.\n\n**Modifiers**\n\n- `asc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in ascending order.\n\n- `desc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in descending order.\n\nIf you use two or more custom ranking attributes,\n[reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes,\nor the other attributes will never be applied.\n", + "default": [], + "x-categories": [ + "Ranking" + ] + } + } + }, + "hitsPerPage": { + "type": "integer", + "description": "Number of hits per page.", + "default": 20, + "minimum": 1, + "maximum": 1000, + "x-categories": [ + "Pagination" + ] + }, + "typoToleranceEnum": { + "type": "string", + "title": "typo tolerance", + "description": "- `min`. Return matches with the lowest number of typos.\n For example, if you have matches without typos, only include those.\n But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos).\n- `strict`. Return matches with the two lowest numbers of typos.\n With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.\n", + "enum": [ + "min", + "strict" + ] + }, + "typoTolerance": { + "description": "Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied.\n\nIf typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) are also active.\n", + "oneOf": [ + { + "type": "boolean", + "default": true, + "description": "Whether typo tolerance is active. If true, matches with typos are included in the search results and rank after exact matches." + }, + { + "$ref": "#/components/schemas/typoToleranceEnum" + } + ], + "x-categories": [ + "Typos" + ] + }, + "booleanString": { + "type": "string", + "enum": [ + "true", + "false" + ] + }, + "ignorePlurals": { + "description": "Treat singular, plurals, and other forms of declensions as equivalent.\nYou should only use this feature for the languages used in your index.\n", + "example": [ + "ca", + "es" + ], + "oneOf": [ + { + "type": "array", + "description": "ISO code for languages for which this feature should be active.\nThis overrides languages you set with `queryLanguages`.\n", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + } + }, + { + "$ref": "#/components/schemas/booleanString" + }, + { + "type": "boolean", + "description": "If true, `ignorePlurals` is active for all languages included in `queryLanguages`, or for all supported languages, if `queryLanguges` is empty.\nIf false, singulars, plurals, and other declensions won't be considered equivalent.\n", + "default": false + } + ], + "x-categories": [ + "Languages" + ] + }, + "removeStopWords": { + "description": "Removes stop words from the search query.\n\nStop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own.\nIn English, \"the\", \"a\", or \"and\" are stop words.\n\nYou should only use this feature for the languages used in your index.\n", + "example": [ + "ca", + "es" + ], + "oneOf": [ + { + "type": "array", + "description": "ISO code for languages for which stop words should be removed. This overrides languages you set in `queryLanguges`.", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + } + }, + { + "type": "boolean", + "default": false, + "description": "If true, stop words are removed for all languages you included in `queryLanguages`, or for all supported languages, if `queryLanguages` is empty.\nIf false, stop words are not removed.\n" + } + ], + "x-categories": [ + "Languages" + ] + }, + "queryType": { + "type": "string", + "enum": [ + "prefixLast", + "prefixAll", + "prefixNone" + ], + "description": "Determines if and how query words are interpreted as prefixes.\n\nBy default, only the last query word is treated as a prefix (`prefixLast`).\nTo turn off prefix search, use `prefixNone`.\nAvoid `prefixAll`, which treats all query words as prefixes.\nThis might lead to counterintuitive results and makes your search slower.\n\nFor more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).\n", + "default": "prefixLast", + "x-categories": [ + "Query strategy" + ] + }, + "removeWordsIfNoResults": { + "type": "string", + "enum": [ + "none", + "lastWords", + "firstWords", + "allOptional" + ], + "example": "firstWords", + "description": "Strategy for removing words from the query when it doesn't return any results.\nThis helps to avoid returning empty search results.\n\n- `none`.\n No words are removed when a query doesn't return results.\n\n- `lastWords`.\n Treat the last (then second to last, then third to last) word as optional,\n until there are results or at most 5 words have been removed.\n\n- `firstWords`.\n Treat the first (then second, then third) word as optional,\n until there are results or at most 5 words have been removed.\n\n- `allOptional`.\n Treat all words as optional.\n\nFor more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).\n", + "default": "none", + "x-categories": [ + "Query strategy" + ] + }, + "mode": { + "type": "string", + "enum": [ + "neuralSearch", + "keywordSearch" + ], + "description": "Search mode the index will use to query for results.\n\nThis setting only applies to indices, for which Algolia enabled NeuralSearch for you.\n", + "default": "keywordSearch", + "x-categories": [ + "Query strategy" + ] + }, + "semanticSearch": { + "type": "object", + "description": "Settings for the semantic search part of NeuralSearch.\nOnly used when `mode` is `neuralSearch`.\n", + "properties": { + "eventSources": { + "oneOf": [ + { + "type": "array", + "description": "Indices from which to collect click and conversion events.\n\nIf null, the current index and all its replicas are used.\n", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + } + } + }, + "optionalWordsArray": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "blue", + "iphone case" + ], + "description": "List of [optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).", + "default": [], + "x-categories": [ + "Query strategy" + ] + }, + "optionalWords": { + "description": "Words that should be considered optional when found in the query.\n\nBy default, records must match all words in the search query to be included in the search results.\nAdding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words.\nFor example, if the search query is \"action video\" and \"video\" is an optional word,\nthe search engine runs two queries. One for \"action video\" and one for \"action\".\nRecords that match all words are ranked higher.\n\nFor a search query with 4 or more words **and** all its words are optional,\nthe number of matched words required for a record to be included in the search results increases for every 1,000 records:\n\n- If `optionalWords` has less than 10 words, the required number of matched words increases by 1:\n results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words.\n- If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down).\n For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words.\n\nFor more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).\n", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + }, + { + "$ref": "#/components/schemas/optionalWordsArray" + } + ] + }, + "exactOnSingleWordQuery": { + "type": "string", + "enum": [ + "attribute", + "none", + "word" + ], + "description": "Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.\n\n- `attribute`.\n The Exact ranking criterion is 1 if the query word and attribute value are the same.\n For example, a search for \"road\" will match the value \"road\", but not \"road trip\".\n\n- `none`.\n The Exact ranking criterion is ignored on single-word searches.\n\n- `word`.\n The Exact ranking criterion is 1 if the query word is found in the attribute value.\n The query word must have at least 3 characters and must not be a stop word.\n Only exact matches will be highlighted,\n partial and prefix matches won't.\n", + "default": "attribute", + "x-categories": [ + "Query strategy" + ] + }, + "alternativesAsExact": { + "type": "string", + "enum": [ + "ignorePlurals", + "singleWordSynonym", + "multiWordsSynonym", + "ignoreConjugations" + ], + "x-categories": [ + "Query strategy" + ] + }, + "advancedSyntaxFeatures": { + "type": "string", + "enum": [ + "exactPhrase", + "excludeWords" + ], + "x-categories": [ + "Query strategy" + ] + }, + "distinct": { + "description": "Determines how many records of a group are included in the search results.\n\nRecords with the same value for the `attributeForDistinct` attribute are considered a group.\nThe `distinct` setting controls how many members of the group are returned.\nThis is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature).\n\nThe `distinct` setting is ignored if `attributeForDistinct` is not set.\n", + "example": 1, + "oneOf": [ + { + "type": "boolean", + "description": "Whether deduplication is turned on. If true, only one member of a group is shown in the search results." + }, + { + "type": "integer", + "description": "Number of members of a group of records to include in the search results.\n\n- Don't use `distinct > 1` for records that might be [promoted by rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/).\n The number of hits won't be correct and faceting won't work as expected.\n- With `distinct > 1`, the `hitsPerPage` parameter controls the number of returned groups.\n For example, with `hitsPerPage: 10` and `distinct: 2`, up to 20 records are returned.\n Likewise, the `nbHits` response attribute contains the number of returned groups.\n", + "minimum": 0, + "maximum": 4, + "default": 0 + } + ], + "x-categories": [ + "Advanced" + ] + }, + "order": { + "description": "Explicit order of facets or facet values.\n\nThis setting lets you always show specific facets or facet values at the top of the list.\n", + "type": "array", + "items": { + "type": "string" + } + }, + "facets": { + "description": "Order of facet names.", + "type": "object", + "additionalProperties": false, + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + }, + "sortRemainingBy": { + "description": "Order of facet values that aren't explicitly positioned with the `order` setting.\n\n- `count`.\n Order remaining facet values by decreasing count.\n The count is the number of matching records containing this facet value.\n\n- `alpha`.\n Sort facet values alphabetically.\n\n- `hidden`.\n Don't show facet values that aren't explicitly positioned.\n", + "type": "string", + "enum": [ + "count", + "alpha", + "hidden" + ] + }, + "hide": { + "description": "Hide facet values.", + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "type": "object", + "additionalProperties": false, + "properties": { + "order": { + "$ref": "#/components/schemas/order" + }, + "sortRemainingBy": { + "$ref": "#/components/schemas/sortRemainingBy" + }, + "hide": { + "$ref": "#/components/schemas/hide" + } + } + }, + "values": { + "description": "Order of facet values. One object for each facet.", + "type": "object", + "additionalProperties": { + "x-additionalPropertiesName": "facet", + "$ref": "#/components/schemas/value" + } + }, + "facetOrdering": { + "description": "Order of facet names and facet values in your UI.", + "type": "object", + "additionalProperties": false, + "properties": { + "facets": { + "$ref": "#/components/schemas/facets" + }, + "values": { + "$ref": "#/components/schemas/values" + } + } + }, + "redirectURL": { + "description": "The redirect rule container.", + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string" + } + } + }, + "bannerImageUrl": { + "description": "URL for an image to show inside a banner.", + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string" + } + } + }, + "bannerImage": { + "description": "Image to show inside a banner.", + "type": "object", + "additionalProperties": false, + "properties": { + "urls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/bannerImageUrl" + } + }, + "title": { + "type": "string" + } + } + }, + "bannerLink": { + "description": "Link for a banner defined in the Merchandising Studio.", + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "type": "string" + } + } + }, + "banner": { + "description": "Banner with image and link to redirect users.", + "type": "object", + "additionalProperties": false, + "properties": { + "image": { + "$ref": "#/components/schemas/bannerImage" + }, + "link": { + "$ref": "#/components/schemas/bannerLink" + } + } + }, + "banners": { + "description": "Banners defined in the Merchandising Studio for a given search.", + "type": "array", + "items": { + "$ref": "#/components/schemas/banner" + } + }, + "widgets": { + "description": "Widgets returned from any rules that are applied to the current search.", + "type": "object", + "additionalProperties": false, + "properties": { + "banners": { + "$ref": "#/components/schemas/banners" + } + } + }, + "renderingContent": { + "description": "Extra data that can be used in the search UI.\n\nYou can use this to control aspects of your search UI, such as the order of facet names and values\nwithout changing your frontend code.\n", + "type": "object", + "additionalProperties": false, + "properties": { + "facetOrdering": { + "$ref": "#/components/schemas/facetOrdering" + }, + "redirect": { + "$ref": "#/components/schemas/redirectURL" + }, + "widgets": { + "$ref": "#/components/schemas/widgets" + } + }, + "x-categories": [ + "Advanced" + ] + }, + "reRankingApplyFilter": { + "description": "Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.\n", + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/reRankingApplyFilter" + } + }, + { + "type": "string", + "x-categories": [ + "Filtering" + ] + } + ] + }, + "indexSettingsAsSearchParams": { + "type": "object", + "additionalProperties": false, + "properties": { + "attributesToRetrieve": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "author", + "title", + "content" + ], + "description": "Attributes to include in the API response.\n\nTo reduce the size of your response, you can retrieve only some of the attributes.\nAttribute names are case-sensitive.\n\n- `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings.\n- To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`.\n- The `objectID` attribute is always included.\n", + "default": [ + "*" + ], + "x-categories": [ + "Attributes" + ] + }, + "ranking": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Determines the order in which Algolia returns your results.\n\nBy default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).\nThe tie-breaking algorithm sequentially applies each criterion in the order they're specified.\nIf you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/),\nyou put the sorting attribute at the top of the list.\n\n**Modifiers**\n\n- `asc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in ascending order.\n- `desc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in descending order.\n\nBefore you modify the default setting,\nyou should test your changes in the dashboard,\nand by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).\n", + "default": [ + "typo", + "geo", + "words", + "filters", + "proximity", + "attribute", + "exact", + "custom" + ], + "x-categories": [ + "Ranking" + ] + }, + "relevancyStrictness": { + "type": "integer", + "example": 90, + "description": "Relevancy threshold below which less relevant results aren't included in the results.\n\nYou can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas).\nUse this setting to strike a balance between the relevance and number of returned results.\n", + "default": 100, + "x-categories": [ + "Ranking" + ] + }, + "attributesToHighlight": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "author", + "title", + "conten", + "content" + ], + "description": "Attributes to highlight.\n\nBy default, all searchable attributes are highlighted.\nUse `*` to highlight all attributes or use an empty array `[]` to turn off highlighting.\nAttribute names are case-sensitive.\n\nWith highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`.\nYou can use this to visually highlight matching parts of a search query in your UI.\n\nFor more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/).\n", + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "attributesToSnippet": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "content:80", + "description" + ], + "description": "Attributes for which to enable snippets.\nAttribute names are case-sensitive.\n\nSnippets provide additional context to matched words.\nIf you enable snippets, they include 10 words, including the matched word.\nThe matched word will also be wrapped by HTML tags for highlighting.\nYou can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`,\nwhere `NUMBER` is the number of words to be extracted.\n", + "default": [], + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "highlightPreTag": { + "type": "string", + "description": "HTML tag to insert before the highlighted parts in all highlighted results and snippets.", + "default": "", + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "highlightPostTag": { + "type": "string", + "description": "HTML tag to insert after the highlighted parts in all highlighted results and snippets.", + "default": "", + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "snippetEllipsisText": { + "type": "string", + "description": "String used as an ellipsis indicator when a snippet is truncated.", + "default": "…", + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "restrictHighlightAndSnippetArrays": { + "type": "boolean", + "description": "Whether to restrict highlighting and snippeting to items that at least partially matched the search query.\nBy default, all items are highlighted and snippeted.\n", + "default": false, + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "hitsPerPage": { + "$ref": "#/components/schemas/hitsPerPage" + }, + "minWordSizefor1Typo": { + "type": "integer", + "description": "Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + "default": 4, + "x-categories": [ + "Typos" + ] + }, + "minWordSizefor2Typos": { + "type": "integer", + "description": "Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", + "default": 8, + "x-categories": [ + "Typos" + ] + }, + "typoTolerance": { + "$ref": "#/components/schemas/typoTolerance" + }, + "allowTyposOnNumericTokens": { + "type": "boolean", + "description": "Whether to allow typos on numbers in the search query.\n\nTurn off this setting to reduce the number of irrelevant matches\nwhen searching in large sets of similar numbers.\n", + "default": true, + "x-categories": [ + "Typos" + ] + }, + "disableTypoToleranceOnAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "sku" + ], + "description": "Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).\nAttribute names are case-sensitive.\n\nReturning only exact matches can help when:\n\n- [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/).\n- Reducing the number of matches when you have too many.\n This can happen with attributes that are long blocks of text, such as product descriptions.\n\nConsider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.\n", + "default": [], + "x-categories": [ + "Typos" + ] + }, + "ignorePlurals": { + "$ref": "#/components/schemas/ignorePlurals" + }, + "removeStopWords": { + "$ref": "#/components/schemas/removeStopWords" + }, + "queryLanguages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/supportedLanguage" + }, + "example": [ + "es" + ], + "description": "Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries.\n\nThis setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings.\nThis setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages.\nTo support this, you must place the CJK language **first**.\n\n**You should always specify a query language.**\nIf you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).\n", + "default": [], + "x-categories": [ + "Languages" + ] + }, + "decompoundQuery": { + "type": "boolean", + "description": "Whether to split compound words in the query into their building blocks.\n\nFor more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words).\nWord segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.\nDecompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).\nFor example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).\n", + "default": true, + "x-categories": [ + "Languages" + ] + }, + "enableRules": { + "type": "boolean", + "description": "Whether to enable rules.", + "default": true, + "x-categories": [ + "Rules" + ] + }, + "enablePersonalization": { + "type": "boolean", + "description": "Whether to enable Personalization.", + "default": false, + "x-categories": [ + "Personalization" + ] + }, + "queryType": { + "$ref": "#/components/schemas/queryType" + }, + "removeWordsIfNoResults": { + "$ref": "#/components/schemas/removeWordsIfNoResults" + }, + "mode": { + "$ref": "#/components/schemas/mode" + }, + "semanticSearch": { + "$ref": "#/components/schemas/semanticSearch" + }, + "advancedSyntax": { + "type": "boolean", + "description": "Whether to support phrase matching and excluding words from search queries.\n\nUse the `advancedSyntaxFeatures` parameter to control which feature is supported.\n", + "default": false, + "x-categories": [ + "Query strategy" + ] + }, + "optionalWords": { + "$ref": "#/components/schemas/optionalWords" + }, + "disableExactOnAttributes": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "description" + ], + "description": "Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).\nAttribute names are case-sensitive.\n\nThis can be useful for attributes with long values, where the likelihood of an exact match is high,\nsuch as product descriptions.\nTurning off the Exact ranking criterion for these attributes favors exact matching on other attributes.\nThis reduces the impact of individual attributes with a lot of content on ranking.\n", + "default": [], + "x-categories": [ + "Query strategy" + ] + }, + "exactOnSingleWordQuery": { + "$ref": "#/components/schemas/exactOnSingleWordQuery" + }, + "alternativesAsExact": { + "type": "array", + "items": { + "$ref": "#/components/schemas/alternativesAsExact" + }, + "description": "Determine which plurals and synonyms should be considered an exact matches.\n\nBy default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching.\nFor example:\n\n- \"swimsuit\" and \"swimsuits\" are treated the same\n- \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)).\n\n- `ignorePlurals`.\n Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.\n\n- `singleWordSynonym`.\n Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches.\n\n- `multiWordsSynonym`.\n Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.\n", + "default": [ + "ignorePlurals", + "singleWordSynonym" + ], + "x-categories": [ + "Query strategy" + ] + }, + "advancedSyntaxFeatures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/advancedSyntaxFeatures" + }, + "description": "Advanced search syntax features you want to support.\n\n- `exactPhrase`.\n Phrases in quotes must match exactly.\n For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".\n\n- `excludeWords`.\n Query words prefixed with a `-` must not occur in a record.\n For example, `search -engine` matches records that contain \"search\" but not \"engine\".\n\nThis setting only has an effect if `advancedSyntax` is true.\n", + "default": [ + "exactPhrase", + "excludeWords" + ], + "x-categories": [ + "Query strategy" + ] + }, + "distinct": { + "$ref": "#/components/schemas/distinct" + }, + "replaceSynonymsInHighlight": { + "type": "boolean", + "description": "Whether to replace a highlighted word with the matched synonym.\n\nBy default, the original words are highlighted even if a synonym matches.\nFor example, with `home` as a synonym for `house` and a search for `home`,\nrecords matching either \"home\" or \"house\" are included in the search results,\nand either \"home\" or \"house\" are highlighted.\n\nWith `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records,\nbut all occurrences of \"house\" are replaced by \"home\" in the highlighted response.\n", + "default": false, + "x-categories": [ + "Highlighting and Snippeting" + ] + }, + "minProximity": { + "type": "integer", + "minimum": 1, + "maximum": 7, + "description": "Minimum proximity score for two matching words.\n\nThis adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity)\nby equally scoring matches that are farther apart.\n\nFor example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.\n", + "default": 1, + "x-categories": [ + "Advanced" + ] + }, + "responseFields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Properties to include in the API response of search and browse requests.\n\nBy default, all response properties are included.\nTo reduce the response size, you can select which properties should be included.\n\nAn empty list may lead to an empty API response (except properties you can't exclude).\n\nYou can't exclude these properties:\n`message`, `warning`, `cursor`, `abTestVariantID`,\nor any property added by setting `getRankingInfo` to true.\n\nYour search depends on the `hits` field. If you omit this field, searches won't return any results.\nYour UI might also depend on other properties, for example, for pagination.\nBefore restricting the response size, check the impact on your search experience.\n", + "default": [ + "*" + ], + "x-categories": [ + "Advanced" + ] + }, + "maxValuesPerFacet": { + "type": "integer", + "description": "Maximum number of facet values to return for each facet.", + "default": 100, + "maximum": 1000, + "x-categories": [ + "Faceting" + ] + }, + "sortFacetValuesBy": { + "type": "string", + "description": "Order in which to retrieve facet values.\n\n- `count`.\n Facet values are retrieved by decreasing count.\n The count is the number of matching records containing this facet value.\n\n- `alpha`.\n Retrieve facet values alphabetically.\n\nThis setting doesn't influence how facet values are displayed in your UI (see `renderingContent`).\nFor more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).\n", + "default": "count", + "x-categories": [ + "Faceting" + ] + }, + "attributeCriteriaComputedByMinProximity": { + "type": "boolean", + "description": "Whether the best matching attribute should be determined by minimum proximity.\n\nThis setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting.\nIf true, the best matching attribute is selected based on the minimum proximity of multiple matches.\nOtherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.\n", + "default": false, + "x-categories": [ + "Advanced" + ] + }, + "renderingContent": { + "$ref": "#/components/schemas/renderingContent" + }, + "enableReRanking": { + "type": "boolean", + "description": "Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).\n\nThis setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.\n", + "default": true, + "x-categories": [ + "Filtering" + ] + }, + "reRankingApplyFilter": { + "oneOf": [ + { + "$ref": "#/components/schemas/reRankingApplyFilter" + }, + { + "type": "null" + } + ] + } + } + }, + "indexSettings": { + "description": "Index settings.", + "allOf": [ + { + "$ref": "#/components/schemas/baseIndexSettings" + }, + { + "$ref": "#/components/schemas/indexSettingsAsSearchParams" + } + ] + }, + "headers": { + "type": "object", + "description": "Headers to add to all requests.", + "properties": { + "Accept-Language": { + "type": "string", + "description": "Preferred natural language and locale.", + "example": "fr-FR" + }, + "Authorization": { + "type": "string", + "description": "Basic authentication header.", + "example": "Bearer Aerehdf==" + }, + "Cookie": { + "type": "string", + "description": "Cookie. The header will be replaced by the cookie retrieved when logging in.", + "example": "session=1234" + } + } + }, + "loginRequestOptions": { + "type": "object", + "description": "Options for the HTTP request for logging in.", + "properties": { + "method": { + "type": "string", + "description": "HTTP method for sending the request.", + "default": "GET", + "example": "POST" + }, + "headers": { + "$ref": "#/components/schemas/headers" + }, + "body": { + "type": "string", + "description": "Form content.", + "example": "id=user&password=s3cr3t" + }, + "timeout": { + "type": "integer", + "description": "Timeout for the request." + } + } + }, + "fetchRequest": { + "title": "HTTP request", + "type": "object", + "description": "Information for making a HTTP request for authorization.", + "properties": { + "url": { + "type": "string", + "description": "URL with your login form.", + "example": "https://example.com/login" + }, + "requestOptions": { + "$ref": "#/components/schemas/loginRequestOptions" + } + }, + "required": [ + "url" + ], + "example": { + "url": "https://example.com/secure/login-with-post", + "requestOptions": { + "method": "POST", + "headers": { + "Content-Type": "application/x-www-form-urlencoded" + }, + "body": "id=my-id&password=my-password", + "timeout": 5000 + } + } + }, + "waitTime": { + "type": "object", + "description": "Timeout for the HTTP request.", + "properties": { + "min": { + "type": "integer", + "default": 0, + "description": "Minimum waiting time in milliseconds.", + "example": 7000 + }, + "max": { + "type": "integer", + "default": 20000, + "description": "Maximum waiting time in milliseconds.", + "example": 15000 + } + } + }, + "browserRequest": { + "title": "Browser-based", + "type": "object", + "description": "Information for using a web browser for authorization.\nThe browser loads a login page and enters the provided credentials.\n", + "properties": { + "url": { + "type": "string", + "description": "URL of your login page.\n\nThe crawler looks for an input matching the selector `input[type=text]` or `input[type=email]` for the username and `input[type=password]` for the password.\n", + "example": "https://example.com/login" + }, + "username": { + "type": "string", + "description": "Username for signing in.", + "example": "crawler" + }, + "password": { + "type": "string", + "description": "Password for signing in.", + "example": "s3cr3t" + }, + "waitTime": { + "$ref": "#/components/schemas/waitTime" + } + }, + "required": [ + "url", + "username", + "password" + ], + "example": { + "url": "https://example.com/secure/login-page", + "username": "my-id", + "password": "my-password" + } + }, + "grantType": { + "type": "string", + "description": "OAuth 2.0 grant type.", + "enum": [ + "client_credentials" + ] + }, + "extraParameters": { + "type": "object", + "description": "Extra parameters for the authorization request.", + "properties": { + "resource": { + "type": "string", + "description": "App ID URI of the receiving web service.\n\nFor more information, see [Azure Active Directory](https://learn.microsoft.com/en-us/previous-versions/azure/active-directory/azuread-dev/v1-oauth2-client-creds-grant-flow#first-case-access-token-request-with-a-shared-secret).\n" + } + } + }, + "accessTokenRequest": { + "type": "object", + "description": "Parameters required to make the [access token request](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4.2).\n", + "properties": { + "url": { + "type": "string", + "description": "URL for the access token endpoint." + }, + "grantType": { + "$ref": "#/components/schemas/grantType" + }, + "clientId": { + "type": "string", + "description": "[Client identifier](https://datatracker.ietf.org/doc/html/rfc6749#section-2.2).\n" + }, + "clientSecret": { + "type": "string", + "description": "Client secret." + }, + "scope": { + "type": "string", + "description": "[Access token scope](https://datatracker.ietf.org/doc/html/rfc6749#section-3.3).\n" + }, + "extraParameters": { + "$ref": "#/components/schemas/extraParameters" + } + }, + "required": [ + "url", + "grantType", + "clientId", + "clientSecret" + ] + }, + "oauthRequest": { + "title": "OAuth 2.0", + "type": "object", + "description": "Authorization information for using the [OAuth 2.0 client credentials](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4) authorization grant.\n\nOAuth authorization is supported for [Azure Active Directory version 1](https://learn.microsoft.com/en-us/previous-versions/azure/active-directory/azuread-dev/v1-oauth2-client-creds-grant-flow) as provider.\n", + "properties": { + "accessTokenRequest": { + "$ref": "#/components/schemas/accessTokenRequest" + } + }, + "required": [ + "accessTokenRequest" + ], + "example": { + "accessTokenRequest": { + "url": "https://example.com/oauth2/token", + "grant_type": "client_credentials", + "client_id": "my-client-id", + "client_secret": "my-client-secret", + "extraParameters": { + "resource": "https://protected.example.com/" + } + } + } + }, + "login": { + "description": "Authorization method and credentials for crawling protected content.\n\nThe Crawler supports these authentication methods:\n\n- **Basic authentication**.\n The Crawler obtains a session cookie from the login page.\n- **OAuth 2.0 authentication** (`oauthRequest`).\n The Crawler uses OAuth 2.0 client credentials to obtain an access token for authentication.\n\n**Basic authentication**\n\nThe Crawler extracts the `Set-Cookie` response header from the login page, stores that cookie,\nand sends it in the `Cookie` header when crawling all pages defined in the configuration.\n\nThis cookie is retrieved only at the start of each full crawl.\nIf it expires, it isn't automatically renewed.\n\nThe Crawler can obtain the session cookie in one of two ways:\n\n- **HTTP request authentication** (`fetchRequest`).\n The Crawler sends a direct request with your credentials to the login endpoint, similar to a `curl` command.\n- **Browser-based authentication** (`browserRequest`).\n The Crawler emulates a web browser by loading the login page, entering the credentials,\n and submitting the login form as a real user would.\n\n**OAuth 2.0**\n\nThe crawler supports [OAuth 2.0 client credentials grant flow](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4):\n\n1. It performs an access token request with the provided credentials\n1. Stores the fetched token in an `Authorization` header\n1. Sends the token when crawling site pages.\n\nThis token is only fetched at the beginning of each complete crawl.\nIf it expires, it isn't automatically renewed.\n\nClient authentication passes the credentials (`client_id` and `client_secret`) [in the request body](https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1).\nThe [Azure AD v1.0](https://learn.microsoft.com/en-us/previous-versions/azure/active-directory/azuread-dev/v1-oauth2-client-creds-grant-flow) provider is supported.\n", + "oneOf": [ + { + "$ref": "#/components/schemas/fetchRequest" + }, + { + "$ref": "#/components/schemas/browserRequest" + }, + { + "$ref": "#/components/schemas/oauthRequest" + } + ] + }, + "renderJavaScript": { + "description": "If `true`, use a Chrome headless browser to crawl pages.\n\nBecause crawling JavaScript-based web pages is slower than crawling regular HTML pages, you can apply this setting to a specific list of pages. \nUse [micromatch](https://github.com/micromatch/micromatch) to define URL patterns, including negations and wildcards.\n", + "oneOf": [ + { + "type": "boolean", + "description": "Whether to render all pages." + }, + { + "type": "array", + "description": "URLs or URL patterns to render.", + "items": { + "type": "string", + "description": "URL or URL pattern to render.", + "example": [ + "http://www.mysite.com/dynamic-pages/**" + ] + } + }, + { + "title": "headlessBrowserConfig", + "type": "object", + "description": "Configuration for rendering HTML.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether to enable JavaScript rendering.", + "example": true + }, + "patterns": { + "type": "array", + "description": "URLs or URL patterns to render.", + "items": { + "type": "string" + }, + "example": [ + "http://www.mysite.com/dynamic-pages/**" + ] + }, + "adBlock": { + "type": "boolean", + "default": false, + "description": "Whether to use the Crawler's ad blocker.\nIt blocks most ads and tracking scripts but can break some sites.\n" + }, + "waitTime": { + "$ref": "#/components/schemas/waitTime" + } + }, + "required": [ + "enabled", + "patterns" + ] + } + ] + }, + "requestOptions": { + "type": "object", + "description": "Lets you add options to HTTP requests made by the crawler.", + "properties": { + "proxy": { + "type": "string", + "description": "Proxy for all crawler requests." + }, + "timeout": { + "type": "integer", + "default": 30000, + "description": "Timeout in milliseconds for the crawl." + }, + "retries": { + "type": "integer", + "default": 3, + "description": "Maximum number of retries to crawl one URL." + }, + "headers": { + "$ref": "#/components/schemas/headers" + } + } + }, + "beforeIndexPublishing": { + "type": "object", + "description": "Checks triggered after the crawl finishes but before the records are added to the Algolia index.", + "properties": { + "maxLostRecordsPercentage": { + "type": "integer", + "description": "Maximum difference in percent between the numbers of records between crawls.", + "minimum": 1, + "maximum": 100, + "default": 10 + }, + "maxFailedUrls": { + "type": "integer", + "description": "Stops the crawler if a specified number of pages fail to crawl." + } + } + }, + "safetyChecks": { + "type": "object", + "description": "Checks to ensure the crawl was successful.\n\nFor more information, see the [Safety checks](https://www.algolia.com/doc/tools/crawler/getting-started/crawler-configuration/#safety-checks) documentation.\n", + "properties": { + "beforeIndexPublishing": { + "$ref": "#/components/schemas/beforeIndexPublishing" + } + } + }, + "schedule": { + "type": "string", + "description": "Schedule for running the crawl.\n\nInstead of manually starting a crawl each time, you can set up a schedule for automatic crawls.\n[Use the visual UI](https://www.algolia.com/doc/tools/crawler/getting-started/crawler-configuration-visual/) or add the `schedule` parameter to [your configuration](https://www.algolia.com/doc/tools/crawler/getting-started/crawler-configuration/).\n\n`schedule` uses [Later.js syntax](https://bunkat.github.io/later/) to specify when to crawl your site.\nHere are some key things to keep in mind when using `Later.js` syntax with the Crawler:\n\n- The interval between two scheduled crawls must be at least 24 hours.\n- To crawl daily, use \"every 1 day\" instead of \"everyday\" or \"every day\".\n- If you don't specify a time, the crawl can happen any time during the scheduled day.\n- Specify times for the UTC (GMT+0) timezone\n- Include minutes when specifying a time. For example, \"at 3:00 pm\" instead of \"at 3pm\".\n- Use \"at 12:00 am\" to specify midnight, not \"at 00:00 am\".\n", + "example": "every weekday at 12:00 pm" + }, + "Configuration": { + "type": "object", + "description": "Crawler configuration.", + "required": [ + "applicationId", + "rateLimit", + "actions" + ], + "properties": { + "actions": { + "type": "array", + "description": "A list of actions.", + "minItems": 1, + "maxItems": 30, + "items": { + "$ref": "#/components/schemas/Action" + } + }, + "apiKey": { + "type": "string", + "description": "The Algolia API key the crawler uses for indexing records.\nIf you don't provide an API key, one will be generated by the Crawler when you create a configuration.\n\nThe API key must have:\n\n- These [rights and restrictions](https://www.algolia.com/doc/guides/security/api-keys/#rights-and-restrictions): `search`, `addObject`, `deleteObject`, `deleteIndex`, `settings`, `editSettings`, `listIndexes`, `browse`\n- Access to the correct set of indices, based on the crawler's `indexPrefix`.\nFor example, if the prefix is `crawler_`, the API key must have access to `crawler_*`.\n\n**Don't use your [Admin API key](https://www.algolia.com/doc/guides/security/api-keys/#predefined-api-keys)**.\n" + }, + "applicationId": { + "$ref": "#/components/schemas/applicationID" + }, + "exclusionPatterns": { + "type": "array", + "description": "URLs to exclude from crawling.", + "maxItems": 100, + "example": [ + "https://www.example.com/excluded", + "!https://www.example.com/this-one-url", + "https://www.example.com/exclude/**" + ], + "items": { + "type": "string", + "description": "Use [micromatch](https://github.com/micromatch/micromatch) for negation, wildcards, and more.\n" + } + }, + "externalData": { + "type": "array", + "description": "References to external data sources for enriching the extracted records.\n", + "maxItems": 10, + "items": { + "type": "string", + "description": "For more information, see [Enrich extracted records with external data](https://www.algolia.com/doc/tools/crawler/guides/enriching-extraction-with-external-data/).", + "example": "testCSV" + } + }, + "extraUrls": { + "type": "array", + "maxItems": 9999, + "description": "The Crawler treats `extraUrls` the same as `startUrls`.\nSpecify `extraUrls` if you want to differentiate between URLs you manually added to fix site crawling from those you initially specified in `startUrls`.\n", + "items": { + "type": "string" + } + }, + "ignoreCanonicalTo": { + "$ref": "#/components/schemas/ignoreCanonicalTo" + }, + "ignoreNoFollowTo": { + "type": "boolean", + "description": "Determines if the crawler should follow links with a `nofollow` directive.\nIf `true`, the crawler will ignore the `nofollow` directive and crawl links on the page.\n\nThe crawler always ignores links that don't match your [configuration settings](https://www.algolia.com/doc/tools/crawler/getting-started/crawler-configuration/#exclude-and-include-content).\n`ignoreNoFollowTo` applies to:\n\n- Links that are ignored because the [`robots` meta tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name#Other_metadata_names) contains `nofollow` or `none`.\n- Links with a [`rel` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel) containing the `nofollow` directive.\n" + }, + "ignoreNoIndex": { + "type": "boolean", + "description": "Whether to ignore the `noindex` robots meta tag.\nIf `true`, pages with this meta tag _will_ be crawled.\n" + }, + "ignorePaginationAttributes": { + "type": "boolean", + "description": "Whether the crawler should follow `rel=\"prev\"` and `rel=\"next\"` pagination links in the `` section of an HTML page.\n\n- If `true`, the crawler ignores the pagination links.\n- If `false`, the crawler follows the pagination links.\n", + "default": true + }, + "ignoreQueryParams": { + "type": "array", + "description": "Query parameters to ignore while crawling.\n\nAll URLs with the matching query parameters are treated as identical.\nThis prevents indexing URLs that just differ by their query parameters.\n", + "maxItems": 9999, + "example": [ + "ref", + "utm_*" + ], + "items": { + "type": "string", + "description": "Use wildcards to match multiple query parameters." + } + }, + "ignoreRobotsTxtRules": { + "type": "boolean", + "description": "Whether to ignore rules defined in your `robots.txt` file." + }, + "indexPrefix": { + "type": "string", + "description": "A prefix for all indices created by this crawler. It's combined with the `indexName` for each action to form the complete index name.", + "maxLength": 64, + "example": "crawler_" + }, + "initialIndexSettings": { + "type": "object", + "description": "Crawler index settings.\n\nThese index settings are only applied during the first crawl of an index.\n\nAny subsequent changes won't be applied to the index.\nInstead, make changes to your index settings in the [Algolia dashboard](https://dashboard.algolia.com/explorer/configuration/).\n", + "additionalProperties": { + "$ref": "#/components/schemas/indexSettings", + "x-additionalPropertiesName": "indexName" + } + }, + "linkExtractor": { + "title": "linkExtractor", + "type": "object", + "description": "Function for extracting URLs from links on crawled pages.\n\nFor more information, see the [`linkExtractor` documentation](https://www.algolia.com/doc/tools/crawler/apis/configuration/link-extractor/).\n", + "properties": { + "__type": { + "$ref": "#/components/schemas/configurationRecordExtractorType" + }, + "source": { + "type": "string", + "example": "({ $, url, defaultExtractor }) => {\n if (/example.com\\/doc\\//.test(url.href)) {\n // For all pages under `/doc`, only extract the first found URL.\n return defaultExtractor().slice(0, 1)\n }\n // For all other pages, use the default.\n return defaultExtractor()\n}\n" + } + } + }, + "login": { + "$ref": "#/components/schemas/login" + }, + "maxDepth": { + "type": "integer", + "description": "Determines the maximum path depth of crawled URLs.\n\nPath depth is calculated based on the number of slash characters (`/`) after the domain (starting at 1).\nFor example:\n\n- **1** `http://example.com`\n- **1** `http://example.com/`\n- **1** `http://example.com/foo`\n- **2** `http://example.com/foo/`\n- **2** `http://example.com/foo/bar`\n- **3** `http://example.com/foo/bar/`\n\n**URLs added with `startUrls` and `sitemaps` aren't checked for `maxDepth`.**.\n", + "minimum": 1, + "maximum": 100, + "example": 5 + }, + "maxUrls": { + "type": "integer", + "description": "Limits the number of URLs your crawler processes.\n\nChange it to a low value, such as 100, for quick crawling tests.\nChange it to a higher explicit value for full crawls to prevent it from getting \"lost\" in complex site structures.\nBecause the Crawler works on many pages simultaneously, `maxUrls` doesn't guarantee finding the same pages each time it runs.\n", + "minimum": 1, + "maximum": 15000000, + "example": 250 + }, + "rateLimit": { + "type": "integer", + "description": "Determines the number of concurrent tasks per second that can run for this configuration.\n\nA higher rate limit means more crawls per second.\nAlgolia prevents system overload by ensuring the number of URLs added in the last second and the number of URLs being processed is less than the rate limit:\n\n\n```\nmax(new_urls_added, active_urls_processing) <= rateLimit\n```\n\nStart with a low value (for example, 2) and increase it if you need faster crawling.\nBe aware that a high `rateLimit` can have a huge impact on bandwidth cost and server resource consumption.\n\nThe number of pages processed per second depends on the average time it takes to fetch, process, and upload a URL. \nFor a given `rateLimit` if fetching, processing, and uploading URLs takes (on average):\n\n- Less than a second, your crawler processes up to `rateLimit` pages per second.\n- Four seconds, your crawler processes up to `rateLimit / 4` pages per second.\n\nIn the latter case, increasing `rateLimit` improves performance, up to a point. \nHowever, if the processing time remains at four seconds, increasing `rateLimit` won't increase the number of pages processed per second.\n", + "minimum": 1, + "maximum": 100, + "example": 4 + }, + "renderJavaScript": { + "$ref": "#/components/schemas/renderJavaScript" + }, + "requestOptions": { + "$ref": "#/components/schemas/requestOptions" + }, + "safetyChecks": { + "$ref": "#/components/schemas/safetyChecks" + }, + "saveBackup": { + "type": "boolean", + "description": "Whether to back up your index before the crawler overwrites it with new records.\n" + }, + "schedule": { + "$ref": "#/components/schemas/schedule" + }, + "sitemaps": { + "type": "array", + "description": "Sitemaps with URLs from where to start crawling.", + "maxItems": 9999, + "items": { + "type": "string", + "example": "https://example.com/sitemap.xyz" + } + }, + "startUrls": { + "type": "array", + "description": "URLs from where to start crawling.", + "maxItems": 9999, + "items": { + "type": "string", + "example": "https://www.example.com" + } + } + } + }, + "createdAt": { + "type": "string", + "example": "2023-07-04T12:49:15Z", + "description": "Date and time when the object was created, in RFC 3339 format." + }, + "updatedAt": { + "type": "string", + "example": "2023-07-04T12:49:15Z", + "description": "Date and time when the object was updated, in RFC 3339 format." + }, + "BaseResponse": { + "title": "Without configuration", + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/CrawlerName" + }, + "createdAt": { + "$ref": "#/components/schemas/createdAt" + }, + "updatedAt": { + "$ref": "#/components/schemas/updatedAt" + }, + "running": { + "type": "boolean", + "description": "Whether this crawler is active." + }, + "reindexing": { + "type": "boolean", + "description": "Whether this crawler is completely reindexing your content." + }, + "blocked": { + "type": "boolean", + "description": "Whether this crawler is currently blocked.\n\nIf `true`, you can unblock it from the [Crawler page](https://dashboard.algolia.com/crawler) in the Algolia dashboard\nor by [cancelling the blocking task](#tag/tasks/operation/cancelBlockingAction).\n" + }, + "blockingError": { + "type": "string", + "description": "Reason why the crawler is blocked.", + "example": "Error: Failed to fetch external data for source 'testCSV': 404\n" + }, + "blockingTaskId": { + "type": "string", + "description": "ID of the task that's blocking the crawler." + }, + "lastReindexStartAt": { + "default": null, + "oneOf": [ + { + "type": "string", + "description": "Date and time when the last crawl started, in RFC 3339 format.", + "example": "2024-04-07T09:16:04Z" + }, + { + "type": "null" + } + ] + }, + "lastReindexEndedAt": { + "default": null, + "oneOf": [ + { + "type": "string", + "description": "Date and time when the last crawl finished, in RFC 3339 format." + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "name", + "createdAt", + "updatedAt", + "running", + "reindexing", + "blocked", + "lastReindexStartAt", + "lastReindexEndedAt" + ] + }, + "WithConfiguration": { + "title": "With configuration", + "allOf": [ + { + "$ref": "#/components/schemas/BaseResponse" + }, + { + "type": "object", + "properties": { + "config": { + "$ref": "#/components/schemas/Configuration" + } + } + } + ], + "required": [ + "name", + "createdAt", + "updatedAt", + "running", + "reindexing", + "blocked", + "lastReindexStartAt", + "lastReindexEndedAt", + "config" + ] + }, + "GetCrawlerResponse": { + "title": "API response for retrieving crawler information", + "oneOf": [ + { + "$ref": "#/components/schemas/BaseResponse" + }, + { + "$ref": "#/components/schemas/WithConfiguration" + } + ] + }, + "TaskID": { + "type": "string", + "description": "Universally unique identifier (UUID) of the task.", + "example": "98458796-b7bb-4703-8b1b-785c1080b110" + }, + "PartialConfig": { + "description": "Crawler configuration to update.\nYou can only update top-level configuration properties.\nTo update a nested configuration, such as `actions.recordExtractor`,\nyou must provide the complete top-level object such as `actions`.\n", + "allOf": [ + { + "$ref": "#/components/schemas/Configuration" + } + ] + }, + "urlsCrawledGroupStatus": { + "type": "string", + "description": "Crawled URL status.\n\nFor more information, see [Troubleshooting by crawl status](https://www.algolia.com/doc/tools/crawler/troubleshooting/crawl-status/).\n", + "enum": [ + "DONE", + "SKIPPED", + "FAILED" + ] + }, + "urlsCrawledGroupCategory": { + "type": "string", + "description": "Step where the status information was generated.\n\nFor more information, see [Troubleshooting by crawl status](https://www.algolia.com/doc/tools/crawler/troubleshooting/crawl-status/).\n", + "enum": [ + "fetch", + "extraction", + "indexing", + "success" + ] + }, + "UrlsCrawledGroup": { + "type": "object", + "description": "Processed URLs and their status.", + "properties": { + "status": { + "$ref": "#/components/schemas/urlsCrawledGroupStatus" + }, + "reason": { + "type": "string", + "description": "Reason for this status." + }, + "category": { + "$ref": "#/components/schemas/urlsCrawledGroupCategory" + }, + "count": { + "type": "integer", + "description": "Number of URLs with this status." + }, + "readable": { + "type": "string", + "description": "Reason for this status." + } + }, + "example": { + "status": "SKIPPED", + "reason": "forbidden_by_robotstxt", + "category": "fetch", + "count": 3, + "readable": "Forbidden by robots.txt" + } + }, + "version": { + "type": "integer", + "description": "Version of the configuration. Version 1 is the initial configuration you used when creating the crawler.", + "minimum": 1 + }, + "authorId": { + "type": "string", + "description": "Universally unique identifier (UUID) of the user who created this version of the configuration.", + "example": "7d79f0dd-2dab-4296-8098-957a1fdc0637" + }, + "crawlerConfigVersionsResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/Pagination" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "description": "Configuration changes.", + "items": { + "title": "crawlerConfigVersionsResponse", + "type": "object", + "properties": { + "version": { + "$ref": "#/components/schemas/version" + }, + "createdAt": { + "$ref": "#/components/schemas/createdAt" + }, + "authorId": { + "$ref": "#/components/schemas/authorId" + } + }, + "required": [ + "version", + "createdAt", + "authorId" + ] + } + } + } + } + ] + }, + "domainsResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/Pagination" + }, + { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "title": "domainResponse", + "type": "object", + "properties": { + "applicationId": { + "$ref": "#/components/schemas/applicationID" + }, + "domain": { + "type": "string", + "description": "Domain name which crawlers can access.", + "example": "wwww.algolia.com" + }, + "validated": { + "type": "boolean", + "description": "Whether the domain is validated." + } + } + } + } + } + } + ] + } + }, + "parameters": { + "ItemsPerPage": { + "name": "itemsPerPage", + "in": "query", + "description": "Number of items per page to retrieve.", + "schema": { + "$ref": "#/components/schemas/itemsPerPage" + } + }, + "Page": { + "name": "page", + "in": "query", + "description": "Page to retrieve.", + "schema": { + "$ref": "#/components/schemas/page" + } + }, + "Name": { + "name": "name", + "in": "query", + "description": "Name of the crawler for filtering the API response.", + "schema": { + "$ref": "#/components/schemas/CrawlerName" + } + }, + "AppID": { + "name": "appID", + "in": "query", + "description": "Algolia application ID for filtering the API response.", + "schema": { + "$ref": "#/components/schemas/applicationID" + } + }, + "CrawlerIdParameter": { + "name": "id", + "in": "path", + "description": "Crawler ID.", + "required": true, + "schema": { + "$ref": "#/components/schemas/CrawlerID" + } + }, + "CrawlerVersionParameter": { + "name": "version", + "in": "path", + "description": "This crawler's version nmber.", + "required": true, + "schema": { + "type": "integer" + } + }, + "TaskIdParameter": { + "name": "taskID", + "in": "path", + "description": "Task ID.", + "required": true, + "schema": { + "$ref": "#/components/schemas/TaskID" + } + } + }, + "responses": { + "InvalidRequest": { + "description": "Invalid request.", + "content": { + "application/json": { + "schema": { + "title": "invalidRequest", + "type": "object", + "properties": { + "error": { + "title": "invalidRequestError", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "title": "errorItem", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "line": { + "type": "integer" + }, + "position": { + "type": "integer" + } + }, + "required": [ + "message" + ], + "example": { + "message": "url is not defined", + "line": 5 + } + } + } + }, + "example": { + "code": "malformed_id" + } + } + }, + "required": [ + "error" + ] + } + } + } + }, + "MissingAuthorization": { + "description": "Authorization information is missing or invalid." + }, + "NoRightsOnCrawler": { + "description": "The user doesn't have enough rights on the specified Crawler, or it doesn't exists." + }, + "ActionAcknowledged": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "actionAcknowledged", + "type": "object", + "properties": { + "taskId": { + "$ref": "#/components/schemas/TaskID" + } + }, + "required": [ + "taskId" + ] + } + } + } + }, + "Forbidden": { + "description": "Invalid credentials.", + "content": { + "application/json": { + "schema": { + "title": "forbidden", + "type": "object", + "properties": { + "error": { + "title": "forbiddenError", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "title": "errorItem", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "line": { + "type": "integer" + }, + "position": { + "type": "integer" + } + }, + "required": [ + "message" + ], + "example": { + "message": "url is not defined", + "line": 5 + } + } + } + }, + "example": { + "code": "malformed_id" + } + } + }, + "required": [ + "error" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/data/ingestion.json b/src/data/ingestion.json index 8839266..37816c5 100644 --- a/src/data/ingestion.json +++ b/src/data/ingestion.json @@ -10,8 +10,11 @@ "url": "https://data.{region}.algolia.com", "variables": { "region": { - "enum": ["eu", "us"], - "description": "The region where your Algolia application is hosted (either eu or us).", + "description": "The region where your Algolia application is hosted.", + "enum": [ + "eu", + "us" + ], "default": "us" } } @@ -92,8 +95,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["ingestion"] + } }, "post": { "operationId": "customPost", @@ -140,8 +142,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["ingestion"] + } }, "put": { "operationId": "customPut", @@ -188,8 +189,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["ingestion"] + } }, "delete": { "operationId": "customDelete", @@ -226,17 +226,22 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["ingestion"] + } } }, "/1/authentications": { "get": { - "tags": ["ingestion"], + "tags": [ + "authentications" + ], "summary": "List authentication resources", "description": "Retrieves a list of all authentication resources.", "operationId": "listAuthentications", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/itemsPerPage" @@ -277,7 +282,10 @@ "$ref": "#/components/schemas/Pagination" } }, - "required": ["authentications", "pagination"] + "required": [ + "authentications", + "pagination" + ] } } } @@ -288,11 +296,17 @@ } }, "post": { - "tags": ["ingestion"], + "tags": [ + "authentications" + ], "summary": "Create an authentication resource", "description": "Creates a new authentication resource.", "operationId": "createAuthentication", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "requestBody": { "description": "", "content": { @@ -323,11 +337,17 @@ }, "/1/authentications/search": { "post": { - "tags": ["ingestion"], + "tags": [ + "authentications" + ], "summary": "Search for authentication resources", "description": "Searches for authentication resources.", "operationId": "searchAuthentications", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "requestBody": { "content": { "application/json": { @@ -361,11 +381,17 @@ }, "/1/authentications/{authenticationID}": { "get": { - "tags": ["ingestion"], + "tags": [ + "authentications" + ], "summary": "Retrieve an authentication resource", "description": "Retrieves an authentication resource by its ID.", "operationId": "getAuthentication", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathAuthenticationID" @@ -388,11 +414,17 @@ } }, "patch": { - "tags": ["ingestion"], + "tags": [ + "authentications" + ], "summary": "Update an authentication resource", "description": "Updates an authentication resource.", "operationId": "updateAuthentication", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathAuthenticationID" @@ -425,11 +457,17 @@ } }, "delete": { - "tags": ["ingestion"], + "tags": [ + "authentications" + ], "summary": "Delete an authentication resource", "description": "Deletes an authentication resource. You can't delete authentication resources that are used by a source or a destination.", "operationId": "deleteAuthentication", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathAuthenticationID" @@ -454,11 +492,18 @@ }, "/1/destinations": { "get": { - "tags": ["ingestion"], + "tags": [ + "destinations" + ], "summary": "List destinations", "description": "Retrieves a list of destinations.", "operationId": "listDestinations", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-mcp-tool": true, + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/itemsPerPage" @@ -502,7 +547,10 @@ "$ref": "#/components/schemas/Pagination" } }, - "required": ["destinations", "pagination"] + "required": [ + "destinations", + "pagination" + ] } } } @@ -513,11 +561,17 @@ } }, "post": { - "tags": ["ingestion"], + "tags": [ + "destinations" + ], "summary": "Create a destination", "description": "Creates a new destination.", "operationId": "createDestination", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "requestBody": { "description": "", "content": { @@ -548,11 +602,17 @@ }, "/1/destinations/search": { "post": { - "tags": ["ingestion"], + "tags": [ + "destinations" + ], "summary": "Search for destinations", "description": "Searches for destinations.", "operationId": "searchDestinations", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "requestBody": { "content": { "application/json": { @@ -586,11 +646,17 @@ }, "/1/destinations/{destinationID}": { "get": { - "tags": ["ingestion"], + "tags": [ + "destinations" + ], "summary": "Retrieve a destination", "description": "Retrieves a destination by its ID.", "operationId": "getDestination", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathDestinationID" @@ -613,11 +679,17 @@ } }, "patch": { - "tags": ["ingestion"], + "tags": [ + "destinations" + ], "summary": "Update a destination", "description": "Updates the destination by its ID.", "operationId": "updateDestination", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathDestinationID" @@ -650,11 +722,17 @@ } }, "delete": { - "tags": ["ingestion"], + "tags": [ + "destinations" + ], "summary": "Delete a destination", "description": "Deletes a destination by its ID. You can't delete destinations that are referenced in tasks.", "operationId": "deleteDestination", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathDestinationID" @@ -679,11 +757,18 @@ }, "/1/sources": { "get": { - "tags": ["ingestion"], + "tags": [ + "sources" + ], "summary": "List sources", "description": "Retrieves a list of sources.", "operationId": "listSources", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-mcp-tool": true, + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/itemsPerPage" @@ -724,7 +809,10 @@ "$ref": "#/components/schemas/Pagination" } }, - "required": ["sources", "pagination"] + "required": [ + "sources", + "pagination" + ] } } } @@ -735,11 +823,17 @@ } }, "post": { - "tags": ["ingestion"], + "tags": [ + "sources" + ], "summary": "Create a source", "description": "Creates a new source.", "operationId": "createSource", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "requestBody": { "description": "", "content": { @@ -770,11 +864,17 @@ }, "/1/sources/validate": { "post": { - "tags": ["ingestion"], + "tags": [ + "sources" + ], "summary": "Validates a source payload", "description": "Validates a source payload to ensure it can be created and that the data source can be reached by Algolia.\n", "operationId": "validateSource", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "x-timeouts": { "connect": 180000, "read": 180000, @@ -809,11 +909,17 @@ }, "/1/sources/search": { "post": { - "tags": ["ingestion"], + "tags": [ + "sources" + ], "summary": "Search for sources", "description": "Searches for sources.", "operationId": "searchSources", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "requestBody": { "content": { "application/json": { @@ -847,11 +953,17 @@ }, "/1/sources/{sourceID}": { "get": { - "tags": ["ingestion"], + "tags": [ + "sources" + ], "summary": "Retrieve a source", "description": "Retrieve a source by its ID.", "operationId": "getSource", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathSourceID" @@ -874,11 +986,17 @@ } }, "patch": { - "tags": ["ingestion"], + "tags": [ + "sources" + ], "summary": "Update a source", "description": "Updates a source by its ID.", "operationId": "updateSource", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathSourceID" @@ -911,11 +1029,17 @@ } }, "delete": { - "tags": ["ingestion"], + "tags": [ + "sources" + ], "summary": "Delete a source", "description": "Deletes a source by its ID. You can't delete sources that are referenced in tasks.", "operationId": "deleteSource", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathSourceID" @@ -940,11 +1064,17 @@ }, "/1/sources/{sourceID}/validate": { "post": { - "tags": ["ingestion"], + "tags": [ + "sources" + ], "summary": "Validates an update of a source payload", "description": "Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.\n", "operationId": "validateSourceBeforeUpdate", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "x-timeouts": { "connect": 180000, "read": 180000, @@ -984,11 +1114,17 @@ }, "/1/sources/{sourceID}/discover": { "post": { - "tags": ["ingestion"], + "tags": [ + "sources" + ], "summary": "Trigger a stream-listing request", "description": "Triggers a stream-listing request for a source.\nTriggering stream-listing requests only works with sources with `type: docker` and `imageType: airbyte`.\n", "operationId": "triggerDockerSourceDiscover", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "x-timeouts": { "connect": 180000, "read": 180000, @@ -1018,11 +1154,17 @@ }, "/1/sources/{sourceID}/run": { "post": { - "tags": ["ingestion"], + "tags": [ + "sources" + ], "summary": "Run all tasks linked to a source", "description": "Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.", "operationId": "runSource", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathSourceID" @@ -1058,7 +1200,10 @@ "$ref": "#/components/schemas/createdAt" } }, - "required": ["taskWithRunID", "createdAt"] + "required": [ + "taskWithRunID", + "createdAt" + ] } } } @@ -1071,11 +1216,18 @@ }, "/2/tasks": { "get": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "List tasks", "description": "Retrieves a list of tasks.", "operationId": "listTasks", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-mcp-tool": true, + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/itemsPerPage" @@ -1132,7 +1284,10 @@ "$ref": "#/components/schemas/Pagination" } }, - "required": ["tasks", "pagination"] + "required": [ + "tasks", + "pagination" + ] } } } @@ -1143,7 +1298,9 @@ } }, "post": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Create a task", "description": "Creates a new task.", "operationId": "createTask", @@ -1177,11 +1334,17 @@ }, "/2/tasks/search": { "post": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Search for tasks", "description": "Searches for tasks.", "operationId": "searchTasks", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "requestBody": { "content": { "application/json": { @@ -1215,11 +1378,17 @@ }, "/2/tasks/{taskID}": { "get": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Retrieve a task", "description": "Retrieves a task by its ID.", "operationId": "getTask", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathTaskID" @@ -1242,7 +1411,9 @@ } }, "patch": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Update a task", "description": "Updates a task by its ID.", "operationId": "updateTask", @@ -1278,7 +1449,9 @@ } }, "delete": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Delete a task", "description": "Deletes a task by its ID.", "operationId": "deleteTask", @@ -1306,11 +1479,17 @@ }, "/2/tasks/{taskID}/run": { "post": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Run a task", "description": "Runs a task. You can check the status of task runs with the observability endpoints.", "operationId": "runTask", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathTaskID" @@ -1335,11 +1514,17 @@ }, "/2/tasks/{taskID}/push": { "post": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Push a `batch` request payload through the Pipeline", "description": "Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.", "operationId": "pushTask", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "x-timeouts": { "connect": 180000, "read": 180000, @@ -1376,7 +1561,9 @@ "title": "pushTaskRecords", "type": "object", "additionalProperties": true, - "required": ["objectID"], + "required": [ + "objectID" + ], "properties": { "objectID": { "$ref": "#/components/schemas/objectID" @@ -1385,7 +1572,10 @@ } } }, - "required": ["action", "records"] + "required": [ + "action", + "records" + ] } } }, @@ -1410,11 +1600,17 @@ }, "/2/tasks/{taskID}/enable": { "put": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Enable a task", "description": "Enables a task.", "operationId": "enableTask", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathTaskID" @@ -1439,11 +1635,17 @@ }, "/2/tasks/{taskID}/disable": { "put": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Disable a task", "description": "Disables a task.", "operationId": "disableTask", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathTaskID" @@ -1468,12 +1670,18 @@ }, "/1/tasks": { "get": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "List tasks V1", "description": "Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead.", "operationId": "listTasksV1", "deprecated": true, - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/itemsPerPage" @@ -1524,7 +1732,10 @@ "$ref": "#/components/schemas/Pagination" } }, - "required": ["tasks", "pagination"] + "required": [ + "tasks", + "pagination" + ] } } } @@ -1535,7 +1746,9 @@ } }, "post": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Create a task V1", "description": "Creates a new task using the v1 endpoint, please use `createTask` instead.", "operationId": "createTaskV1", @@ -1571,12 +1784,18 @@ }, "/1/tasks/search": { "post": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Search for tasks V1", "description": "Searches for tasks using the v1 endpoint, please use `searchTasks` instead.", "operationId": "searchTasksV1", "deprecated": true, - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "requestBody": { "content": { "application/json": { @@ -1610,12 +1829,18 @@ }, "/1/tasks/{taskID}": { "get": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Retrieve a task V1", "description": "Retrieves a task by its ID using the v1 endpoint, please use `getTask` instead.", "operationId": "getTaskV1", "deprecated": true, - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathTaskID" @@ -1638,7 +1863,9 @@ } }, "patch": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Update a task V1", "description": "Updates a task by its ID using the v1 endpoint, please use `updateTask` instead.", "operationId": "updateTaskV1", @@ -1676,7 +1903,9 @@ } }, "delete": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Delete a task", "description": "Deletes a task by its ID using the v1 endpoint, please use `deleteTask` instead.", "operationId": "deleteTaskV1", @@ -1705,12 +1934,18 @@ }, "/1/tasks/{taskID}/run": { "post": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Run a task V1", "description": "Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints.", "operationId": "runTaskV1", "deprecated": true, - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathTaskID" @@ -1735,12 +1970,18 @@ }, "/1/tasks/{taskID}/enable": { "put": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Enable a task V1", "description": "Enables a task using the v1 endpoint, please use `enableTask` instead.", "operationId": "enableTaskV1", "deprecated": true, - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathTaskID" @@ -1765,12 +2006,18 @@ }, "/1/tasks/{taskID}/disable": { "put": { - "tags": ["ingestion"], + "tags": [ + "tasks" + ], "summary": "Disable a task V1", "description": "Disables a task using the v1 endpoint, please use `disableTask` instead.", "operationId": "disableTaskV1", "deprecated": true, - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathTaskID" @@ -1795,11 +2042,18 @@ }, "/1/transformations": { "get": { - "tags": ["ingestion"], + "tags": [ + "transformations" + ], "summary": "List transformations", - "description": "Retrieves a list of transformations. If region is \"de\", use \"eu\" as the region.", + "description": "Retrieves a list of transformations.", "operationId": "listTransformations", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-mcp-tool": true, + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/itemsPerPage" @@ -1835,7 +2089,10 @@ "$ref": "#/components/schemas/Pagination" } }, - "required": ["transformations", "pagination"] + "required": [ + "transformations", + "pagination" + ] } } } @@ -1846,7 +2103,9 @@ } }, "post": { - "tags": ["ingestion"], + "tags": [ + "transformations" + ], "summary": "Create a transformation", "description": "Creates a new transformation.", "operationId": "createTransformation", @@ -1880,11 +2139,17 @@ }, "/1/transformations/try": { "post": { - "tags": ["ingestion"], + "tags": [ + "transformations" + ], "summary": "Try a transformation before creating it", "description": "Try a transformation before creating it.", "operationId": "tryTransformation", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "requestBody": { "content": { "application/json": { @@ -1914,11 +2179,17 @@ }, "/1/transformations/search": { "post": { - "tags": ["ingestion"], + "tags": [ + "transformations" + ], "summary": "Search for transformations", "description": "Searches for transformations.", "operationId": "searchTransformations", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "requestBody": { "content": { "application/json": { @@ -1952,11 +2223,17 @@ }, "/1/transformations/{transformationID}": { "get": { - "tags": ["ingestion"], + "tags": [ + "transformations" + ], "summary": "Retrieve a transformation", "description": "Retrieves a transformation by its ID.", "operationId": "getTransformation", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathTransformationID" @@ -1979,7 +2256,9 @@ } }, "put": { - "tags": ["ingestion"], + "tags": [ + "transformations" + ], "summary": "Update a transformation", "description": "Updates a transformation by its ID.", "operationId": "updateTransformation", @@ -2015,7 +2294,9 @@ } }, "delete": { - "tags": ["ingestion"], + "tags": [ + "transformations" + ], "summary": "Delete a transformation", "description": "Deletes a transformation by its ID.", "operationId": "deleteTransformation", @@ -2043,11 +2324,17 @@ }, "/1/transformations/{transformationID}/try": { "post": { - "tags": ["ingestion"], + "tags": [ + "transformations" + ], "summary": "Try a transformation before updating it", "description": "Try a transformation before updating it.", "operationId": "tryTransformationBeforeUpdate", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathTransformationID" @@ -2082,11 +2369,17 @@ }, "/1/runs": { "get": { - "tags": ["ingestion"], + "tags": [ + "observability" + ], "summary": "List task runs", "description": "Retrieve a list of task runs.", "operationId": "listRuns", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/itemsPerPage" @@ -2145,11 +2438,17 @@ }, "/1/runs/{runID}": { "get": { - "tags": ["ingestion"], + "tags": [ + "observability" + ], "summary": "Retrieve a task run", "description": "Retrieve a single task run by its ID.", "operationId": "getRun", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathRunID" @@ -2174,11 +2473,17 @@ }, "/1/runs/{runID}/events": { "get": { - "tags": ["ingestion"], + "tags": [ + "observability" + ], "summary": "List task run events", "description": "Retrieves a list of events for a task run, identified by its ID.", "operationId": "listEvents", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathRunID" @@ -2241,7 +2546,11 @@ "$ref": "#/components/schemas/Window" } }, - "required": ["events", "pagination", "window"] + "required": [ + "events", + "pagination", + "window" + ] } } } @@ -2254,11 +2563,17 @@ }, "/1/runs/{runID}/events/{eventID}": { "get": { - "tags": ["ingestion"], + "tags": [ + "observability" + ], "summary": "Retrieve a task run event", "description": "Retrieves a single task run event by its ID.", "operationId": "getEvent", - "x-acl": ["addObject", "deleteIndex", "editSettings"], + "x-acl": [ + "addObject", + "deleteIndex", + "editSettings" + ], "parameters": [ { "$ref": "#/components/parameters/pathRunID" @@ -2288,7 +2603,9 @@ "get": { "x-helper": true, "x-asynchronous-helper": false, - "tags": ["ingestion"], + "tags": [ + "Api Key" + ], "operationId": "setClientApiKey", "summary": "Switch the API key used to authenticate requests", "description": "Switch the API key used to authenticate requests.\n", @@ -2507,7 +2824,10 @@ "items": { "$ref": "#/components/schemas/authenticationID" }, - "example": ["10000000-0a75-4000-a000-000000000001", "none"] + "example": [ + "10000000-0a75-4000-a000-000000000001", + "none" + ] } }, "sourceParameters_sort": { @@ -2789,7 +3109,11 @@ { "type": "string", "description": "Name of an ecommerce platform with which to authenticate.\nThis determines which authentication type you can select.\n", - "enum": ["bigcommerce", "commercetools", "shopify"] + "enum": [ + "bigcommerce", + "commercetools", + "shopify" + ] }, { "type": "null" @@ -2799,7 +3123,9 @@ "platformNone": { "type": "string", "description": "Authentication resource not tied to any ecommerce platform, used for filtering.", - "enum": ["none"] + "enum": [ + "none" + ] }, "platformWithNone": { "oneOf": [ @@ -2815,13 +3141,22 @@ "type": "string", "description": "Property by which to sort the list of authentications.", "default": "createdAt", - "enum": ["name", "type", "platform", "updatedAt", "createdAt"] + "enum": [ + "name", + "type", + "platform", + "updatedAt", + "createdAt" + ] }, "orderKeys": { "type": "string", "description": "Ascending or descending sort order.", "default": "desc", - "enum": ["asc", "desc"] + "enum": [ + "asc", + "desc" + ] }, "authenticationID": { "type": "string", @@ -2858,7 +3193,9 @@ "description": "Private key of the Google service account. This field is `null` in the API response." } }, - "x-discriminator-fields": ["clientEmail"] + "x-discriminator-fields": [ + "clientEmail" + ] }, "AuthBasicPartial": { "type": "object", @@ -2874,7 +3211,9 @@ "description": "Password. This field is `null` in the API response." } }, - "x-discriminator-fields": ["username"] + "x-discriminator-fields": [ + "username" + ] }, "AuthAPIKeyPartial": { "type": "object", @@ -2886,7 +3225,9 @@ "description": "API key. This field is `null` in the API response." } }, - "x-discriminator-fields": ["key"] + "x-discriminator-fields": [ + "key" + ] }, "AuthOAuthPartial": { "type": "object", @@ -2911,14 +3252,16 @@ "description": "OAuth scope." } }, - "x-discriminator-fields": ["url"] + "x-discriminator-fields": [ + "url" + ] }, "AuthAlgoliaPartial": { "type": "object", "description": "Credentials for authenticating with Algolia.", "additionalProperties": false, "properties": { - "applicationId": { + "appID": { "type": "string", "description": "Algolia application ID." }, @@ -2933,7 +3276,7 @@ "additionalProperties": false, "description": "Credentials for authenticating with the Algolia Insights API.", "properties": { - "applicationId": { + "appID": { "type": "string", "description": "Algolia application ID." }, @@ -3013,7 +3356,14 @@ "$ref": "#/components/schemas/updatedAt" } }, - "required": ["authenticationID", "type", "name", "input", "createdAt", "updatedAt"] + "required": [ + "authenticationID", + "type", + "name", + "input", + "createdAt", + "updatedAt" + ] }, "Pagination": { "type": "object", @@ -3037,7 +3387,12 @@ "$ref": "#/components/schemas/itemsPerPage" } }, - "required": ["nbPages", "page", "nbItems", "itemsPerPage"] + "required": [ + "nbPages", + "page", + "nbItems", + "itemsPerPage" + ] }, "AuthGoogleServiceAccount": { "type": "object", @@ -3054,8 +3409,14 @@ "description": "Private key of the Google service account. This field is `null` in the API response." } }, - "required": ["clientEmail", "privateKey"], - "x-discriminator-fields": ["clientEmail", "privateKey"] + "required": [ + "clientEmail", + "privateKey" + ], + "x-discriminator-fields": [ + "clientEmail", + "privateKey" + ] }, "AuthBasic": { "type": "object", @@ -3071,8 +3432,14 @@ "description": "Password. This field is `null` in the API response." } }, - "required": ["username", "password"], - "x-discriminator-fields": ["username", "password"] + "required": [ + "username", + "password" + ], + "x-discriminator-fields": [ + "username", + "password" + ] }, "AuthAPIKey": { "type": "object", @@ -3084,8 +3451,12 @@ "description": "API key. This field is `null` in the API response." } }, - "required": ["key"], - "x-discriminator-fields": ["key"] + "required": [ + "key" + ], + "x-discriminator-fields": [ + "key" + ] }, "AuthOAuth": { "type": "object", @@ -3110,15 +3481,23 @@ "description": "OAuth scope." } }, - "required": ["url", "client_id", "client_secret"], - "x-discriminator-fields": ["url", "client_id", "client_secret"] + "required": [ + "url", + "client_id", + "client_secret" + ], + "x-discriminator-fields": [ + "url", + "client_id", + "client_secret" + ] }, "AuthAlgolia": { "type": "object", "additionalProperties": false, "description": "Credentials for authenticating with Algolia.", "properties": { - "applicationId": { + "appID": { "type": "string", "description": "Algolia application ID." }, @@ -3127,14 +3506,17 @@ "description": "Algolia API key with the ACL: `addObject`, `deleteObject`, `settings`, `editSettings`, `listIndexes`, `deleteIndex`.\nThis field is `null` in the API response.\n" } }, - "required": ["appID", "apiKey"] + "required": [ + "appID", + "apiKey" + ] }, "AuthAlgoliaInsights": { "type": "object", "additionalProperties": false, "description": "Credentials for authenticating with the Algolia Insights API.", "properties": { - "applicationId": { + "appID": { "type": "string", "description": "Algolia application ID." }, @@ -3143,7 +3525,10 @@ "description": "Algolia API key with the ACL: `search`.\nThis field is `null` in the API response.\n" } }, - "required": ["appID", "apiKey"] + "required": [ + "appID", + "apiKey" + ] }, "AuthInput": { "oneOf": [ @@ -3188,7 +3573,11 @@ "$ref": "#/components/schemas/AuthInput" } }, - "required": ["type", "name", "input"] + "required": [ + "type", + "name", + "input" + ] }, "AuthenticationCreateResponse": { "type": "object", @@ -3205,7 +3594,11 @@ "$ref": "#/components/schemas/createdAt" } }, - "required": ["authenticationID", "name", "createdAt"] + "required": [ + "authenticationID", + "name", + "createdAt" + ] }, "AuthenticationSearch": { "type": "object", @@ -3219,7 +3612,9 @@ } } }, - "required": ["authenticationIDs"] + "required": [ + "authenticationIDs" + ] }, "DeleteResponse": { "type": "object", @@ -3229,7 +3624,9 @@ "description": "Date of deletion in RFC 3339 format." } }, - "required": ["deletedAt"] + "required": [ + "deletedAt" + ] }, "AuthenticationUpdate": { "type": "object", @@ -3265,12 +3662,19 @@ "$ref": "#/components/schemas/updatedAt" } }, - "required": ["authenticationID", "name", "updatedAt"] + "required": [ + "authenticationID", + "name", + "updatedAt" + ] }, "DestinationType": { "type": "string", "description": "Destination type.\n\n- `search`.\n Data is stored in an Algolia index.\n\n- `insights`.\n Data is recorded as user events in the Insights API.\n", - "enum": ["search", "insights"] + "enum": [ + "search", + "insights" + ] }, "transformationID": { "type": "string", @@ -3281,7 +3685,12 @@ "type": "string", "description": "Property by which to sort the destinations.", "default": "createdAt", - "enum": ["name", "type", "updatedAt", "createdAt"] + "enum": [ + "name", + "type", + "updatedAt", + "createdAt" + ] }, "destinationID": { "type": "string", @@ -3291,7 +3700,11 @@ "RecordType": { "type": "string", "description": "Record type for ecommerce sources.", - "enum": ["product", "variant", "collection"] + "enum": [ + "product", + "variant", + "collection" + ] }, "AttributesToExclude": { "type": "array", @@ -3300,7 +3713,7 @@ "type": "string" } }, - "DestinationIndexName": { + "DestinationInput": { "type": "object", "additionalProperties": false, "properties": { @@ -3315,13 +3728,8 @@ "$ref": "#/components/schemas/AttributesToExclude" } }, - "required": ["indexName"] - }, - "DestinationInput": { - "oneOf": [ - { - "$ref": "#/components/schemas/DestinationIndexName" - } + "required": [ + "indexName" ] }, "transformationIDs": { @@ -3363,7 +3771,14 @@ "$ref": "#/components/schemas/transformationIDs" } }, - "required": ["destinationID", "type", "name", "input", "createdAt", "updatedAt"] + "required": [ + "destinationID", + "type", + "name", + "input", + "createdAt", + "updatedAt" + ] }, "DestinationCreate": { "type": "object", @@ -3386,7 +3801,11 @@ "$ref": "#/components/schemas/transformationIDs" } }, - "required": ["type", "name", "input"] + "required": [ + "type", + "name", + "input" + ] }, "DestinationCreateResponse": { "type": "object", @@ -3403,7 +3822,11 @@ "$ref": "#/components/schemas/createdAt" } }, - "required": ["destinationID", "name", "createdAt"] + "required": [ + "destinationID", + "name", + "createdAt" + ] }, "DestinationSearch": { "type": "object", @@ -3417,7 +3840,9 @@ } } }, - "required": ["destinationIDs"] + "required": [ + "destinationIDs" + ] }, "DestinationUpdate": { "type": "object", @@ -3456,7 +3881,11 @@ "$ref": "#/components/schemas/updatedAt" } }, - "required": ["destinationID", "name", "updatedAt"] + "required": [ + "destinationID", + "name", + "updatedAt" + ] }, "SourceType": { "type": "string", @@ -3476,7 +3905,12 @@ "type": "string", "description": "Property by which to sort the list of sources.", "default": "createdAt", - "enum": ["name", "type", "updatedAt", "createdAt"] + "enum": [ + "name", + "type", + "updatedAt", + "createdAt" + ] }, "sourceID": { "type": "string", @@ -3572,8 +4006,13 @@ "$ref": "#/components/schemas/CommercetoolsCustomFields" } }, - "required": ["url", "projectKey"], - "x-discriminator-fields": ["projectKey"] + "required": [ + "url", + "projectKey" + ], + "x-discriminator-fields": [ + "projectKey" + ] }, "BigCommerceChannel": { "type": "object", @@ -3586,7 +4025,10 @@ "currencies": { "type": "array", "description": "Currencies for the given channel.", - "example": ["usd", "eur"], + "example": [ + "usd", + "eur" + ], "items": { "type": "string", "description": "Three-letter code for the currency.", @@ -3594,7 +4036,9 @@ } } }, - "required": ["id"] + "required": [ + "id" + ] }, "BigCommerceMetafield": { "type": "object", @@ -3609,7 +4053,10 @@ "description": "Key identifier of the metafield." } }, - "required": ["namespace", "key"] + "required": [ + "namespace", + "key" + ] }, "SourceBigCommerce": { "type": "object", @@ -3641,8 +4088,12 @@ } } }, - "required": ["storeHash"], - "x-discriminator-fields": ["storeHash"] + "required": [ + "storeHash" + ], + "x-discriminator-fields": [ + "storeHash" + ] }, "UniqueIDColumn": { "type": "string", @@ -3651,7 +4102,10 @@ "MethodType": { "type": "string", "description": "HTTP method to be used for retrieving your data.", - "enum": ["GET", "POST"] + "enum": [ + "GET", + "POST" + ] }, "SourceJSON": { "type": "object", @@ -3668,11 +4122,19 @@ "$ref": "#/components/schemas/MethodType" } }, - "required": ["url"] + "required": [ + "url" + ] }, "MappingTypeCSV": { "type": "string", - "enum": ["string", "integer", "float", "boolean", "json"] + "enum": [ + "string", + "integer", + "float", + "boolean", + "json" + ] }, "SourceCSV": { "type": "object", @@ -3704,11 +4166,16 @@ "description": "The character used to split the value on each line, default to a comma (\\r, \\n, 0xFFFD, and space are forbidden)." } }, - "required": ["url"] + "required": [ + "url" + ] }, "BigQueryDataType": { "type": "string", - "enum": ["ga4", "ga360"] + "enum": [ + "ga4", + "ga360" + ] }, "SourceBigQuery": { "type": "object", @@ -3741,8 +4208,13 @@ "$ref": "#/components/schemas/UniqueIDColumn" } }, - "required": ["projectID", "datasetID"], - "x-discriminator-fields": ["projectID"] + "required": [ + "projectID", + "datasetID" + ], + "x-discriminator-fields": [ + "projectID" + ] }, "SourceGA4BigQueryExport": { "type": "object", @@ -3762,8 +4234,16 @@ "example": "events_intraday_" } }, - "required": ["projectID", "datasetID", "tablePrefix"], - "x-discriminator-fields": ["projectID", "datasetID", "tablePrefix"] + "required": [ + "projectID", + "datasetID", + "tablePrefix" + ], + "x-discriminator-fields": [ + "projectID", + "datasetID", + "tablePrefix" + ] }, "SourceDocker": { "type": "object", @@ -3779,8 +4259,14 @@ "description": "Configuration of the spec." } }, - "required": ["image", "configuration"], - "x-discriminator-fields": ["image", "configuration"] + "required": [ + "image", + "configuration" + ], + "x-discriminator-fields": [ + "image", + "configuration" + ] }, "SourceUpdateShopify": { "type": "object", @@ -3802,8 +4288,12 @@ "description": "URL of the Shopify store." } }, - "required": ["shopURL"], - "x-discriminator-fields": ["shopURL"] + "required": [ + "shopURL" + ], + "x-discriminator-fields": [ + "shopURL" + ] }, "SourceShopify": { "allOf": [ @@ -3872,7 +4362,13 @@ "$ref": "#/components/schemas/updatedAt" } }, - "required": ["sourceID", "type", "name", "createdAt", "updatedAt"] + "required": [ + "sourceID", + "type", + "name", + "createdAt", + "updatedAt" + ] }, "SourceCreate": { "type": "object", @@ -3892,7 +4388,10 @@ "$ref": "#/components/schemas/authenticationID" } }, - "required": ["type", "name"] + "required": [ + "type", + "name" + ] }, "SourceCreateResponse": { "type": "object", @@ -3909,7 +4408,11 @@ "$ref": "#/components/schemas/createdAt" } }, - "required": ["sourceID", "name", "createdAt"] + "required": [ + "sourceID", + "name", + "createdAt" + ] }, "runID": { "type": "string", @@ -3925,7 +4428,14 @@ "oneOf": [ { "type": "string", - "enum": ["created", "started", "retried", "failed", "succeeded", "critical"] + "enum": [ + "created", + "started", + "retried", + "failed", + "succeeded", + "critical" + ] }, { "type": "null" @@ -3934,7 +4444,12 @@ }, "EventType": { "type": "string", - "enum": ["fetch", "record", "log", "transform"] + "enum": [ + "fetch", + "record", + "log", + "transform" + ] }, "publishedAt": { "type": "string", @@ -3979,7 +4494,14 @@ "$ref": "#/components/schemas/publishedAt" } }, - "required": ["eventID", "runID", "status", "type", "batchSize", "publishedAt"] + "required": [ + "eventID", + "runID", + "status", + "type", + "batchSize", + "publishedAt" + ] }, "WatchResponse": { "type": "object", @@ -4007,7 +4529,9 @@ "type": "string" } }, - "required": ["runID"] + "required": [ + "runID" + ] }, "SourceSearch": { "type": "object", @@ -4020,7 +4544,9 @@ } } }, - "required": ["sourceIDs"] + "required": [ + "sourceIDs" + ] }, "SourceUpdateCommercetools": { "type": "object", @@ -4068,8 +4594,12 @@ "description": "Configuration of the spec." } }, - "required": ["configuration"], - "x-discriminator-fields": ["configuration"] + "required": [ + "configuration" + ], + "x-discriminator-fields": [ + "configuration" + ] }, "SourceUpdateInput": { "oneOf": [ @@ -4127,12 +4657,19 @@ "$ref": "#/components/schemas/updatedAt" } }, - "required": ["sourceID", "name", "updatedAt"] + "required": [ + "sourceID", + "name", + "updatedAt" + ] }, "EntityType": { "type": "string", "description": "Type of entity to update.", - "enum": ["product", "collection"] + "enum": [ + "product", + "collection" + ] }, "RunSourcePayload": { "type": "object", @@ -4167,18 +4704,34 @@ "ActionType": { "type": "string", "description": "Action to perform on the Algolia index.", - "enum": ["replace", "save", "partial", "append"] + "enum": [ + "replace", + "save", + "partial", + "append" + ] }, "TriggerType": { "type": "string", "description": "Task trigger, describing when a task should run.\n\n- `onDemand`.\n Manually trigger the task with the `/run` endpoint.\n\n- `schedule`.\n Regularly trigger the task on a `cron` schedule.\n\n- `subscription`.\n Trigger the task after an event is received, such as, a webhook.\n\n- `streaming`.\n Run the task continuously.\n", - "enum": ["onDemand", "schedule", "subscription", "streaming"] + "enum": [ + "onDemand", + "schedule", + "subscription", + "streaming" + ] }, "taskSortKeys": { "type": "string", "description": "Property by which to sort the list of tasks.", "default": "createdAt", - "enum": ["enabled", "triggerType", "action", "updatedAt", "createdAt"] + "enum": [ + "enabled", + "triggerType", + "action", + "updatedAt", + "createdAt" + ] }, "taskID": { "type": "string", @@ -4201,7 +4754,9 @@ "MappingFormatSchema": { "type": "string", "description": "Mapping format schema.", - "enum": ["mappingkit/v1"] + "enum": [ + "mappingkit/v1" + ] }, "MappingFieldDirective": { "type": "object", @@ -4218,7 +4773,10 @@ "description": "How the destination field should be resolved from the source." } }, - "required": ["fieldKey", "value"] + "required": [ + "fieldKey", + "value" + ] }, "MappingKitAction": { "type": "object", @@ -4244,7 +4802,11 @@ } } }, - "required": ["enabled", "trigger", "fieldDirectives"] + "required": [ + "enabled", + "trigger", + "fieldDirectives" + ] }, "MappingInput": { "type": "object", @@ -4261,8 +4823,14 @@ } } }, - "required": ["format", "actions"], - "x-discriminator-fields": ["format", "actions"] + "required": [ + "format", + "actions" + ], + "x-discriminator-fields": [ + "format", + "actions" + ] }, "StreamingInput": { "type": "object", @@ -4273,13 +4841,20 @@ "$ref": "#/components/schemas/MappingInput" } }, - "required": ["mapping"], - "x-discriminator-fields": ["mapping"] + "required": [ + "mapping" + ], + "x-discriminator-fields": [ + "mapping" + ] }, "DockerStreamsSyncMode": { "type": "string", "description": "The strategy to use to fetch the data.", - "enum": ["incremental", "fullTable"] + "enum": [ + "incremental", + "fullTable" + ] }, "DockerStreams": { "type": "object", @@ -4299,7 +4874,10 @@ "$ref": "#/components/schemas/DockerStreamsSyncMode" } }, - "required": ["name", "syncMode"] + "required": [ + "name", + "syncMode" + ] }, "DockerStreamsInput": { "description": "The selected streams of an airbyte connector.", @@ -4312,8 +4890,12 @@ } } }, - "required": ["streams"], - "x-discriminator-fields": ["streams"] + "required": [ + "streams" + ], + "x-discriminator-fields": [ + "streams" + ] }, "ShopifyMetafield": { "type": "object", @@ -4330,7 +4912,11 @@ "type": "string" } }, - "required": ["namespace", "key", "value"] + "required": [ + "namespace", + "key", + "value" + ] }, "ShopifyMarket": { "type": "object", @@ -4356,7 +4942,11 @@ } } }, - "required": ["countries", "currencies", "locales"] + "required": [ + "countries", + "currencies", + "locales" + ] }, "ShopifyInput": { "type": "object", @@ -4373,7 +4963,10 @@ "$ref": "#/components/schemas/ShopifyMarket" } }, - "required": ["metafields", "market"] + "required": [ + "metafields", + "market" + ] }, "TaskInput": { "description": "Configuration of the task, depending on its type.", @@ -4416,7 +5009,9 @@ } } }, - "required": ["email"] + "required": [ + "email" + ] }, "Policies": { "type": "object", @@ -4489,7 +5084,14 @@ "$ref": "#/components/schemas/updatedAt" } }, - "required": ["taskID", "sourceID", "destinationID", "enabled", "createdAt", "updatedAt"] + "required": [ + "taskID", + "sourceID", + "destinationID", + "enabled", + "createdAt", + "updatedAt" + ] }, "TaskCreate": { "type": "object", @@ -4531,7 +5133,11 @@ "$ref": "#/components/schemas/Policies" } }, - "required": ["sourceID", "destinationID", "action"] + "required": [ + "sourceID", + "destinationID", + "action" + ] }, "TaskCreateResponse": { "type": "object", @@ -4545,7 +5151,10 @@ "$ref": "#/components/schemas/createdAt" } }, - "required": ["taskID", "createdAt"] + "required": [ + "taskID", + "createdAt" + ] }, "TaskSearch": { "type": "object", @@ -4558,7 +5167,9 @@ } } }, - "required": ["taskIDs"] + "required": [ + "taskIDs" + ] }, "TaskUpdate": { "type": "object", @@ -4604,7 +5215,10 @@ "$ref": "#/components/schemas/updatedAt" } }, - "required": ["taskID", "updatedAt"] + "required": [ + "taskID", + "updatedAt" + ] }, "RunResponse": { "type": "object", @@ -4618,7 +5232,10 @@ "$ref": "#/components/schemas/createdAt" } }, - "required": ["runID", "createdAt"] + "required": [ + "runID", + "createdAt" + ] }, "action": { "type": "string", @@ -4641,7 +5258,9 @@ "OnDemandTriggerType": { "type": "string", "description": "Task is run manually, with the `/run` endpoint.", - "enum": ["onDemand"] + "enum": [ + "onDemand" + ] }, "OnDemandTrigger": { "type": "object", @@ -4655,12 +5274,16 @@ "$ref": "#/components/schemas/LastRun" } }, - "required": ["type"] + "required": [ + "type" + ] }, "ScheduleTriggerType": { "type": "string", "description": "Task runs on a schedule.", - "enum": ["schedule"] + "enum": [ + "schedule" + ] }, "ScheduleTrigger": { "type": "object", @@ -4680,12 +5303,18 @@ "$ref": "#/components/schemas/NextRun" } }, - "required": ["type", "cron", "nextRun"] + "required": [ + "type", + "cron", + "nextRun" + ] }, "SubscriptionTriggerType": { "type": "string", "description": "Task runs after receiving subscribed event.", - "enum": ["subscription"] + "enum": [ + "subscription" + ] }, "SubscriptionTrigger": { "type": "object", @@ -4696,12 +5325,16 @@ "$ref": "#/components/schemas/SubscriptionTriggerType" } }, - "required": ["type"] + "required": [ + "type" + ] }, "StreamingTriggerType": { "type": "string", "description": "Task runs continuously.", - "enum": ["streaming"] + "enum": [ + "streaming" + ] }, "StreamingTrigger": { "type": "object", @@ -4712,7 +5345,9 @@ "$ref": "#/components/schemas/StreamingTriggerType" } }, - "required": ["type"] + "required": [ + "type" + ] }, "Trigger": { "description": "Trigger that runs the task.", @@ -4798,7 +5433,9 @@ "$ref": "#/components/schemas/OnDemandTriggerType" } }, - "required": ["type"] + "required": [ + "type" + ] }, "ScheduleTriggerInput": { "type": "object", @@ -4812,8 +5449,13 @@ "$ref": "#/components/schemas/Cron" } }, - "required": ["type", "cron"], - "x-discriminator-fields": ["cron"] + "required": [ + "type", + "cron" + ], + "x-discriminator-fields": [ + "cron" + ] }, "TaskCreateTrigger": { "oneOf": [ @@ -4863,7 +5505,12 @@ "$ref": "#/components/schemas/cursor" } }, - "required": ["sourceID", "destinationID", "trigger", "action"] + "required": [ + "sourceID", + "destinationID", + "trigger", + "action" + ] }, "TriggerUpdateInput": { "type": "object", @@ -4874,7 +5521,9 @@ "$ref": "#/components/schemas/Cron" } }, - "required": ["cron"] + "required": [ + "cron" + ] }, "TaskUpdateV1": { "type": "object", @@ -4904,7 +5553,11 @@ "type": "string", "description": "Property by which to sort the list of transformations.", "default": "createdAt", - "enum": ["name", "updatedAt", "createdAt"] + "enum": [ + "name", + "updatedAt", + "createdAt" + ] }, "AuthenticationIDs": { "description": "The authentications associated with the current transformation.", @@ -4954,7 +5607,13 @@ "$ref": "#/components/schemas/updatedAt" } }, - "required": ["transformationID", "code", "name", "createdAt", "updatedAt"] + "required": [ + "transformationID", + "code", + "name", + "createdAt", + "updatedAt" + ] }, "TransformationCreate": { "type": "object", @@ -4974,7 +5633,10 @@ "$ref": "#/components/schemas/AuthenticationIDs" } }, - "required": ["code", "name"] + "required": [ + "code", + "name" + ] }, "TransformationCreateResponse": { "type": "object", @@ -4988,7 +5650,10 @@ "$ref": "#/components/schemas/createdAt" } }, - "required": ["transformationID", "createdAt"] + "required": [ + "transformationID", + "createdAt" + ] }, "TransformationTry": { "type": "object", @@ -5008,7 +5673,10 @@ } } }, - "required": ["code", "sampleRecord"] + "required": [ + "code", + "sampleRecord" + ] }, "TransformationTryResponse": { "type": "object", @@ -5037,7 +5705,9 @@ } } }, - "required": ["payloads"] + "required": [ + "payloads" + ] }, "TransformationSearch": { "type": "object", @@ -5050,7 +5720,9 @@ } } }, - "required": ["transformationIDs"] + "required": [ + "transformationIDs" + ] }, "TransformationUpdateResponse": { "type": "object", @@ -5064,28 +5736,50 @@ "$ref": "#/components/schemas/updatedAt" } }, - "required": ["transformationID", "updatedAt"] + "required": [ + "transformationID", + "updatedAt" + ] }, "RunStatus": { "type": "string", "description": "Task run status.", - "enum": ["created", "started", "idled", "finished", "skipped"] + "enum": [ + "created", + "started", + "idled", + "finished", + "skipped" + ] }, "RunType": { "type": "string", "description": "Task run type.", - "enum": ["reindex", "update", "discover", "validate", "push"] + "enum": [ + "reindex", + "update", + "discover", + "validate", + "push" + ] }, "runSortKeys": { "type": "string", "description": "Property by which to sort the list of task runs.", "default": "createdAt", - "enum": ["status", "updatedAt", "createdAt"] + "enum": [ + "status", + "updatedAt", + "createdAt" + ] }, "RunOutcome": { "type": "string", "description": "Task run outcome.", - "enum": ["success", "failure"] + "enum": [ + "success", + "failure" + ] }, "RunReasonCode": { "type": "string", @@ -5115,7 +5809,7 @@ "runID": { "$ref": "#/components/schemas/runID" }, - "applicationId": { + "appID": { "type": "string" }, "taskID": { @@ -5136,7 +5830,10 @@ "type": "integer" } }, - "required": ["expectedNbOfEvents", "receivedNbOfEvents"] + "required": [ + "expectedNbOfEvents", + "receivedNbOfEvents" + ] }, "outcome": { "$ref": "#/components/schemas/RunOutcome" @@ -5164,7 +5861,14 @@ "$ref": "#/components/schemas/finishedAt" } }, - "required": ["runID", "appID", "taskID", "status", "type", "createdAt"] + "required": [ + "runID", + "appID", + "taskID", + "status", + "type", + "createdAt" + ] }, "Window": { "type": "object", @@ -5180,7 +5884,10 @@ "description": "Date in RFC 3339 format representing the newest data in the time window." } }, - "required": ["startDate", "endDate"] + "required": [ + "startDate", + "endDate" + ] }, "RunListResponse": { "type": "object", @@ -5199,12 +5906,20 @@ "$ref": "#/components/schemas/Window" } }, - "required": ["runs", "pagination", "window"] + "required": [ + "runs", + "pagination", + "window" + ] }, "eventSortKeys": { "type": "string", "description": "Property by which to sort the list of task run events.", - "enum": ["status", "type", "publishedAt"] + "enum": [ + "status", + "type", + "publishedAt" + ] } }, "responses": { @@ -5275,4 +5990,4 @@ "write": 25000 } } -} +} \ No newline at end of file diff --git a/src/data/insights.json b/src/data/insights.json new file mode 100644 index 0000000..370f431 --- /dev/null +++ b/src/data/insights.json @@ -0,0 +1,1843 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Insights API", + "description": "The Insights API lets you collect events related to your search and discovery experience.\nEvents represent user interactions with your app or website.\nThey unlock powerful features, such as recommendations, personalization, smarter search results,\nand analytics that help you optimize your user experience.\n\n## Client libraries\n\nUse Algolia's API clients, libraries, and integrations to collect events from your UI and send them to the Insights API.\nSee: [Algolia's ecosystem](https://www.algolia.com/doc/guides/getting-started/how-algolia-works/in-depth/ecosystem/).\n\n## Base URLs\n\nThe base URLs for making requests to the Insights API are:\n\n- `https://insights.us.algolia.io`\n- `https://insights.de.algolia.io`\n- `https//insights.algolia.io` (routes requests to the closest of the above servers, based on your geographical location)\n\n**All requests must use HTTPS.**\n\n## Authentication\n\nTo authenticate your API requests, add these headers:\n\n- `x-algolia-application-id`. Your Algolia application ID.\n- `x-algolia-api-key`. An API key with the necessary permissions to make the request.\n The required access control list (ACL) to make a request is listed in each endpoint's reference.\n\nYou can find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account).\n\n## Request format\n\nRequest bodies must be JSON objects.\n\n## Response status and errors\n\nResponse bodies are JSON objects.\nDeleting a user token returns an empty response body with rate-limiting information as headers.\n\nSuccessful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status.\nError responses have a `message` property with more information.\n\nThe Insights API doesn't validate if the event parameters such as `indexName`, `objectIDs`, or `userToken`,\ncorrespond to anything in the Search API. It just checks if they're formatted correctly.\nCheck the [Events](https://dashboard.algolia.com/events/health) health section,\nwhether your events can be used for Algolia features such as Analytics, or Dynamic Re-Ranking.\n\n## Version\n\nThe current version of the Insights API is version 1, as indicated by the `/1/` in each endpoint's URL.\n", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://insights.{region}.algolia.io", + "variables": { + "region": { + "description": "The region where your Algolia application is hosted.", + "enum": [ + "us", + "de" + ], + "default": "us" + } + } + }, + { + "url": "https://insights.algolia.io" + } + ], + "security": [ + { + "applicationId": [], + "apiKey": [] + } + ], + "tags": [ + { + "name": "events", + "x-displayName": "Events", + "description": "Events represent user interactions with your website or app. They include details like the event's name, type, a timestamp, or a user token." + }, + { + "name": "usertokens", + "x-displayName": "User tokens", + "description": "Delete events related to a specific user token.\n" + } + ], + "externalDocs": { + "url": "https://www.algolia.com/doc/guides/sending-events/getting-started/", + "description": "Events" + }, + "paths": { + "/{path}": { + "get": { + "operationId": "customGet", + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + }, + "post": { + "operationId": "customPost", + "requestBody": { + "description": "Parameters to send with the custom request.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + }, + "put": { + "operationId": "customPut", + "requestBody": { + "description": "Parameters to send with the custom request.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + }, + "delete": { + "operationId": "customDelete", + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + } + }, + "/1/events": { + "post": { + "tags": [ + "events" + ], + "operationId": "pushEvents", + "summary": "Send events", + "x-acl": [ + "search" + ], + "description": "Sends a list of events to the Insights API.\n\nYou can include up to 1,000 events in a single request,\nbut the request body must be smaller than 2 MB.\n", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "insightsEvents", + "type": "object", + "additionalProperties": false, + "required": [ + "events" + ], + "properties": { + "events": { + "type": "array", + "description": "Click and conversion events.\n\n**All** events must be valid, otherwise the API returns an error.\n", + "minItems": 1, + "maxItems": 1000, + "items": { + "$ref": "#/components/schemas/EventsItems" + } + } + } + }, + "examples": { + "ClickObjectIDsAfterSearch": { + "summary": "Click event after search requests", + "value": { + "events": [ + { + "eventName": "Products Clicked", + "eventType": "click", + "index": "test-index", + "userToken": "anonymous-user-1", + "authenticatedUserToken": "user-1", + "objectIDs": [ + "object-1" + ], + "positions": [ + 1 + ], + "queryID": "7dfe2ada7bca48bdd0629649df0bee07" + } + ] + } + }, + "ConversionObjectIDsAfterSearch": { + "summary": "Conversion event after search or browse requests", + "value": { + "events": [ + { + "eventName": "Articles Liked", + "eventType": "conversion", + "index": "test-index", + "userToken": "anonymous-user-1", + "authenticatedUserToken": "user-1", + "objectIDs": [ + "article-1" + ], + "queryID": "7dfe2ada7bca48bdd0629649df0bee07" + } + ] + } + }, + "AddedToCartAfterSearch": { + "summary": "Add-to-cart event after search or browse requests", + "value": { + "events": [ + { + "eventName": "Products Added To Cart", + "eventType": "conversion", + "eventSubtype": "addToCart", + "index": "test-index", + "userToken": "anonymous-user-1", + "authenticatedUserToken": "user-1", + "objectIDs": [ + "product-1" + ], + "objectData": [ + { + "price": 50, + "quantity": 1 + } + ], + "currency": "USD", + "queryID": "7dfe2ada7bca48bdd0629649df0bee07" + } + ] + } + }, + "PurchasedAfterSearch": { + "summary": "Purchase event after search or browse requests", + "value": { + "events": [ + { + "eventName": "Products Purchased", + "eventType": "conversion", + "eventSubtype": "purchase", + "index": "test-index", + "userToken": "anonymous-user-1", + "authenticatedUserToken": "user-1", + "objectIDs": [ + "product-1", + "product-2" + ], + "objectData": [ + { + "price": 49.99, + "discount": 1.99, + "quantity": 1, + "queryID": "7dfe2ada7bca48bdd0629649df0bee07" + }, + { + "price": 9.99, + "discount": 0, + "quantity": 2, + "queryID": "54ed4c9d94050a25e4e5ccf5d256ca42" + } + ], + "value": 69.97, + "currency": "USD" + } + ] + } + }, + "ClickObjectIDs": { + "summary": "Click event", + "value": { + "events": [ + { + "eventName": "Products Clicked", + "eventType": "click", + "index": "test-index", + "userToken": "anonymous-user-1", + "authenticatedUserToken": "user-1", + "objectIDs": [ + "object-1" + ] + } + ] + } + }, + "ConversionObjectIDs": { + "summary": "Conversion event", + "value": { + "events": [ + { + "eventName": "Products Added To Cart", + "eventType": "conversion", + "index": "test-index", + "userToken": "anonymous-user-1", + "authenticatedUserToken": "user-1", + "objectIDs": [ + "object-1" + ] + } + ] + } + }, + "AddedToCart": { + "summary": "Add-to-cart event", + "value": { + "events": [ + { + "eventName": "Products Added To Cart", + "eventType": "conversion", + "eventSubtype": "addToCart", + "index": "test-index", + "userToken": "anonymous-user-1", + "authenticatedUserToken": "user-1", + "objectIDs": [ + "product-1" + ], + "objectData": [ + { + "price": 19.99, + "quantity": 1 + } + ], + "currency": "EUR" + } + ] + } + }, + "Purchased": { + "summary": "Purchase event", + "value": { + "events": [ + { + "eventName": "Products Purchased", + "eventType": "conversion", + "eventSubtype": "purchase", + "index": "test-index", + "userToken": "anonymous-user-1", + "authenticatedUserToken": "user-1", + "objectIDs": [ + "product-1", + "product-2" + ], + "objectData": [ + { + "price": 49.99, + "quantity": 1 + }, + { + "price": 9.99, + "quantity": 2 + } + ], + "currency": "USD", + "value": 69.97 + } + ] + } + }, + "ClickFilter": { + "summary": "Click event with filters", + "value": { + "events": [ + { + "eventName": "Category Clicked", + "eventType": "click", + "index": "test-index", + "userToken": "anonymous-user-1", + "authenticatedUserToken": "user-1", + "filters": [ + "category:books" + ] + } + ] + } + }, + "ConversionFilter": { + "summary": "Conversion event with filters", + "value": { + "events": [ + { + "eventName": "Category Converted", + "eventType": "conversion", + "index": "test-index", + "userToken": "anonymous-user-1", + "authenticatedUserToken": "user-1", + "filters": [ + "category:books" + ] + } + ] + } + }, + "ViewObjectIDs": { + "summary": "View event", + "value": { + "events": [ + { + "eventName": "Products Viewed", + "eventType": "view", + "index": "test-index", + "userToken": "anonymous-user-1", + "authenticatedUserToken": "user-1", + "objectIDs": [ + "object-1" + ] + } + ] + } + }, + "ViewFilters": { + "summary": "View event with filters", + "value": { + "events": [ + { + "eventName": "Category Viewed", + "eventType": "view", + "index": "test-index", + "userToken": "anonymous-user-1", + "authenticatedUserToken": "user-1", + "filters": [ + "category:books" + ] + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventsResponse" + }, + "examples": { + "Success": { + "summary": "Events successfully sent to the Insights API", + "description": "Success indicates that the Insights API received the events correctly, and that event properties are formatted correctly. Success doesn't imply that the event can be used by any Algolia feature. For example, the Insights API doesn't check if the index name you provided exists, or if the object IDs exist in your index.", + "value": { + "status": 200, + "message": "OK" + } + } + } + } + } + }, + "400": { + "description": "Bad Request.", + "content": { + "text/html": { + "schema": { + "type": "string", + "title": "HTML" + }, + "examples": { + "BadRequest": { + "summary": "Bad request", + "description": "This error doesn't return a JSON object, but HTML.", + "value": "Error: Bad Request. Your client has issued a malformed or illegal request." + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventsResponse" + }, + "examples": { + "Unauthorized": { + "summary": "Invalid credentials", + "description": "You need to provide your application ID using the `X-Algolia-Application-ID` header and your (search) API key with the `X-Algolia-API-Key` header.", + "value": { + "status": 401, + "message": "Invalid credentials" + } + } + } + } + } + }, + "404": { + "description": "Not Found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventsResponse" + }, + "examples": { + "NotFound": { + "summary": "Unsupported operation", + "description": "Check that you're using the correct URL.", + "value": { + "status": 404, + "message": "Path not supported by Insights REST API. Please have a look at [https://www.algolia.com/doc/rest-api/insights/](https://www.algolia.com/doc/rest-api/insights/) for the list of valid commands." + } + } + } + } + } + }, + "405": { + "description": "Method Not Allowed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventsResponse" + }, + "examples": { + "MethodNotAllowed": { + "summary": "Method not allowed", + "description": "Check, that you send events with the `POST` method.", + "value": { + "status": 405, + "message": "Method Not Allowed" + } + } + } + } + } + }, + "413": { + "description": "Payload Too Large.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventsResponse" + }, + "examples": { + "PayloadTooLarge": { + "summary": "Request body larger than 2 MB", + "value": { + "status": 413, + "message": "Request Entity Too Large" + } + } + } + } + } + }, + "422": { + "description": "Unprocessable Entity.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventsResponse" + }, + "examples": { + "InvalidPayload": { + "summary": "Incorrect event object", + "value": { + "status": 422, + "message": "Invalid payload" + } + }, + "NoEvents": { + "summary": "No events", + "description": "This can happen if you're sending an empty `events` array, or if you try to send a single event object instead of the `events` array.", + "value": { + "status": 422, + "message": "No events to process" + } + }, + "NoEventsField": { + "summary": "Missing events attribute", + "description": "This can happen if you try to send an array of events directly instead of using the `events` attribute.", + "value": { + "status": 422, + "message": "Invalid type for field : expected insights.PublicEventsBatch, got array" + } + }, + "EventNameRequired": { + "summary": "Missing eventName attribute", + "value": { + "status": 422, + "message": "EventName is required" + } + }, + "WrongEventName": { + "summary": "Event name too long or wrong characters", + "value": { + "status": 422, + "message": "EventName must contain only visible ASCII characters, and be between 1 and 64 characters long" + } + }, + "EventTypeRequired": { + "summary": "Missing eventType attribute", + "value": { + "status": 422, + "message": "EventType is required" + } + }, + "WrongEventType": { + "summary": "Wrong event type", + "value": { + "status": 422, + "message": "EventType must be one of \"click\", \"conversion\" or \"view\"" + } + }, + "IndexRequired": { + "summary": "Missing index attribute", + "value": { + "status": 422, + "message": "The index field is required" + } + }, + "UserTokenRequired": { + "summary": "Missing userToken attribute", + "value": { + "status": 422, + "message": "The userToken field is required" + } + }, + "WrongUserToken": { + "summary": "Malformed user token", + "value": { + "status": 422, + "message": "UserToken must contain only alphanumeric, equal, plus, slash, hyphen, or underscore characters, and be between 1 and 128 characters long" + } + }, + "NoObjectIDsOrFilters": { + "summary": "Missing objectIDs or filters attribute", + "description": "Each event must include either the `objectIDs` or `filters` attribute.", + "value": { + "status": 422, + "message": "Event should specify either some ObjectIDs or some Filters" + } + }, + "BothDefined": { + "summary": "Both objectIDs and filters attributes defined", + "value": { + "status": 422, + "message": "Event should specify ObjectIDs or Filters, but not both" + } + }, + "PositionsOnWrongEventType": { + "summary": "Wrong combination of positions and eventType attributes", + "value": { + "status": 422, + "message": "Only event of type click should specify the positions attribute" + } + }, + "PositionsWithoutQueryID": { + "summary": "Positions attribute without queryID", + "description": "Click events with the `positions` attribute require the `queryID` attribute.", + "value": { + "status": 422, + "message": "Event of type click with positions should specify a queryID" + } + }, + "WrongPositionsValue": { + "summary": "Wrong value in positions array", + "description": "Any value in the `positions` array must be greater than 0.", + "value": { + "status": 422, + "message": "Event of type click may only have strictly positive positions" + } + }, + "WrongPositionsItems": { + "summary": "Wrong number of items in positions array", + "description": "For click events with the `queryID` and `objectIDs` attributes, you must include the `positions` attribute with the same number of items as the `objectIDs` attribute.", + "value": { + "status": 422, + "message": "Event of type click should have the same number of ObjectIDs and Positions" + } + }, + "WrongQueryID": { + "summary": "Malformed query ID", + "value": { + "status": 422, + "message": "Query ID must be a search query ID (32 characters hexadecimal string)" + } + }, + "InvalidDataType": { + "summary": "Wrong data type", + "description": "This can happen if one or more attribute is a number instead of a string.", + "value": { + "status": 422, + "message": "Invalid type for field events: expected string, got number" + } + }, + "InvalidTimestamp": { + "summary": "Timestamp too old", + "value": { + "status": 422, + "message": "The timestamp must be at most 4 days in the past" + } + }, + "TooManyEvents": { + "summary": "Too many events", + "description": "You can include up to 1,000 events in a single API request.", + "value": { + "status": 422, + "message": "Cannot process more than 1000 events in a batch" + } + } + } + } + } + } + } + } + }, + "/1/usertokens/{userToken}": { + "delete": { + "tags": [ + "usertokens" + ], + "operationId": "deleteUserToken", + "summary": "Delete user token", + "description": "Deletes all events related to the specified user token from events metrics and analytics.\nThe deletion is asynchronous, and processed within 48 hours.\nTo delete a personalization user profile, see `Delete a user profile` in the Personalization API.\n", + "x-acl": [ + "deleteObject" + ], + "parameters": [ + { + "name": "userToken", + "in": "path", + "description": "User token for which to delete all associated events.", + "required": true, + "schema": { + "$ref": "#/components/schemas/userToken" + } + } + ], + "responses": { + "204": { + "description": "No content.", + "headers": { + "x-ratelimit-limit": { + "$ref": "#/components/headers/x-ratelimit-limit" + }, + "x-ratelimit-remaining": { + "$ref": "#/components/headers/x-ratelimit-remaining" + }, + "x-ratelimit-reset": { + "$ref": "#/components/headers/x-ratelimit-reset" + } + } + }, + "422": { + "description": "Unprocessable Entity.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventsResponse" + } + } + } + }, + "429": { + "description": "Too Many Requests. This operation is rate-limited. Check the `x-ratelimit-limit` and `x-ratelimit-reset` headers of the response.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventsResponse" + } + } + } + } + } + } + }, + "/setClientApiKey": { + "get": { + "x-helper": true, + "x-asynchronous-helper": false, + "tags": [ + "Api Key" + ], + "operationId": "setClientApiKey", + "summary": "Switch the API key used to authenticate requests", + "description": "Switch the API key used to authenticate requests.\n", + "parameters": [ + { + "in": "query", + "name": "apiKey", + "description": "API key to be used from now on.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No content." + } + } + } + } + }, + "components": { + "securitySchemes": { + "applicationId": { + "type": "apiKey", + "in": "header", + "name": "x-algolia-application-id", + "description": "Your Algolia application ID." + }, + "apiKey": { + "type": "apiKey", + "in": "header", + "name": "x-algolia-api-key", + "description": "Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n" + } + }, + "parameters": { + "PathInPath": { + "name": "path", + "in": "path", + "description": "Path of the endpoint, anything after \"/1\" must be specified.", + "required": true, + "schema": { + "type": "string", + "example": "/keys" + } + }, + "Parameters": { + "name": "parameters", + "in": "query", + "description": "Query parameters to apply to the current query.", + "schema": { + "type": "object", + "additionalProperties": true + } + } + }, + "schemas": { + "ErrorBase": { + "description": "Error.", + "type": "object", + "x-keep-model": true, + "additionalProperties": true, + "properties": { + "message": { + "type": "string", + "example": "Invalid Application-Id or API-Key" + } + } + }, + "eventName": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "pattern": "[\\x20-\\x7E]{1,64}", + "description": "Event name, up to 64 ASCII characters.\n\nConsider naming events consistently—for example, by adopting Segment's\n[object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework)\nframework.\n" + }, + "ClickEvent": { + "type": "string", + "enum": [ + "click" + ] + }, + "index": { + "type": "string", + "description": "Index name (case-sensitive) to which the event's items belong.", + "example": "ALGOLIA_INDEX_NAME" + }, + "objectIDs": { + "type": "array", + "description": "Object IDs of the records that are part of the event.", + "items": { + "type": "string" + }, + "minItems": 1, + "maxItems": 20, + "example": [ + "object-1", + "object-2", + "object-3" + ] + }, + "positions": { + "type": "array", + "items": { + "type": "integer" + }, + "minimum": 1, + "minItems": 1, + "maxItems": 20, + "description": "Position of the clicked item the search results.\n\nYou must provide 1 `position` for each `objectID`.\n", + "example": [ + 1, + 2, + 5 + ] + }, + "queryID": { + "type": "string", + "pattern": "[0-9a-f]{32}", + "minLength": 32, + "maxLength": 32, + "description": "Unique identifier for a search query.\n\nThe query ID is required for events related to search or browse requests.\nIf you add `clickAnalytics: true` as a search request parameter, the query ID is included in the API response.\n", + "example": "3e48cd0616e466948dd85abf5c3fbbe2" + }, + "userToken": { + "type": "string", + "minLength": 1, + "maxLength": 129, + "pattern": "[a-zA-Z0-9_=/+-]{1,129}", + "description": "Anonymous or pseudonymous user identifier.\n\nDon't use personally identifiable information in user tokens.\nFor more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).\n", + "example": "test-user-1" + }, + "authenticatedUserToken": { + "type": "string", + "minLength": 1, + "maxLength": 129, + "pattern": "[a-zA-Z0-9_=/+-]{1,129}", + "description": "Identifier for authenticated users.\n\nWhen the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`.\nThis lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions.\nDon't use personally identifiable information in user tokens.\nFor more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).\n", + "example": "c6a52c02-d0c7-4b53-8ce3-2b8fd202f3f9" + }, + "timestamp": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the event, measured in milliseconds since the Unix epoch.\nBy default, the Insights API uses the time it receives an event as its timestamp.\n", + "example": 1687193127 + }, + "ClickedObjectIDsAfterSearch": { + "type": "object", + "title": "Clicked object IDs after search", + "description": "Click event after an Algolia request.\n\nUse this event to track when users click items in the search results.\nIf you're building your category pages with Algolia,\nyou'll also use this event.\n", + "additionalProperties": false, + "properties": { + "eventName": { + "$ref": "#/components/schemas/eventName" + }, + "eventType": { + "$ref": "#/components/schemas/ClickEvent" + }, + "index": { + "$ref": "#/components/schemas/index" + }, + "objectIDs": { + "$ref": "#/components/schemas/objectIDs" + }, + "positions": { + "$ref": "#/components/schemas/positions" + }, + "queryID": { + "$ref": "#/components/schemas/queryID" + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "authenticatedUserToken": { + "$ref": "#/components/schemas/authenticatedUserToken" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp" + } + }, + "required": [ + "eventName", + "eventType", + "index", + "objectIDs", + "positions", + "queryID", + "userToken" + ], + "x-discriminator-fields": [ + "positions", + "queryID", + "eventType" + ] + }, + "ConversionEvent": { + "type": "string", + "enum": [ + "conversion" + ] + }, + "AddToCartEvent": { + "type": "string", + "enum": [ + "addToCart" + ] + }, + "currency": { + "type": "string", + "description": "Three-letter [currency code](https://www.iso.org/iso-4217-currency-codes.html).", + "example": "EUR" + }, + "price": { + "description": "Total price of a product, including any discounts, in units of `currency`.", + "oneOf": [ + { + "type": "number", + "format": "double", + "example": 9.99 + }, + { + "type": "string", + "example": "9.99" + } + ] + }, + "quantity": { + "type": "integer", + "format": "int32", + "example": 2, + "description": "Quantity of a product that has been purchased or added to the cart.\nThe total purchase value is the sum of `quantity` multiplied with the `price` for each purchased item.\n" + }, + "discount": { + "description": "Absolute value of the discount for this product, in units of `currency`.", + "oneOf": [ + { + "type": "number", + "format": "double", + "example": 20 + }, + { + "type": "string", + "example": "20" + } + ] + }, + "objectDataAfterSearch": { + "type": "object", + "additionalProperties": false, + "properties": { + "queryID": { + "type": "string", + "pattern": "[0-9a-f]{32}", + "minLength": 32, + "maxLength": 32, + "description": "Unique identifier for a search query, used to track purchase events with multiple records that originate from different searches.", + "example": "3e48cd0616e466948dd85abf5c3fbbe2" + }, + "price": { + "$ref": "#/components/schemas/price" + }, + "quantity": { + "$ref": "#/components/schemas/quantity" + }, + "discount": { + "$ref": "#/components/schemas/discount" + } + } + }, + "objectDataAfterSearchList": { + "type": "array", + "description": "Extra information about the records involved in a purchase or add-to-cart events.\n\nIf provided, it must be the same length as `objectIDs`.\n", + "items": { + "$ref": "#/components/schemas/objectDataAfterSearch" + }, + "minItems": 1, + "maxItems": 20 + }, + "value": { + "description": "Total monetary value of this event in units of `currency`.", + "oneOf": [ + { + "type": "number", + "format": "double", + "example": 1000 + }, + { + "type": "string", + "example": "1000.00" + } + ] + }, + "AddedToCartObjectIDsAfterSearch": { + "type": "object", + "title": "Added to cart object IDs after search", + "description": "Use this event to track when users add items to their shopping cart after a previous Algolia request.\nIf you're building your category pages with Algolia, you'll also use this event.\n", + "additionalProperties": false, + "properties": { + "eventName": { + "$ref": "#/components/schemas/eventName" + }, + "eventType": { + "$ref": "#/components/schemas/ConversionEvent" + }, + "eventSubtype": { + "$ref": "#/components/schemas/AddToCartEvent" + }, + "index": { + "$ref": "#/components/schemas/index" + }, + "queryID": { + "$ref": "#/components/schemas/queryID" + }, + "objectIDs": { + "$ref": "#/components/schemas/objectIDs" + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "authenticatedUserToken": { + "$ref": "#/components/schemas/authenticatedUserToken" + }, + "currency": { + "$ref": "#/components/schemas/currency" + }, + "objectData": { + "$ref": "#/components/schemas/objectDataAfterSearchList" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp" + }, + "value": { + "$ref": "#/components/schemas/value" + } + }, + "required": [ + "eventName", + "eventType", + "eventSubtype", + "queryID", + "index", + "objectIDs", + "userToken" + ], + "x-discriminator-fields": [ + "eventType", + "eventSubtype", + "queryID", + "objectIDs" + ] + }, + "PurchaseEvent": { + "type": "string", + "enum": [ + "purchase" + ] + }, + "PurchasedObjectIDsAfterSearch": { + "type": "object", + "title": "Purchased object IDs after search", + "description": "Use this event to track when users make a purchase after a previous Algolia request.\nIf you're building your category pages with Algolia, you'll also use this event.\n", + "additionalProperties": false, + "properties": { + "eventName": { + "$ref": "#/components/schemas/eventName" + }, + "eventType": { + "$ref": "#/components/schemas/ConversionEvent" + }, + "eventSubtype": { + "$ref": "#/components/schemas/PurchaseEvent" + }, + "index": { + "$ref": "#/components/schemas/index" + }, + "objectIDs": { + "$ref": "#/components/schemas/objectIDs" + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "authenticatedUserToken": { + "$ref": "#/components/schemas/authenticatedUserToken" + }, + "currency": { + "$ref": "#/components/schemas/currency" + }, + "objectData": { + "$ref": "#/components/schemas/objectDataAfterSearchList" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp" + }, + "value": { + "$ref": "#/components/schemas/value" + } + }, + "required": [ + "eventName", + "eventType", + "eventSubtype", + "index", + "objectIDs", + "userToken", + "objectData" + ], + "x-discriminator-fields": [ + "eventType", + "eventSubtype", + "objectIDs", + "objectData" + ] + }, + "ConvertedObjectIDsAfterSearch": { + "type": "object", + "title": "Converted object IDs after search", + "description": "Use this event to track when users convert after a previous Algolia request.\nFor example, a user clicks on an item in the search results to view the product detail page.\nThen, the user adds the item to their shopping cart.\n\nIf you're building your category pages with Algolia,\nyou'll also use this event.\n", + "additionalProperties": false, + "properties": { + "eventName": { + "$ref": "#/components/schemas/eventName" + }, + "eventType": { + "$ref": "#/components/schemas/ConversionEvent" + }, + "index": { + "$ref": "#/components/schemas/index" + }, + "objectIDs": { + "$ref": "#/components/schemas/objectIDs" + }, + "queryID": { + "$ref": "#/components/schemas/queryID" + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "authenticatedUserToken": { + "$ref": "#/components/schemas/authenticatedUserToken" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp" + } + }, + "required": [ + "eventName", + "eventType", + "index", + "objectIDs", + "queryID", + "userToken" + ], + "x-discriminator-fields": [ + "queryID", + "eventType" + ] + }, + "ClickedObjectIDs": { + "type": "object", + "title": "Clicked object IDs", + "description": "Use this event to track when users click items unrelated to a previous Algolia request.\nFor example, if you don't use Algolia to build your category pages, use this event.\n\nTo track click events related to Algolia requests, use the \"Clicked object IDs after search\" event.\n", + "additionalProperties": false, + "properties": { + "eventName": { + "$ref": "#/components/schemas/eventName" + }, + "eventType": { + "$ref": "#/components/schemas/ClickEvent" + }, + "index": { + "$ref": "#/components/schemas/index" + }, + "objectIDs": { + "$ref": "#/components/schemas/objectIDs" + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "authenticatedUserToken": { + "$ref": "#/components/schemas/authenticatedUserToken" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp" + } + }, + "required": [ + "eventName", + "eventType", + "index", + "objectIDs", + "userToken" + ], + "x-discriminator-fields": [ + "eventType", + "objectIDs" + ] + }, + "objectData": { + "type": "object", + "additionalProperties": false, + "properties": { + "price": { + "$ref": "#/components/schemas/price" + }, + "quantity": { + "$ref": "#/components/schemas/quantity" + }, + "discount": { + "$ref": "#/components/schemas/discount" + } + } + }, + "objectDataList": { + "type": "array", + "description": "Extra information about the records involved in a purchase or add-to-cart event.\n\nIf specified, it must have the same length as `objectIDs`.\n", + "items": { + "$ref": "#/components/schemas/objectData" + }, + "minItems": 1, + "maxItems": 20 + }, + "PurchasedObjectIDs": { + "type": "object", + "title": "Purchased object IDs", + "description": "Use this event to track when users make a purchase unrelated to a previous Algolia request. For example, if you don't use Algolia to build your category pages, use this event.\n\nTo track purchase events related to Algolia requests, use the \"Purchased object IDs after search\" event.\n", + "additionalProperties": false, + "properties": { + "eventName": { + "$ref": "#/components/schemas/eventName" + }, + "eventType": { + "$ref": "#/components/schemas/ConversionEvent" + }, + "eventSubtype": { + "$ref": "#/components/schemas/PurchaseEvent" + }, + "index": { + "$ref": "#/components/schemas/index" + }, + "objectIDs": { + "$ref": "#/components/schemas/objectIDs" + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "authenticatedUserToken": { + "$ref": "#/components/schemas/authenticatedUserToken" + }, + "currency": { + "$ref": "#/components/schemas/currency" + }, + "objectData": { + "$ref": "#/components/schemas/objectDataList" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp" + }, + "value": { + "$ref": "#/components/schemas/value" + } + }, + "required": [ + "eventName", + "eventType", + "eventSubtype", + "index", + "objectIDs", + "userToken" + ], + "x-discriminator-fields": [ + "eventType", + "eventSubtype", + "objectIDs" + ] + }, + "AddedToCartObjectIDs": { + "type": "object", + "title": "Added to cart object IDs", + "description": "Use this event to track when users add items to their shopping cart unrelated to a previous Algolia request. For example, if you don't use Algolia to build your category pages, use this event.\n\nTo track add-to-cart events related to Algolia requests, use the \"Added to cart object IDs after search\" event.\n", + "additionalProperties": false, + "properties": { + "eventName": { + "$ref": "#/components/schemas/eventName" + }, + "eventType": { + "$ref": "#/components/schemas/ConversionEvent" + }, + "eventSubtype": { + "$ref": "#/components/schemas/AddToCartEvent" + }, + "index": { + "$ref": "#/components/schemas/index" + }, + "objectIDs": { + "$ref": "#/components/schemas/objectIDs" + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "authenticatedUserToken": { + "$ref": "#/components/schemas/authenticatedUserToken" + }, + "currency": { + "$ref": "#/components/schemas/currency" + }, + "objectData": { + "$ref": "#/components/schemas/objectDataList" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp" + }, + "value": { + "$ref": "#/components/schemas/value" + } + }, + "required": [ + "eventName", + "eventType", + "eventSubtype", + "index", + "objectIDs", + "userToken" + ], + "x-discriminator-fields": [ + "eventType", + "eventSubtype", + "objectIDs" + ] + }, + "ConvertedObjectIDs": { + "type": "object", + "title": "Converted object IDs", + "description": "Use this event to track when users convert on items unrelated to a previous Algolia request.\nFor example, if you don't use Algolia to build your category pages, use this event.\n\nTo track conversion events related to Algolia requests, use the \"Converted object IDs after search\" event.\n", + "additionalProperties": false, + "properties": { + "eventName": { + "$ref": "#/components/schemas/eventName" + }, + "eventType": { + "$ref": "#/components/schemas/ConversionEvent" + }, + "index": { + "$ref": "#/components/schemas/index" + }, + "objectIDs": { + "$ref": "#/components/schemas/objectIDs" + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "authenticatedUserToken": { + "$ref": "#/components/schemas/authenticatedUserToken" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp" + } + }, + "required": [ + "eventName", + "eventType", + "index", + "objectIDs", + "userToken" + ], + "x-discriminator-fields": [ + "eventType", + "objectIDs" + ] + }, + "filters": { + "type": "array", + "description": "Applied facet filters.\n\nFacet filters are `facet:value` pairs.\nFacet values must be URL-encoded, such as, `discount:10%25`.\n", + "items": { + "type": "string" + }, + "minItems": 1, + "maxItems": 20, + "example": [ + "brand:apple" + ] + }, + "ClickedFilters": { + "type": "object", + "title": "Clicked filters", + "description": "Use this event to track when users click facet filters in your user interface.", + "additionalProperties": false, + "properties": { + "eventName": { + "$ref": "#/components/schemas/eventName" + }, + "eventType": { + "$ref": "#/components/schemas/ClickEvent" + }, + "index": { + "$ref": "#/components/schemas/index" + }, + "filters": { + "$ref": "#/components/schemas/filters" + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "authenticatedUserToken": { + "$ref": "#/components/schemas/authenticatedUserToken" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp" + } + }, + "required": [ + "eventName", + "eventType", + "index", + "filters", + "userToken" + ], + "x-discriminator-fields": [ + "eventType", + "filters" + ] + }, + "ConvertedFilters": { + "type": "object", + "title": "Converted filters", + "additionalProperties": false, + "properties": { + "eventName": { + "$ref": "#/components/schemas/eventName" + }, + "eventType": { + "$ref": "#/components/schemas/ConversionEvent" + }, + "index": { + "$ref": "#/components/schemas/index" + }, + "filters": { + "$ref": "#/components/schemas/filters" + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "authenticatedUserToken": { + "$ref": "#/components/schemas/authenticatedUserToken" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp" + } + }, + "required": [ + "eventName", + "eventType", + "index", + "filters", + "userToken" + ], + "x-discriminator-fields": [ + "eventType", + "filters" + ] + }, + "ViewEvent": { + "type": "string", + "enum": [ + "view" + ] + }, + "ViewedObjectIDs": { + "type": "object", + "title": "Viewed object IDs", + "description": "Use this event to track when users viewed items in the search results.", + "additionalProperties": false, + "properties": { + "eventName": { + "$ref": "#/components/schemas/eventName" + }, + "eventType": { + "$ref": "#/components/schemas/ViewEvent" + }, + "index": { + "$ref": "#/components/schemas/index" + }, + "objectIDs": { + "$ref": "#/components/schemas/objectIDs" + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "authenticatedUserToken": { + "$ref": "#/components/schemas/authenticatedUserToken" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp" + } + }, + "required": [ + "eventName", + "eventType", + "index", + "objectIDs", + "userToken" + ], + "x-discriminator-fields": [ + "eventType", + "objectIDs" + ] + }, + "ViewedFilters": { + "type": "object", + "title": "Viewed filters", + "description": "Use this method to capture active filters.\nFor example, when browsing a category page,\nusers see content filtered on that specific category.\n", + "additionalProperties": false, + "properties": { + "eventName": { + "$ref": "#/components/schemas/eventName" + }, + "eventType": { + "$ref": "#/components/schemas/ViewEvent" + }, + "index": { + "$ref": "#/components/schemas/index" + }, + "filters": { + "$ref": "#/components/schemas/filters" + }, + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "authenticatedUserToken": { + "$ref": "#/components/schemas/authenticatedUserToken" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp" + } + }, + "required": [ + "eventName", + "eventType", + "index", + "filters", + "userToken" + ], + "x-discriminator-fields": [ + "eventType", + "filters" + ] + }, + "EventsItems": { + "oneOf": [ + { + "$ref": "#/components/schemas/ClickedObjectIDsAfterSearch" + }, + { + "$ref": "#/components/schemas/AddedToCartObjectIDsAfterSearch" + }, + { + "$ref": "#/components/schemas/PurchasedObjectIDsAfterSearch" + }, + { + "$ref": "#/components/schemas/ConvertedObjectIDsAfterSearch" + }, + { + "$ref": "#/components/schemas/ClickedObjectIDs" + }, + { + "$ref": "#/components/schemas/PurchasedObjectIDs" + }, + { + "$ref": "#/components/schemas/AddedToCartObjectIDs" + }, + { + "$ref": "#/components/schemas/ConvertedObjectIDs" + }, + { + "$ref": "#/components/schemas/ClickedFilters" + }, + { + "$ref": "#/components/schemas/ConvertedFilters" + }, + { + "$ref": "#/components/schemas/ViewedObjectIDs" + }, + { + "$ref": "#/components/schemas/ViewedFilters" + } + ] + }, + "EventsResponse": { + "type": "object", + "description": "The response of the Insights API.", + "additionalProperties": false, + "properties": { + "message": { + "type": "string", + "description": "Details about the response, such as error messages." + }, + "status": { + "type": "integer", + "description": "The HTTP status code of the response." + } + } + } + }, + "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" + } + } + } + } + }, + "headers": { + "x-ratelimit-limit": { + "description": "Number of allowed requests per one minute.", + "example": 100, + "schema": { + "type": "integer" + } + }, + "x-ratelimit-remaining": { + "description": "Number of remaining requests in the current period.", + "example": 99, + "schema": { + "type": "integer" + } + }, + "x-ratelimit-reset": { + "description": "Timstamp when the rate limit will reset, measured in seconds since the Unix epoch.", + "example": 1710682486, + "schema": { + "type": "integer" + } + } + } + }, + "x-tagGroups": [ + { + "name": "General", + "tags": [ + "events", + "usertokens" + ] + } + ] +} \ No newline at end of file diff --git a/src/data/monitoring.json b/src/data/monitoring.json index e019c6c..db5ef07 100644 --- a/src/data/monitoring.json +++ b/src/data/monitoring.json @@ -69,8 +69,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["monitoring"] + } }, "post": { "operationId": "customPost", @@ -117,8 +116,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["monitoring"] + } }, "put": { "operationId": "customPut", @@ -165,8 +163,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["monitoring"] + } }, "delete": { "operationId": "customDelete", @@ -203,16 +200,17 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["monitoring"] + } } }, "/1/status": { "get": { - "operationId": "getClustersStatus", + "operationId": "getStatus", "summary": "Retrieve status of all clusters", "security": [], - "tags": ["monitoring"], + "tags": [ + "status" + ], "description": "Retrieves the status of all Algolia clusters and instances.", "responses": { "200": { @@ -229,7 +227,10 @@ "summary": "Retrieve cluster status", "description": "Retrieves the status of selected clusters.", "operationId": "getClusterStatus", - "tags": ["monitoring"], + "x-mcp-tool": true, + "tags": [ + "status" + ], "security": [], "parameters": [ { @@ -254,8 +255,11 @@ "summary": "Retrieve all incidents", "description": "Retrieves known incidents for all clusters.", "operationId": "getIncidents", + "x-mcp-tool": true, "security": [], - "tags": ["monitoring"], + "tags": [ + "incidents" + ], "responses": { "200": { "$ref": "#/components/responses/IncidentsResponse" @@ -271,7 +275,9 @@ "summary": "Retrieve cluster incidents", "description": "Retrieves known incidents for the selected clusters.", "operationId": "getClusterIncidents", - "tags": ["monitoring"], + "tags": [ + "incidents" + ], "security": [], "parameters": [ { @@ -304,7 +310,9 @@ } ], "description": "Retrieves the servers that belong to clusters.\n\nThe response depends on whether you authenticate your API request:\n\n- With authentication, the response lists the servers assigned to your\nAlgolia application's cluster.\n\n- Without authentication, the response lists the servers for all Algolia\nclusters.\n", - "tags": ["monitoring"], + "tags": [ + "monitoring-tag" + ], "responses": { "200": { "$ref": "#/components/responses/InventoryResponse" @@ -321,7 +329,9 @@ "description": "Retrieves the average latency for search requests for selected clusters.", "operationId": "getLatency", "security": [], - "tags": ["monitoring"], + "tags": [ + "monitoring-tag" + ], "parameters": [ { "$ref": "#/components/parameters/Clusters" @@ -343,7 +353,9 @@ "description": "Retrieves average times for indexing operations for selected clusters.", "operationId": "getIndexingTime", "security": [], - "tags": ["monitoring"], + "tags": [ + "monitoring-tag" + ], "parameters": [ { "$ref": "#/components/parameters/Clusters" @@ -365,7 +377,9 @@ "description": "Test whether clusters are reachable or not.", "operationId": "getReachability", "security": [], - "tags": ["monitoring"], + "tags": [ + "monitoring-tag" + ], "parameters": [ { "$ref": "#/components/parameters/Clusters" @@ -386,7 +400,9 @@ "summary": "Retrieve metrics", "description": "Retrieves metrics related to your Algolia infrastructure, aggregated over a selected time window.\n\nAccess to this API is available as part of the [Premium or Elevate plans](https://www.algolia.com/pricing).\nYou must authenticate requests with the `x-algolia-application-id` and `x-algolia-api-key` headers (using the Monitoring API key).\n", "operationId": "getMetrics", - "tags": ["monitoring"], + "tags": [ + "infrastructure" + ], "parameters": [ { "$ref": "#/components/parameters/MetricInPath" @@ -409,7 +425,9 @@ "get": { "x-helper": true, "x-asynchronous-helper": false, - "tags": ["monitoring"], + "tags": [ + "Api Key" + ], "operationId": "setClientApiKey", "summary": "Switch the API key used to authenticate requests", "description": "Switch the API key used to authenticate requests.\n", @@ -513,7 +531,12 @@ "title": "status", "type": "string", "description": "Status of the cluster.", - "enum": ["operational", "degraded_performance", "partial_outage", "major_outage"] + "enum": [ + "operational", + "degraded_performance", + "partial_outage", + "major_outage" + ] }, "Timestamp": { "type": "integer", @@ -577,12 +600,16 @@ "ServerStatus": { "title": "status", "type": "string", - "enum": ["PRODUCTION"] + "enum": [ + "PRODUCTION" + ] }, "Type": { "title": "type", "type": "string", - "enum": ["cluster"] + "enum": [ + "cluster" + ] }, "Server": { "title": "server", @@ -666,7 +693,13 @@ }, "Period": { "type": "string", - "enum": ["minute", "hour", "day", "week", "month"], + "enum": [ + "minute", + "hour", + "day", + "week", + "month" + ], "example": "week" }, "ProbesMetric": { @@ -1105,7 +1138,7 @@ }, "ssd_usage": { "type": "object", - "description": "Solid-state disk (SSD) usage expressed as % of RAM.\n0% means no SSD usage. A value of 50% indicates 32 GB SSD usage for a machine with 64 RAM.\n", + "description": "Solid-state disk (SSD) usage expressed as % of RAM. \n0% means no SSD usage. A value of 50% indicates 32 GB SSD usage for a machine with 64 RAM.\n", "additionalProperties": { "x-additionalPropertiesName": "probes", "$ref": "#/components/schemas/InfraProbes" @@ -1219,7 +1252,12 @@ "x-tagGroups": [ { "name": "General", - "tags": ["status", "incidents", "infrastructure", "monitoring-tag"] + "tags": [ + "status", + "incidents", + "infrastructure", + "monitoring-tag" + ] } ] -} +} \ No newline at end of file diff --git a/src/data/personalization.json b/src/data/personalization.json new file mode 100644 index 0000000..30bec89 --- /dev/null +++ b/src/data/personalization.json @@ -0,0 +1,716 @@ +{ + "openapi": "3.0.2", + "info": { + "title": "Personalization API", + "description": "The Personalization API lets you access user profiles built from the personalization strategy.\n\n## Base URLs\n\nThe base URLs for requests to the Personalization API are:\n\n- `https://personalization.us.algolia.com`\n- `https://personalization.eu.algolia.com`\n\nUse the URL that matches your [analytics region](https://dashboard.algolia.com/account/infrastructure/analytics).\n\n**All requests must use HTTPS.**\n\n## Authentication\n\nTo authenticate your API requests, add these headers:\n\n- `x-algolia-application-id`. Your Algolia application ID.\n- `x-algolia-api-key`. An API key with the necessary permissions to make the request.\n The required access control list (ACL) to make a request is listed in each endpoint's reference.\n\nYou can find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account).\n\n## Request format\n\nRequest bodies must be JSON objects.\n\n## Response status and errors\n\nThe Personalization API returns JSON responses.\nSince JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API response.\n\nSuccessful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status.\nError responses have a `message` property with more information.\n\n## Rate limiting\n\nWhen making requests to the Personalization API, you are limited to 40 API calls per second per application.\n\nThe following headers provide information about your current limit:\n\n- `x-ratelimit-limit`: The number of requests allowed every second.\n- `x-ratelimit-remaining`: The number of requests remaining in the current\nsecond period.\n- `x-ratelimit-reset`: [Unix timestamp](https://www.unixtimestamp.com/) of\nthe next time period.\n\n## Version\n\nThe current version of the Personalization API is version 1, as indicated by the `/1/` in each endpoint's URL.\n", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://personalization.{region}.algolia.com", + "variables": { + "region": { + "description": "The region where your Algolia application is hosted.", + "enum": [ + "us", + "eu" + ], + "default": "us" + } + } + } + ], + "security": [ + { + "applicationId": [], + "apiKey": [] + } + ], + "tags": [ + { + "name": "profiles", + "x-displayName": "Profiles", + "description": "User profiles represent the affinities each user profile has for the different facets in your index.\nThe more a user viewed and clicked search results with a specific facet,\nthe higher the affinity for that facet.\n" + }, + { + "name": "strategies", + "x-displayName": "Strategies", + "description": "The personalization strategy defines how personalization should affect the search results,\nand how much each facet and event type impact the personalization.\n" + } + ], + "externalDocs": { + "url": "https://www.algolia.com/doc/guides/personalization/what-is-personalization/", + "description": "Related guide: Algolia Personalization.\n" + }, + "paths": { + "/{path}": { + "get": { + "operationId": "customGet", + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + }, + "post": { + "operationId": "customPost", + "requestBody": { + "description": "Parameters to send with the custom request.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + }, + "put": { + "operationId": "customPut", + "requestBody": { + "description": "Parameters to send with the custom request.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + }, + "delete": { + "operationId": "customDelete", + "summary": "Send requests to the Algolia REST API", + "description": "This method lets you 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" + } + } + } + }, + "/1/profiles/personalization/{userToken}": { + "get": { + "tags": [ + "profiles" + ], + "operationId": "getUserTokenProfile", + "x-acl": [ + "recommendation" + ], + "summary": "Retrieve a user profile", + "description": "Retrieves a user profile and their affinities for different facets.", + "parameters": [ + { + "$ref": "#/components/parameters/UserToken" + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "x-ratelimit-limit": { + "$ref": "#/components/headers/x-ratelimit-limit" + }, + "x-ratelimit-remaining": { + "$ref": "#/components/headers/x-ratelimit-remaining" + }, + "x-ratelimit-reset": { + "$ref": "#/components/headers/x-ratelimit-reset" + } + }, + "content": { + "application/json": { + "schema": { + "title": "getUserTokenResponse", + "type": "object", + "additionalProperties": false, + "required": [ + "userToken", + "scores", + "lastEventAt" + ], + "properties": { + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "lastEventAt": { + "type": "string", + "description": "Date and time of the last event from this user, in RFC 3339 format." + }, + "scores": { + "type": "object", + "description": "Scores for different facet values.\n\nScores represent the user affinity for a user profile towards specific facet values,\ngiven the personalization strategy and past events.\n" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/IndexNotFound" + } + } + } + }, + "/1/profiles/{userToken}": { + "delete": { + "tags": [ + "profiles" + ], + "operationId": "deleteUserProfile", + "x-acl": [ + "recommendation" + ], + "summary": "Delete a user profile", + "description": "Deletes a user profile.\n\nThe response includes a date and time when the user profile can safely be considered deleted.\n", + "parameters": [ + { + "$ref": "#/components/parameters/UserToken" + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "x-ratelimit-limit": { + "$ref": "#/components/headers/x-ratelimit-limit" + }, + "x-ratelimit-remaining": { + "$ref": "#/components/headers/x-ratelimit-remaining" + }, + "x-ratelimit-reset": { + "$ref": "#/components/headers/x-ratelimit-reset" + } + }, + "content": { + "application/json": { + "schema": { + "title": "deleteUserProfileResponse", + "type": "object", + "additionalProperties": false, + "required": [ + "userToken", + "deletedUntil" + ], + "properties": { + "userToken": { + "$ref": "#/components/schemas/userToken" + }, + "deletedUntil": { + "type": "string", + "description": "Date and time when the user profile can be safely considered to be deleted.\nAny events received after the `deletedUntil` date start a new user profile.\n" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/IndexNotFound" + } + } + } + }, + "/1/strategies/personalization": { + "get": { + "tags": [ + "strategies" + ], + "operationId": "getPersonalizationStrategy", + "x-acl": [ + "recommendation" + ], + "summary": "Retrieve the personalization strategy", + "description": "Retrieves the current personalization strategy.", + "responses": { + "200": { + "description": "OK", + "headers": { + "x-ratelimit-limit": { + "$ref": "#/components/headers/x-ratelimit-limit" + }, + "x-ratelimit-remaining": { + "$ref": "#/components/headers/x-ratelimit-remaining" + }, + "x-ratelimit-reset": { + "$ref": "#/components/headers/x-ratelimit-reset" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/personalizationStrategyParams" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/IndexNotFound" + } + } + }, + "post": { + "tags": [ + "strategies" + ], + "operationId": "setPersonalizationStrategy", + "x-acl": [ + "recommendation" + ], + "summary": "Define the personalization strategy", + "description": "Creates a new personalization strategy.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/personalizationStrategyParams" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "title": "setPersonalizationStrategyResponse", + "type": "object", + "additionalProperties": false, + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string", + "description": "A message confirming the strategy update.", + "example": "Strategy was successfully updated." + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "402": { + "$ref": "#/components/responses/FeatureNotEnabled" + }, + "403": { + "$ref": "#/components/responses/MethodNotAllowed" + }, + "404": { + "$ref": "#/components/responses/IndexNotFound" + } + } + } + }, + "/setClientApiKey": { + "get": { + "x-helper": true, + "x-asynchronous-helper": false, + "tags": [ + "Api Key" + ], + "operationId": "setClientApiKey", + "summary": "Switch the API key used to authenticate requests", + "description": "Switch the API key used to authenticate requests.\n", + "parameters": [ + { + "in": "query", + "name": "apiKey", + "description": "API key to be used from now on.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No content." + } + } + } + } + }, + "components": { + "securitySchemes": { + "applicationId": { + "type": "apiKey", + "in": "header", + "name": "x-algolia-application-id", + "description": "Your Algolia application ID." + }, + "apiKey": { + "type": "apiKey", + "in": "header", + "name": "x-algolia-api-key", + "description": "Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n" + } + }, + "parameters": { + "PathInPath": { + "name": "path", + "in": "path", + "description": "Path of the endpoint, anything after \"/1\" must be specified.", + "required": true, + "schema": { + "type": "string", + "example": "/keys" + } + }, + "Parameters": { + "name": "parameters", + "in": "query", + "description": "Query parameters to apply to the current query.", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "UserToken": { + "name": "userToken", + "in": "path", + "required": true, + "description": "Unique identifier representing a user for which to fetch the personalization profile.", + "schema": { + "$ref": "#/components/schemas/userToken" + } + } + }, + "schemas": { + "ErrorBase": { + "description": "Error.", + "type": "object", + "x-keep-model": true, + "additionalProperties": true, + "properties": { + "message": { + "type": "string", + "example": "Invalid Application-Id or API-Key" + } + } + }, + "userToken": { + "type": "string", + "description": "Unique pseudonymous or anonymous user identifier.\n\nThis helps with analytics and click and conversion events.\nFor more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).\n", + "example": "test-user-123", + "x-categories": [ + "Personalization" + ] + }, + "score": { + "type": "integer", + "description": "Event score." + }, + "EventType": { + "title": "eventType", + "type": "string", + "description": "Event type.", + "enum": [ + "click", + "conversion", + "view" + ] + }, + "eventsScoring": { + "type": "object", + "additionalProperties": false, + "required": [ + "score", + "eventName", + "eventType" + ], + "properties": { + "score": { + "$ref": "#/components/schemas/score" + }, + "eventName": { + "type": "string", + "description": "Event name." + }, + "eventType": { + "$ref": "#/components/schemas/EventType" + } + } + }, + "facetsScoring": { + "type": "object", + "additionalProperties": false, + "required": [ + "score", + "facetName" + ], + "properties": { + "score": { + "$ref": "#/components/schemas/score" + }, + "facetName": { + "type": "string", + "description": "Facet attribute name." + } + } + }, + "personalizationStrategyParams": { + "type": "object", + "additionalProperties": false, + "required": [ + "eventsScoring", + "facetsScoring", + "personalizationImpact" + ], + "properties": { + "eventsScoring": { + "type": "array", + "description": "Scores associated with each event.\n\nThe higher the scores, the higher the impact of those events on the personalization of search results.\n", + "items": { + "$ref": "#/components/schemas/eventsScoring" + } + }, + "facetsScoring": { + "type": "array", + "description": "Scores associated with each facet.\n\nThe higher the scores, the higher the impact of those events on the personalization of search results.\n", + "items": { + "$ref": "#/components/schemas/facetsScoring" + } + }, + "personalizationImpact": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "description": "Impact of personalization on the search results.\n\nIf set to 0, personalization has no impact on the search results.\n" + } + } + } + }, + "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" + } + } + } + } + }, + "headers": { + "x-ratelimit-limit": { + "description": "Number of allowed requests per one minute.", + "example": 100, + "schema": { + "type": "integer" + } + }, + "x-ratelimit-remaining": { + "description": "Number of remaining requests in the current period.", + "example": 99, + "schema": { + "type": "integer" + } + }, + "x-ratelimit-reset": { + "description": "Timstamp when the rate limit will reset, measured in seconds since the Unix epoch.", + "example": 1710682486, + "schema": { + "type": "integer" + } + } + } + }, + "x-tagGroups": [ + { + "name": "General", + "tags": [ + "profiles", + "strategies" + ] + } + ] +} \ No newline at end of file diff --git a/src/data/query-suggestions.json b/src/data/query-suggestions.json index 96f6be8..3fb6b76 100644 --- a/src/data/query-suggestions.json +++ b/src/data/query-suggestions.json @@ -11,7 +11,11 @@ "description": "You can check the region for your application in the [Algolia dashboard](https://dashboard.algolia.com/account/infrastructure/analytics).\nIf you connect to the wrong region, the API returns an error with the status `401` and the message: \"The log processing region does not match\".\n", "variables": { "region": { - "enum": ["us", "eu"], + "description": "The region where your Algolia application is hosted.", + "enum": [ + "us", + "eu" + ], "default": "us" } } @@ -38,8 +42,8 @@ "paths": { "/{path}": { "get": { - "operationId": "customQuerySuggestionGet", - "summary": "Send requests to the Algolia Query Suggestions REST API", + "operationId": "customGet", + "summary": "Send requests to the Algolia REST API", "description": "This method lets you send requests to the Algolia REST API.", "parameters": [ { @@ -72,11 +76,10 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["query-suggestions"] + } }, "post": { - "operationId": "customQuerySuggestionPost", + "operationId": "customPost", "requestBody": { "description": "Parameters to send with the custom request.", "content": { @@ -87,7 +90,7 @@ } } }, - "summary": "Send requests to the Algolia Query Suggestions REST API", + "summary": "Send requests to the Algolia REST API", "description": "This method lets you send requests to the Algolia REST API.", "parameters": [ { @@ -120,11 +123,10 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["query-suggestions"] + } }, "put": { - "operationId": "customQuerySuggestionPut", + "operationId": "customPut", "requestBody": { "description": "Parameters to send with the custom request.", "content": { @@ -135,7 +137,7 @@ } } }, - "summary": "Send requests to the Algolia Query Suggestions REST API", + "summary": "Send requests to the Algolia REST API", "description": "This method lets you send requests to the Algolia REST API.", "parameters": [ { @@ -168,13 +170,12 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["query-suggestions"] + } }, "delete": { - "operationId": "customQuerySuggestionDelete", + "operationId": "customDelete", "summary": "Send requests to the Algolia REST API", - "description": "This method lets you send requests to the Algolia Query Suggestions REST API.", + "description": "This method lets you send requests to the Algolia REST API.", "parameters": [ { "$ref": "#/components/parameters/PathInPath" @@ -206,16 +207,20 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["query-suggestions"] + } } }, "/1/configs": { "get": { - "tags": ["query-suggestions"], - "operationId": "listQuerySuggestionsConfigs", - "x-acl": ["settings"], - "summary": "List Query Suggestions configurations", + "tags": [ + "configurations" + ], + "operationId": "getAllConfigs", + "x-mcp-tool": true, + "x-acl": [ + "settings" + ], + "summary": "List configurations", "description": "Retrieves all Query Suggestions configurations of your Algolia application.", "responses": { "200": { @@ -237,10 +242,15 @@ } }, "post": { - "tags": ["query-suggestions"], - "operationId": "createQuerySuggestionsConfig", - "x-acl": ["editSettings"], - "summary": "Create a Query Suggestions configuration", + "tags": [ + "configurations" + ], + "operationId": "createConfig", + "x-mcp-tool": true, + "x-acl": [ + "editSettings" + ], + "summary": "Create a configuration", "description": "Creates a new Query Suggestions configuration.\n\nYou can have up to 100 configurations per Algolia application.\n", "requestBody": { "required": true, @@ -289,10 +299,15 @@ }, "/1/configs/{indexName}": { "get": { - "tags": ["query-suggestions"], - "operationId": "getQuerySuggestionsConfig", - "x-acl": ["settings"], - "summary": "Retrieve a Query Suggestions configuration", + "tags": [ + "configurations" + ], + "operationId": "getConfig", + "x-mcp-tool": true, + "x-acl": [ + "settings" + ], + "summary": "Retrieve a configuration", "description": "Retrieves a single Query Suggestions configuration by its index name.", "parameters": [ { @@ -322,10 +337,15 @@ } }, "put": { - "tags": ["query-suggestions"], - "operationId": "updateQuerySuggestionConfig", - "x-acl": ["editSettings"], - "summary": "Update a Query Suggestions configuration", + "tags": [ + "configurations" + ], + "operationId": "updateConfig", + "x-mcp-tool": true, + "x-acl": [ + "editSettings" + ], + "summary": "Update a configuration", "description": "Updates a QuerySuggestions configuration.", "parameters": [ { @@ -371,10 +391,14 @@ } }, "delete": { - "tags": ["query-suggestions"], - "operationId": "deleteQuerySuggestionConfig", - "x-acl": ["editSettings"], - "summary": "Delete a Query Suggestions configuration", + "tags": [ + "configurations" + ], + "operationId": "deleteConfig", + "x-acl": [ + "editSettings" + ], + "summary": "Delete a configuration", "description": "Deletes a Query Suggestions configuration.\n\nDeleting only removes the configuration and stops updates to the Query Suggestions index.\nTo delete the Query Suggestions index itself, use the Search API and the `Delete an index` operation.\n", "parameters": [ { @@ -412,10 +436,15 @@ }, "/1/configs/{indexName}/status": { "get": { - "tags": ["query-suggestions"], - "operationId": "getQuerySuggestionConfigStatus", - "x-acl": ["settings"], - "summary": "Retrieve a Query Suggestions configuration status", + "tags": [ + "configurations" + ], + "operationId": "getConfigStatus", + "x-mcp-tool": true, + "x-acl": [ + "settings" + ], + "summary": "Retrieve configuration status", "description": "Reports the status of a Query Suggestions index.", "parameters": [ { @@ -471,10 +500,15 @@ }, "/1/logs/{indexName}": { "get": { - "tags": ["query-suggestions"], - "operationId": "getQuerySuggestionLogFile", - "x-acl": ["settings"], - "summary": "Retrieve a Query Suggestions index logs", + "tags": [ + "logs" + ], + "operationId": "getLogFile", + "x-mcp-tool": true, + "x-acl": [ + "settings" + ], + "summary": "Retrieve logs", "description": "Retrieves the logs for a single Query Suggestions index.", "parameters": [ { @@ -527,7 +561,9 @@ "get": { "x-helper": true, "x-asynchronous-helper": false, - "tags": ["query-suggestions"], + "tags": [ + "Api Key" + ], "operationId": "setClientApiKey", "summary": "Switch the API key used to authenticate requests", "description": "Switch the API key used to authenticate requests.\n", @@ -697,7 +733,12 @@ "type": "null" } ], - "example": [["color", "brand"]] + "example": [ + [ + "color", + "brand" + ] + ] }, "External": { "description": "Algolia indices with popular searches to use as query suggestions.\n\nRecords of these indices must have these attributes:\n\n- `query`: search query which will be added as a suggestion\n- `count`: measure of popularity of that search query\n\nFor example, you can export popular searches from an external analytics provider, such as Google Analytics or Adobe Analytics,\nand feed this data into an Algolia index.\nYou can use this index to generate query suggestions until your Algolia Analytics has collected enough data.\n", @@ -717,7 +758,9 @@ "SourceIndex": { "type": "object", "description": "Configuration of an Algolia index for Query Suggestions.", - "required": ["indexName"], + "required": [ + "indexName" + ], "properties": { "indexName": { "type": "string", @@ -794,7 +837,9 @@ "Configuration": { "type": "object", "description": "Query Suggestions configuration.", - "required": ["sourceIndices"], + "required": [ + "sourceIndices" + ], "properties": { "sourceIndices": { "type": "array", @@ -825,7 +870,10 @@ "ConfigurationWithIndex": { "type": "object", "description": "Query Suggestions configuration.", - "required": ["indexName", "sourceIndices"], + "required": [ + "indexName", + "sourceIndices" + ], "allOf": [ { "type": "object", @@ -878,7 +926,11 @@ "title": "level", "type": "string", "description": "Type of log entry.\n\n- `SKIP`. A query is skipped because it doesn't match the conditions for successful inclusion. For example, when a query doesn't generate enough search results.\n- `INFO`. An informative log entry.\n- `ERROR`. The Query Suggestions process encountered an error.\n", - "enum": ["SKIP", "INFO", "ERROR"] + "enum": [ + "SKIP", + "INFO", + "ERROR" + ] } }, "responses": { @@ -1077,11 +1129,15 @@ "x-tagGroups": [ { "name": "Configurations", - "tags": ["configurations"] + "tags": [ + "configurations" + ] }, { "name": "Logs", - "tags": ["logs"] + "tags": [ + "logs" + ] } ] -} +} \ No newline at end of file diff --git a/src/data/recommend.json b/src/data/recommend.json index fb98bd5..74db20e 100644 --- a/src/data/recommend.json +++ b/src/data/recommend.json @@ -110,8 +110,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["recommend"] + } }, "post": { "operationId": "customPost", @@ -158,8 +157,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["recommend"] + } }, "put": { "operationId": "customPut", @@ -206,8 +204,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["recommend"] + } }, "delete": { "operationId": "customDelete", @@ -244,17 +241,20 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["recommend"] + } } }, "/1/indexes/*/recommendations": { "post": { - "tags": ["recommend"], + "tags": [ + "recommendations" + ], "operationId": "getRecommendations", "x-use-read-transporter": true, "x-cacheable": true, - "x-acl": ["search"], + "x-acl": [ + "search" + ], "x-legacy-signature-recommend": true, "summary": "Retrieve recommendations", "description": "Retrieves recommendations from selected AI models.\n", @@ -276,7 +276,9 @@ } } }, - "required": ["requests"] + "required": [ + "requests" + ] } } } @@ -298,7 +300,9 @@ } } }, - "required": ["results"] + "required": [ + "results" + ] } } } @@ -320,9 +324,13 @@ }, "/1/indexes/{indexName}/{model}/recommend/rules/{objectID}": { "get": { - "tags": ["recommend"], + "tags": [ + "rules" + ], "operationId": "getRecommendRule", - "x-acl": ["settings"], + "x-acl": [ + "settings" + ], "summary": "Retrieve a rule", "description": "Retrieves a Recommend rule that you previously created in the Algolia dashboard.", "parameters": [ @@ -362,9 +370,13 @@ } }, "delete": { - "tags": ["recommend"], + "tags": [ + "rules" + ], "operationId": "deleteRecommendRule", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Delete a rule", "description": "Deletes a Recommend rule from a recommendation scenario.", "parameters": [ @@ -399,9 +411,13 @@ }, "/1/indexes/{indexName}/{model}/task/{taskID}": { "get": { - "tags": ["recommend"], + "tags": [ + "rules" + ], "operationId": "getRecommendStatus", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Check task status", "description": "Checks the status of a given task.\n\nDeleting a Recommend rule is asynchronous.\nWhen you delete a rule, a task is created on a queue and completed depending on the load on the server.\nThe API response includes a task ID that you can use to check the status.\n", "parameters": [ @@ -435,7 +451,9 @@ "$ref": "#/components/schemas/taskStatus" } }, - "required": ["status"] + "required": [ + "status" + ] } } } @@ -457,11 +475,15 @@ }, "/1/indexes/{indexName}/{model}/recommend/rules/search": { "post": { - "tags": ["recommend"], + "tags": [ + "rules" + ], "operationId": "searchRecommendRules", "x-use-read-transporter": true, "x-cacheable": true, - "x-acl": ["settings"], + "x-acl": [ + "settings" + ], "summary": "Search for rules", "description": "Searches for Recommend rules.\n\nUse an empty query to list all rules for this recommendation scenario.\n", "parameters": [ @@ -507,7 +529,9 @@ "facets": { "type": "array", "description": "Include facets and facet values in the response. Use `['*']` to include all facets.", - "example": ["*"], + "example": [ + "*" + ], "items": { "type": "string", "description": "Facet name for rule objects or `*` as wildcard character.", @@ -534,7 +558,12 @@ "title": "searchRecommendRulesResponse", "type": "object", "additionalProperties": false, - "required": ["hits", "nbHits", "page", "nbPages"], + "required": [ + "hits", + "nbHits", + "page", + "nbPages" + ], "properties": { "hits": { "type": "array", @@ -574,9 +603,13 @@ }, "/1/indexes/{indexName}/{model}/recommend/rules/batch": { "post": { - "tags": ["recommend"], + "tags": [ + "rules" + ], "operationId": "batchRecommendRules", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Create or update a batch of Recommend Rules", "description": "Create or update a batch of Recommend Rules\n\nEach Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists.\nYou may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules.\n\nRecommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following:\n- Conditions `pattern` and `anchoring` are unavailable.\n- Condition `filters` triggers if the source item matches the specified filters.\n- Condition `filters` accepts numeric filters.\n- Consequence `params` only covers filtering parameters.\n- Consequence `automaticFacetFilters` doesn't require a facet value placeholder (it tries to match the data source item's attributes instead).\n", "parameters": [ @@ -615,7 +648,9 @@ "get": { "x-helper": true, "x-asynchronous-helper": false, - "tags": ["recommend"], + "tags": [ + "Api Key" + ], "operationId": "setClientApiKey", "summary": "Switch the API key used to authenticate requests", "description": "Switch the API key used to authenticate requests.\n", @@ -725,17 +760,27 @@ "description": "Keywords to be used instead of the search query to conduct a more broader search.\n\nUsing the `similarQuery` parameter changes other settings:\n\n- `queryType` is set to `prefixNone`.\n- `removeStopWords` is set to true.\n- `words` is set as the first ranking criterion.\n- All remaining words are treated as `optionalWords`.\n\nSince the `similarQuery` is supposed to do a broad search, they usually return many results.\nCombine it with `filters` to narrow down the list of results.\n", "default": "", "example": "comedy drama crime Macy Buscemi", - "x-categories": ["Search"] + "x-categories": [ + "Search" + ] }, "filters": { "type": "string", "description": "Filter expression to only include items that match the filter criteria in the response.\n\nYou can use these filter expressions:\n\n- **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`.\n- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive).\n- **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value.\n- **Tag filters.** `_tags:` or just `` (case-sensitive).\n- **Boolean filters.** `: true | false`.\n\nYou can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions:\n\n- You can only combine filters of the same type with `OR`.\n **Not supported:** `facet:value OR num > 3`.\n- You can't use `NOT` with combinations of filters.\n **Not supported:** `NOT(facet:value OR facet:value)`\n- You can't combine conjunctions (`AND`) with `OR`.\n **Not supported:** `facet:value OR (facet:value AND facet:value)`\n\nUse quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes.\nIf a facet attribute is an array, the filter matches if it matches at least one element of the array.\n\nFor more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).\n", "example": "(category:Book OR category:Ebook) AND _tags:published", - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "facetFilters": { "description": "Filter the search by facet values, so that only records with the same facet values are retrieved.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\n- `[filter1, filter2]` is interpreted as `filter1 AND filter2`.\n- `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`.\n- `facet:-value` is interpreted as `NOT facet:value`.\n\nWhile it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash:\n`facet:\\-value`.\n", - "example": [["category:Book", "category:-Movie"], "author:John Doe"], + "example": [ + [ + "category:Book", + "category:-Movie" + ], + "author:John Doe" + ], "oneOf": [ { "type": "array", @@ -747,11 +792,16 @@ "type": "string" } ], - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "optionalFilters": { "description": "Filters to promote or demote records in the search results.\n\nOptional filters work like facet filters, but they don't exclude records from the search results.\nRecords that match the optional filter rank before records that don't match.\nIf you're using a negative filter `facet:-value`, matching records rank after records that don't match.\n\n- Optional filters don't work on virtual replicas.\n- Optional filters are applied _after_ sort-by attributes.\n- Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/)).\n- Optional filters don't work with numeric attributes.\n", - "example": ["category:Book", "author:John Doe"], + "example": [ + "category:Book", + "author:John Doe" + ], "oneOf": [ { "type": "array", @@ -763,11 +813,19 @@ "type": "string" } ], - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "numericFilters": { "description": "Filter by numeric facets.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\nYou can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`.\nComparisons are precise up to 3 decimals.\nYou can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries.\nThe same combination rules apply as for `facetFilters`.\n", - "example": [["inStock = 1", "deliveryDate < 1441755506"], "price < 1000"], + "example": [ + [ + "inStock = 1", + "deliveryDate < 1441755506" + ], + "price < 1000" + ], "oneOf": [ { "type": "array", @@ -779,11 +837,19 @@ "type": "string" } ], - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "tagFilters": { "description": "Filter the search by values of the special `_tags` attribute.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\nDifferent from regular facets, `_tags` can only be used for filtering (including or excluding records).\nYou won't get a facet count.\nThe same combination and escaping rules apply as for `facetFilters`.\n", - "example": [["Book", "Movie"], "SciFi"], + "example": [ + [ + "Book", + "Movie" + ], + "SciFi" + ], "oneOf": [ { "type": "array", @@ -795,23 +861,32 @@ "type": "string" } ], - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "sumOrFiltersScores": { "type": "boolean", "description": "Whether to sum all filter scores.\n\nIf true, all filter scores are summed.\nOtherwise, the maximum filter score is kept.\nFor more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).\n", "default": false, - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "restrictSearchableAttributes": { "type": "array", "items": { "type": "string" }, - "example": ["title", "author"], + "example": [ + "title", + "author" + ], "description": "Restricts a search to a subset of your searchable attributes.\nAttribute names are case-sensitive.\n", "default": [], - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "facets": { "type": "array", @@ -820,33 +895,45 @@ }, "description": "Facets for which to retrieve facet values that match the search criteria and the number of matching facet values.\n\nTo retrieve all facets, use the wildcard character `*`.\nFor more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).\n", "default": [], - "example": ["*"], - "x-categories": ["Faceting"] + "example": [ + "*" + ], + "x-categories": [ + "Faceting" + ] }, "facetingAfterDistinct": { "type": "boolean", "description": "Whether faceting should be applied after deduplication with `distinct`.\n\nThis leads to accurate facet counts when using faceting in combination with `distinct`.\nIt's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting,\nas `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.\n", "default": false, - "x-categories": ["Faceting"] + "x-categories": [ + "Faceting" + ] }, "aroundLatLng": { "type": "string", "description": "Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude.\n\nOnly records included within a circle around this central location are included in the results.\nThe radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings.\nThis parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.\n", "example": "40.71,-74.01", "default": "", - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "aroundLatLngViaIP": { "type": "boolean", "description": "Whether to obtain the coordinates from the request's IP address.", "default": false, - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "aroundRadiusAll": { "title": "all", "type": "string", "description": "Return all records with a valid `_geoloc` attribute. Don't filter by distance.", - "enum": ["all"] + "enum": [ + "all" + ] }, "aroundRadius": { "description": "Maximum radius for a search around a central location.\n\nThis parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters.\nBy default, the search radius is determined automatically from the density of hits around the central location.\nThe search radius is small if there are many hits close to the central coordinates.\n", @@ -860,7 +947,9 @@ "$ref": "#/components/schemas/aroundRadiusAll" } ], - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "aroundPrecisionFromValue": { "title": "range objects", @@ -894,13 +983,17 @@ "$ref": "#/components/schemas/aroundPrecisionFromValue" } ], - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "minimumAroundRadius": { "type": "integer", "description": "Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", "minimum": 1, - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "insideBoundingBoxArray": { "type": "array", @@ -915,10 +1008,22 @@ }, "description": "Coordinates for a rectangular area in which to search.\n\nEach bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair:\n`[p1 lat, p1 long, p2 lat, p2 long]`.\nProvide multiple bounding boxes as nested arrays.\nFor more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).\n", "example": [ - [47.3165, 4.9665, 47.3424, 5.0201], - [40.9234, 2.1185, 38.643, 1.9916] + [ + 47.3165, + 4.9665, + 47.3424, + 5.0201 + ], + [ + 40.9234, + 2.1185, + 38.643, + 1.9916 + ] ], - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "insideBoundingBox": { "oneOf": [ @@ -946,10 +1051,26 @@ }, "description": "Coordinates of a polygon in which to search.\n\nPolygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude.\nProvide multiple polygons as nested arrays.\nFor more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).\nThis parameter is ignored if you also specify `insideBoundingBox`.\n", "example": [ - [47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9], - [40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104] + [ + 47.3165, + 4.9665, + 47.3424, + 5.0201, + 47.32, + 4.9 + ], + [ + 40.9234, + 2.1185, + 38.643, + 1.9916, + 39.2587, + 2.0104 + ] ], - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "supportedLanguage": { "type": "string", @@ -1032,7 +1153,9 @@ }, "description": "ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches):\n\n- Sets `removeStopWords` and `ignorePlurals` to the list of provided languages.\n- Sets `removeWordsIfNoResults` to `allOptional`.\n- Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.\n", "default": [], - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "ruleContexts": { "type": "array", @@ -1041,8 +1164,12 @@ }, "description": "Assigns a rule context to the search query.\n\n[Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.\n", "default": [], - "example": ["mobile"], - "x-categories": ["Rules"] + "example": [ + "mobile" + ], + "x-categories": [ + "Rules" + ] }, "personalizationImpact": { "type": "integer", @@ -1050,37 +1177,49 @@ "default": 100, "minimum": 0, "maximum": 100, - "x-categories": ["Personalization"] + "x-categories": [ + "Personalization" + ] }, "userToken": { "type": "string", "description": "Unique pseudonymous or anonymous user identifier.\n\nThis helps with analytics and click and conversion events.\nFor more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).\n", "example": "test-user-123", - "x-categories": ["Personalization"] + "x-categories": [ + "Personalization" + ] }, "getRankingInfo": { "type": "boolean", "description": "Whether the search response should include detailed ranking information.", "default": false, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "synonyms": { "type": "boolean", "description": "Whether to take into account an index's synonyms for this search.", "default": true, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "clickAnalytics": { "type": "boolean", "description": "Whether to include a `queryID` attribute in the response.\n\nThe query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).\n", "default": false, - "x-categories": ["Analytics"] + "x-categories": [ + "Analytics" + ] }, "analytics": { "type": "boolean", "description": "Whether this search will be included in Analytics.", "default": true, - "x-categories": ["Analytics"] + "x-categories": [ + "Analytics" + ] }, "analyticsTags": { "type": "array", @@ -1089,19 +1228,25 @@ }, "description": "Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).", "default": [], - "x-categories": ["Analytics"] + "x-categories": [ + "Analytics" + ] }, "percentileComputation": { "type": "boolean", "description": "Whether to include this search when calculating processing-time percentiles.", "default": true, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "enableABTest": { "type": "boolean", "description": "Whether to enable A/B testing for this search.", "default": true, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "baseRecommendSearchParams": { "type": "object", @@ -1197,7 +1342,9 @@ "type": "string", "description": "Search query.", "default": "", - "x-categories": ["Search"] + "x-categories": [ + "Search" + ] }, "searchParamsQuery": { "type": "object", @@ -1215,14 +1362,18 @@ }, "description": "An object with custom data.\n\nYou can store up to 32kB as custom data.\n", "default": {}, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "maxFacetHits": { "type": "integer", "description": "Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", "maximum": 100, "default": 10, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "baseIndexSettings": { "type": "object", @@ -1242,17 +1393,24 @@ ], "description": "Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/).\n\nFacets are attributes that let you categorize search results.\nThey can be used for filtering search results.\nBy default, no attribute is used for faceting.\nAttribute names are case-sensitive.\n\n**Modifiers**\n\n- `filterOnly(\"ATTRIBUTE\")`.\n Allows the attribute to be used as a filter but doesn't evaluate the facet values.\n\n- `searchable(\"ATTRIBUTE\")`.\n Allows searching for facet values.\n\n- `afterDistinct(\"ATTRIBUTE\")`.\n Evaluates the facet count _after_ deduplication with `distinct`.\n This ensures accurate facet counts.\n You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.\n", "default": [], - "x-categories": ["Faceting"] + "x-categories": [ + "Faceting" + ] }, "replicas": { "type": "array", "items": { "type": "string" }, - "example": ["virtual(prod_products_price_asc)", "dev_products_replica"], + "example": [ + "virtual(prod_products_price_asc)", + "dev_products_replica" + ], "description": "Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/).\n\nReplicas are copies of a primary index with the same records but different settings, synonyms, or rules.\nIf you want to offer a different ranking or sorting of your search results, you'll use replica indices.\nAll index operations on a primary index are automatically forwarded to its replicas.\nTo add a replica index, you must provide the complete set of replicas to this parameter.\nIf you omit a replica from this list, the replica turns into a regular, standalone index that will no longer be synced with the primary index.\n\n**Modifier**\n\n- `virtual(\"REPLICA\")`.\n Create a virtual replica,\n Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).\n", "default": [], - "x-categories": ["Ranking"] + "x-categories": [ + "Ranking" + ] }, "paginationLimitedTo": { "type": "integer", @@ -1266,20 +1424,29 @@ "items": { "type": "string" }, - "example": ["total_sales"], + "example": [ + "total_sales" + ], "description": "Attributes that can't be retrieved at query time.\n\nThis can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/),\nbut don't want to include it in the search results.\nAttribute names are case-sensitive.\n", "default": [], - "x-categories": ["Attributes"] + "x-categories": [ + "Attributes" + ] }, "disableTypoToleranceOnWords": { "type": "array", "items": { "type": "string" }, - "example": ["wheel", "1X2BCD"], + "example": [ + "wheel", + "1X2BCD" + ], "description": "Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words).\nThis also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.\n", "default": [], - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "attributesToTransliterate": { "description": "Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead).\n\nTransliteration supports searching in any of the Japanese writing systems.\nTo support transliteration, you must set the indexing language to Japanese.\nAttribute names are case-sensitive.\n", @@ -1287,53 +1454,76 @@ "items": { "type": "string" }, - "example": ["name", "description"], - "x-categories": ["Languages"] + "example": [ + "name", + "description" + ], + "x-categories": [ + "Languages" + ] }, "camelCaseAttributes": { "type": "array", "items": { "type": "string" }, - "example": ["description"], + "example": [ + "description" + ], "description": "Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.\nAttribute names are case-sensitive.\n", "default": [], - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "decompoundedAttributes": { "type": "object", "example": { - "de": ["name"] + "de": [ + "name" + ] }, "description": "Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding).\nAttribute names are case-sensitive.\n\nCompound words are formed by combining two or more individual words,\nand are particularly prevalent in Germanic languages—for example, \"firefighter\".\nWith decompounding, the individual components are indexed separately.\n\nYou can specify different lists for different languages.\nDecompounding is supported for these languages:\nDutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`).\nDecompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).\nFor example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).\n", "default": {}, - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "indexLanguages": { "type": "array", "items": { "$ref": "#/components/schemas/supportedLanguage" }, - "example": ["ja"], + "example": [ + "ja" + ], "description": "Languages for language-specific processing steps, such as word detection and dictionary settings.\n\n**You should always specify an indexing language.**\nIf you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).\n", "default": [], - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "disablePrefixOnAttributes": { "type": "array", "items": { "type": "string" }, - "example": ["sku"], + "example": [ + "sku" + ], "description": "Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).\nAttribute names are case-sensitive.\n", "default": [], - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "allowCompressionOfIntegerArray": { "type": "boolean", "description": "Whether arrays with exclusively non-negative integers should be compressed for better performance.\nIf true, the compressed arrays may be reordered.\n", "default": false, - "x-categories": ["Performance"] + "x-categories": [ + "Performance" + ] }, "numericAttributesForFiltering": { "type": "array", @@ -1341,26 +1531,40 @@ "type": "string" }, "description": "Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters).\nAttribute names are case-sensitive.\n\nBy default, all numeric attributes are available as numerical filters.\nFor faster indexing, reduce the number of numeric attributes.\n\nTo turn off filtering for all numeric attributes, specify an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`.\n\n**Modifier**\n\n- `equalOnly(\"ATTRIBUTE\")`.\n Support only filtering based on equality comparisons `=` and `!=`.\n", - "example": ["equalOnly(quantity)", "popularity"], + "example": [ + "equalOnly(quantity)", + "popularity" + ], "default": [], - "x-categories": ["Performance"] + "x-categories": [ + "Performance" + ] }, "separatorsToIndex": { "type": "string", "example": "+#", "description": "Control which non-alphanumeric characters are indexed.\n\nBy default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`).\nTo include such characters, define them with `separatorsToIndex`.\n\nSeparators are all non-letter characters except spaces and currency characters, such as $€£¥.\n\nWith `separatorsToIndex`, Algolia treats separator characters as separate words.\nFor example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.\n", "default": "", - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "searchableAttributes": { "type": "array", "items": { "type": "string" }, - "example": ["title,alternative_title", "author", "unordered(text)", "emails.personal"], + "example": [ + "title,alternative_title", + "author", + "unordered(text)", + "emails.personal" + ], "description": "Attributes used for searching. Attribute names are case-sensitive.\n\nBy default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off.\nWith a non-empty list, Algolia only returns results with matches in the selected attributes.\nIn addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first.\nTo make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`.\nAttributes with the same priority are always unordered.\n\nFor more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/).\n\n**Modifier**\n\n- `unordered(\"ATTRIBUTE\")`.\n Ignore the position of a match within the attribute.\n\nWithout a modifier, matches at the beginning of an attribute rank higher than matches at the end.\n", "default": [], - "x-categories": ["Attributes"] + "x-categories": [ + "Attributes" + ] }, "userData": { "$ref": "#/components/schemas/userData" @@ -1380,7 +1584,9 @@ "type": "string" } }, - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "attributeForDistinct": { "description": "Attribute that should be used to establish groups of results.\nAttribute names are case-sensitive.\n\nAll records with the same value for this attribute are considered a group.\nYou can combine `attributeForDistinct` with the `distinct` search parameter to control\nhow many items per group are included in the search results.\n\nIf you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting.\nThis applies faceting _after_ deduplication, which will result in accurate facet counts.\n", @@ -1395,17 +1601,24 @@ "example": "øé", "description": "Characters for which diacritics should be preserved.\n\nBy default, Algolia removes diacritics from letters.\nFor example, `é` becomes `e`. If this causes issues in your search,\nyou can specify characters that should keep their diacritics.\n", "default": "", - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "customRanking": { "type": "array", "items": { "type": "string" }, - "example": ["desc(popularity)", "asc(price)"], + "example": [ + "desc(popularity)", + "asc(price)" + ], "description": "Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/).\nAttribute names are case-sensitive.\n\nThe custom ranking attributes decide which items are shown first if the other ranking criteria are equal.\n\nRecords with missing values for your selected custom ranking attributes are always sorted last.\nBoolean attributes are sorted based on their alphabetical order.\n\n**Modifiers**\n\n- `asc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in ascending order.\n\n- `desc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in descending order.\n\nIf you use two or more custom ranking attributes,\n[reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes,\nor the other attributes will never be applied.\n", "default": [], - "x-categories": ["Ranking"] + "x-categories": [ + "Ranking" + ] } } }, @@ -1414,10 +1627,18 @@ "items": { "type": "string" }, - "example": ["author", "title", "content"], + "example": [ + "author", + "title", + "content" + ], "description": "Attributes to include in the API response.\n\nTo reduce the size of your response, you can retrieve only some of the attributes.\nAttribute names are case-sensitive.\n\n- `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings.\n- To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`.\n- The `objectID` attribute is always included.\n", - "default": ["*"], - "x-categories": ["Attributes"] + "default": [ + "*" + ], + "x-categories": [ + "Attributes" + ] }, "ranking": { "type": "array", @@ -1425,76 +1646,116 @@ "type": "string" }, "description": "Determines the order in which Algolia returns your results.\n\nBy default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).\nThe tie-breaking algorithm sequentially applies each criterion in the order they're specified.\nIf you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/),\nyou put the sorting attribute at the top of the list.\n\n**Modifiers**\n\n- `asc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in ascending order.\n- `desc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in descending order.\n\nBefore you modify the default setting,\nyou should test your changes in the dashboard,\nand by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).\n", - "default": ["typo", "geo", "words", "filters", "proximity", "attribute", "exact", "custom"], - "x-categories": ["Ranking"] + "default": [ + "typo", + "geo", + "words", + "filters", + "proximity", + "attribute", + "exact", + "custom" + ], + "x-categories": [ + "Ranking" + ] }, "relevancyStrictness": { "type": "integer", "example": 90, "description": "Relevancy threshold below which less relevant results aren't included in the results.\n\nYou can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas).\nUse this setting to strike a balance between the relevance and number of returned results.\n", "default": 100, - "x-categories": ["Ranking"] + "x-categories": [ + "Ranking" + ] }, "attributesToHighlight": { "type": "array", "items": { "type": "string" }, - "example": ["author", "title", "conten", "content"], + "example": [ + "author", + "title", + "conten", + "content" + ], "description": "Attributes to highlight.\n\nBy default, all searchable attributes are highlighted.\nUse `*` to highlight all attributes or use an empty array `[]` to turn off highlighting.\nAttribute names are case-sensitive.\n\nWith highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`.\nYou can use this to visually highlight matching parts of a search query in your UI.\n\nFor more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/).\n", - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "attributesToSnippet": { "type": "array", "items": { "type": "string" }, - "example": ["content:80", "description"], + "example": [ + "content:80", + "description" + ], "description": "Attributes for which to enable snippets.\nAttribute names are case-sensitive.\n\nSnippets provide additional context to matched words.\nIf you enable snippets, they include 10 words, including the matched word.\nThe matched word will also be wrapped by HTML tags for highlighting.\nYou can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`,\nwhere `NUMBER` is the number of words to be extracted.\n", "default": [], - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "highlightPreTag": { "type": "string", "description": "HTML tag to insert before the highlighted parts in all highlighted results and snippets.", "default": "", - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "highlightPostTag": { "type": "string", "description": "HTML tag to insert after the highlighted parts in all highlighted results and snippets.", "default": "", - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "snippetEllipsisText": { "type": "string", "description": "String used as an ellipsis indicator when a snippet is truncated.", "default": "…", - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "restrictHighlightAndSnippetArrays": { "type": "boolean", "description": "Whether to restrict highlighting and snippeting to items that at least partially matched the search query.\nBy default, all items are highlighted and snippeted.\n", "default": false, - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "minWordSizefor1Typo": { "type": "integer", "description": "Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", "default": 4, - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "minWordSizefor2Typos": { "type": "integer", "description": "Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", "default": 8, - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "typoToleranceEnum": { "type": "string", "title": "typo tolerance", "description": "- `min`. Return matches with the lowest number of typos.\n For example, if you have matches without typos, only include those.\n But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos).\n- `strict`. Return matches with the two lowest numbers of typos.\n With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.\n", - "enum": ["min", "strict"] + "enum": [ + "min", + "strict" + ] }, "typoTolerance": { "description": "Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied.\n\nIf typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) are also active.\n", @@ -1508,31 +1769,45 @@ "$ref": "#/components/schemas/typoToleranceEnum" } ], - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "allowTyposOnNumericTokens": { "type": "boolean", "description": "Whether to allow typos on numbers in the search query.\n\nTurn off this setting to reduce the number of irrelevant matches\nwhen searching in large sets of similar numbers.\n", "default": true, - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "disableTypoToleranceOnAttributes": { "type": "array", "items": { "type": "string" }, - "example": ["sku"], + "example": [ + "sku" + ], "description": "Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).\nAttribute names are case-sensitive.\n\nReturning only exact matches can help when:\n\n- [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/).\n- Reducing the number of matches when you have too many.\n This can happen with attributes that are long blocks of text, such as product descriptions.\n\nConsider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.\n", "default": [], - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "booleanString": { "type": "string", - "enum": ["true", "false"] + "enum": [ + "true", + "false" + ] }, "ignorePlurals": { "description": "Treat singular, plurals, and other forms of declensions as equivalent.\nYou should only use this feature for the languages used in your index.\n", - "example": ["ca", "es"], + "example": [ + "ca", + "es" + ], "oneOf": [ { "type": "array", @@ -1550,11 +1825,16 @@ "default": false } ], - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "removeStopWords": { "description": "Removes stop words from the search query.\n\nStop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own.\nIn English, \"the\", \"a\", or \"and\" are stop words.\n\nYou should only use this feature for the languages used in your index.\n", - "example": ["ca", "es"], + "example": [ + "ca", + "es" + ], "oneOf": [ { "type": "array", @@ -1569,66 +1849,98 @@ "description": "If true, stop words are removed for all languages you included in `queryLanguages`, or for all supported languages, if `queryLanguages` is empty.\nIf false, stop words are not removed.\n" } ], - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "queryLanguages": { "type": "array", "items": { "$ref": "#/components/schemas/supportedLanguage" }, - "example": ["es"], + "example": [ + "es" + ], "description": "Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries.\n\nThis setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings.\nThis setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages.\nTo support this, you must place the CJK language **first**.\n\n**You should always specify a query language.**\nIf you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).\n", "default": [], - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "decompoundQuery": { "type": "boolean", "description": "Whether to split compound words in the query into their building blocks.\n\nFor more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words).\nWord segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.\nDecompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).\nFor example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).\n", "default": true, - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "enableRules": { "type": "boolean", "description": "Whether to enable rules.", "default": true, - "x-categories": ["Rules"] + "x-categories": [ + "Rules" + ] }, "enablePersonalization": { "type": "boolean", "description": "Whether to enable Personalization.", "default": false, - "x-categories": ["Personalization"] + "x-categories": [ + "Personalization" + ] }, "queryType": { "type": "string", - "enum": ["prefixLast", "prefixAll", "prefixNone"], + "enum": [ + "prefixLast", + "prefixAll", + "prefixNone" + ], "description": "Determines if and how query words are interpreted as prefixes.\n\nBy default, only the last query word is treated as a prefix (`prefixLast`).\nTo turn off prefix search, use `prefixNone`.\nAvoid `prefixAll`, which treats all query words as prefixes.\nThis might lead to counterintuitive results and makes your search slower.\n\nFor more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).\n", "default": "prefixLast", - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "removeWordsIfNoResults": { "type": "string", - "enum": ["none", "lastWords", "firstWords", "allOptional"], + "enum": [ + "none", + "lastWords", + "firstWords", + "allOptional" + ], "example": "firstWords", "description": "Strategy for removing words from the query when it doesn't return any results.\nThis helps to avoid returning empty search results.\n\n- `none`.\n No words are removed when a query doesn't return results.\n\n- `lastWords`.\n Treat the last (then second to last, then third to last) word as optional,\n until there are results or at most 5 words have been removed.\n\n- `firstWords`.\n Treat the first (then second, then third) word as optional,\n until there are results or at most 5 words have been removed.\n\n- `allOptional`.\n Treat all words as optional.\n\nFor more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).\n", "default": "none", - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "advancedSyntax": { "type": "boolean", "description": "Whether to support phrase matching and excluding words from search queries.\n\nUse the `advancedSyntaxFeatures` parameter to control which feature is supported.\n", "default": false, - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "optionalWordsArray": { "type": "array", "items": { "type": "string" }, - "example": ["blue", "iphone case"], + "example": [ + "blue", + "iphone case" + ], "description": "List of [optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).", "default": [], - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "optionalWords": { "description": "Words that should be considered optional when found in the query.\n\nBy default, records must match all words in the search query to be included in the search results.\nAdding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words.\nFor example, if the search query is \"action video\" and \"video\" is an optional word,\nthe search engine runs two queries. One for \"action video\" and one for \"action\".\nRecords that match all words are ranked higher.\n\nFor a search query with 4 or more words **and** all its words are optional,\nthe number of matched words required for a record to be included in the search results increases for every 1,000 records:\n\n- If `optionalWords` has less than 10 words, the required number of matched words increases by 1:\n results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words.\n- If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down).\n For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words.\n\nFor more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).\n", @@ -1649,22 +1961,39 @@ "items": { "type": "string" }, - "example": ["description"], + "example": [ + "description" + ], "description": "Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).\nAttribute names are case-sensitive.\n\nThis can be useful for attributes with long values, where the likelihood of an exact match is high,\nsuch as product descriptions.\nTurning off the Exact ranking criterion for these attributes favors exact matching on other attributes.\nThis reduces the impact of individual attributes with a lot of content on ranking.\n", "default": [], - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "exactOnSingleWordQuery": { "type": "string", - "enum": ["attribute", "none", "word"], + "enum": [ + "attribute", + "none", + "word" + ], "description": "Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.\n\n- `attribute`.\n The Exact ranking criterion is 1 if the query word and attribute value are the same.\n For example, a search for \"road\" will match the value \"road\", but not \"road trip\".\n\n- `none`.\n The Exact ranking criterion is ignored on single-word searches.\n\n- `word`.\n The Exact ranking criterion is 1 if the query word is found in the attribute value.\n The query word must have at least 3 characters and must not be a stop word.\n Only exact matches will be highlighted,\n partial and prefix matches won't.\n", "default": "attribute", - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "alternativesAsExact": { "type": "string", - "enum": ["ignorePlurals", "singleWordSynonym", "multiWordsSynonym", "ignoreConjugations"], - "x-categories": ["Query strategy"] + "enum": [ + "ignorePlurals", + "singleWordSynonym", + "multiWordsSynonym", + "ignoreConjugations" + ], + "x-categories": [ + "Query strategy" + ] }, "properties-alternativesAsExact": { "type": "array", @@ -1672,13 +2001,23 @@ "$ref": "#/components/schemas/alternativesAsExact" }, "description": "Determine which plurals and synonyms should be considered an exact matches.\n\nBy default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching.\nFor example:\n\n- \"swimsuit\" and \"swimsuits\" are treated the same\n- \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)).\n\n- `ignorePlurals`.\n Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.\n\n- `singleWordSynonym`.\n Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches.\n\n- `multiWordsSynonym`.\n Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.\n", - "default": ["ignorePlurals", "singleWordSynonym"], - "x-categories": ["Query strategy"] + "default": [ + "ignorePlurals", + "singleWordSynonym" + ], + "x-categories": [ + "Query strategy" + ] }, "advancedSyntaxFeatures": { "type": "string", - "enum": ["exactPhrase", "excludeWords"], - "x-categories": ["Query strategy"] + "enum": [ + "exactPhrase", + "excludeWords" + ], + "x-categories": [ + "Query strategy" + ] }, "properties-advancedSyntaxFeatures": { "type": "array", @@ -1686,8 +2025,13 @@ "$ref": "#/components/schemas/advancedSyntaxFeatures" }, "description": "Advanced search syntax features you want to support.\n\n- `exactPhrase`.\n Phrases in quotes must match exactly.\n For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".\n\n- `excludeWords`.\n Query words prefixed with a `-` must not occur in a record.\n For example, `search -engine` matches records that contain \"search\" but not \"engine\".\n\nThis setting only has an effect if `advancedSyntax` is true.\n", - "default": ["exactPhrase", "excludeWords"], - "x-categories": ["Query strategy"] + "default": [ + "exactPhrase", + "excludeWords" + ], + "x-categories": [ + "Query strategy" + ] }, "distinct": { "description": "Determines how many records of a group are included in the search results.\n\nRecords with the same value for the `attributeForDistinct` attribute are considered a group.\nThe `distinct` setting controls how many members of the group are returned.\nThis is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature).\n\nThe `distinct` setting is ignored if `attributeForDistinct` is not set.\n", @@ -1705,13 +2049,17 @@ "default": 0 } ], - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "replaceSynonymsInHighlight": { "type": "boolean", "description": "Whether to replace a highlighted word with the matched synonym.\n\nBy default, the original words are highlighted even if a synonym matches.\nFor example, with `home` as a synonym for `house` and a search for `home`,\nrecords matching either \"home\" or \"house\" are included in the search results,\nand either \"home\" or \"house\" are highlighted.\n\nWith `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records,\nbut all occurrences of \"house\" are replaced by \"home\" in the highlighted response.\n", "default": false, - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "minProximity": { "type": "integer", @@ -1719,7 +2067,9 @@ "maximum": 7, "description": "Minimum proximity score for two matching words.\n\nThis adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity)\nby equally scoring matches that are farther apart.\n\nFor example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.\n", "default": 1, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "responseFields": { "type": "array", @@ -1727,27 +2077,37 @@ "type": "string" }, "description": "Properties to include in the API response of search and browse requests.\n\nBy default, all response properties are included.\nTo reduce the response size, you can select which properties should be included.\n\nAn empty list may lead to an empty API response (except properties you can't exclude).\n\nYou can't exclude these properties:\n`message`, `warning`, `cursor`, `abTestVariantID`,\nor any property added by setting `getRankingInfo` to true.\n\nYour search depends on the `hits` field. If you omit this field, searches won't return any results.\nYour UI might also depend on other properties, for example, for pagination.\nBefore restricting the response size, check the impact on your search experience.\n", - "default": ["*"], - "x-categories": ["Advanced"] + "default": [ + "*" + ], + "x-categories": [ + "Advanced" + ] }, "maxValuesPerFacet": { "type": "integer", "description": "Maximum number of facet values to return for each facet.", "default": 100, "maximum": 1000, - "x-categories": ["Faceting"] + "x-categories": [ + "Faceting" + ] }, "sortFacetValuesBy": { "type": "string", "description": "Order in which to retrieve facet values.\n\n- `count`.\n Facet values are retrieved by decreasing count.\n The count is the number of matching records containing this facet value.\n\n- `alpha`.\n Retrieve facet values alphabetically.\n\nThis setting doesn't influence how facet values are displayed in your UI (see `renderingContent`).\nFor more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).\n", "default": "count", - "x-categories": ["Faceting"] + "x-categories": [ + "Faceting" + ] }, "attributeCriteriaComputedByMinProximity": { "type": "boolean", "description": "Whether the best matching attribute should be determined by minimum proximity.\n\nThis setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting.\nIf true, the best matching attribute is selected based on the minimum proximity of multiple matches.\nOtherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.\n", "default": false, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "order": { "description": "Explicit order of facets or facet values.\n\nThis setting lets you always show specific facets or facet values at the top of the list.\n", @@ -1769,7 +2129,11 @@ "sortRemainingBy": { "description": "Order of facet values that aren't explicitly positioned with the `order` setting.\n\n- `count`.\n Order remaining facet values by decreasing count.\n The count is the number of matching records containing this facet value.\n\n- `alpha`.\n Sort facet values alphabetically.\n\n- `hidden`.\n Don't show facet values that aren't explicitly positioned.\n", "type": "string", - "enum": ["count", "alpha", "hidden"] + "enum": [ + "count", + "alpha", + "hidden" + ] }, "hide": { "description": "Hide facet values.", @@ -1905,13 +2269,17 @@ "$ref": "#/components/schemas/widgets" } }, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "enableReRanking": { "type": "boolean", "description": "Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).\n\nThis setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.\n", "default": true, - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "reRankingApplyFilter": { "description": "Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.\n", @@ -1924,7 +2292,9 @@ }, { "type": "string", - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] } ] }, @@ -2109,12 +2479,17 @@ "$ref": "#/components/schemas/recommendSearchParams" } }, - "required": ["indexName", "threshold"] + "required": [ + "indexName", + "threshold" + ] }, "fbtModel": { "type": "string", "description": "Frequently bought together model.\n\nThis model recommends items that have been purchased within 1 day with the item with the ID `objectID`.\n", - "enum": ["bought-together"] + "enum": [ + "bought-together" + ] }, "objectID": { "type": "string", @@ -2131,7 +2506,10 @@ "$ref": "#/components/schemas/objectID" } }, - "required": ["model", "objectID"] + "required": [ + "model", + "objectID" + ] }, "boughtTogetherQuery": { "title": "Frequently bought together", @@ -2147,7 +2525,9 @@ "relatedModel": { "type": "string", "description": "Related products or similar content model.\n\nThis model recommends items that are similar to the item with the ID `objectID`.\nSimilarity is determined from the user interactions and attributes.\n", - "enum": ["related-products"] + "enum": [ + "related-products" + ] }, "fallbackParams": { "title": "fallbackParameters", @@ -2174,7 +2554,10 @@ "$ref": "#/components/schemas/fallbackParams" } }, - "required": ["model", "objectID"] + "required": [ + "model", + "objectID" + ] }, "relatedQuery": { "title": "Related products", @@ -2198,7 +2581,9 @@ "trendingItemsModel": { "description": "Trending items model.\n\nTrending items are determined from the number of conversion events collected on them.\n", "type": "string", - "enum": ["trending-items"] + "enum": [ + "trending-items" + ] }, "trendingItems": { "type": "object", @@ -2216,7 +2601,9 @@ "$ref": "#/components/schemas/fallbackParams" } }, - "required": ["model"] + "required": [ + "model" + ] }, "trendingItemsQuery": { "title": "Trending items", @@ -2232,7 +2619,9 @@ "trendingFacetsModel": { "type": "string", "description": "Trending facet values model.\n\nThis model recommends trending facet values for the specified facet attribute.\n", - "enum": ["trending-facets"] + "enum": [ + "trending-facets" + ] }, "trendingFacets": { "type": "object", @@ -2248,7 +2637,10 @@ "$ref": "#/components/schemas/fallbackParams" } }, - "required": ["facetName", "model"] + "required": [ + "facetName", + "model" + ] }, "trendingFacetsQuery": { "title": "Trending facet values", @@ -2264,7 +2656,9 @@ "lookingSimilarModel": { "type": "string", "description": "Looking similar model.\n\nThis model recommends items that look similar to the item with the ID `objectID` based on image attributes in your index.\n", - "enum": ["looking-similar"] + "enum": [ + "looking-similar" + ] }, "lookingSimilar": { "type": "object", @@ -2279,7 +2673,10 @@ "$ref": "#/components/schemas/fallbackParams" } }, - "required": ["model", "objectID"] + "required": [ + "model", + "objectID" + ] }, "lookingSimilarQuery": { "title": "Looking similar", @@ -2339,7 +2736,9 @@ "title": "redirectRuleIndexData", "type": "object", "description": "Redirect rule data.", - "required": ["ruleObjectID"], + "required": [ + "ruleObjectID" + ], "properties": { "ruleObjectID": { "type": "string" @@ -2347,12 +2746,20 @@ } } }, - "required": ["data", "succeed", "reason", "dest", "source"] + "required": [ + "data", + "succeed", + "reason", + "dest", + "source" + ] }, "baseSearchResponse": { "type": "object", "additionalProperties": true, - "required": ["processingTimeMS"], + "required": [ + "processingTimeMS" + ], "properties": { "abTestID": { "type": "integer", @@ -2557,7 +2964,9 @@ "description": "Page of search results to retrieve.", "default": 0, "minimum": 0, - "x-categories": ["Pagination"] + "x-categories": [ + "Pagination" + ] }, "nbHits": { "type": "integer", @@ -2575,7 +2984,9 @@ "default": 20, "minimum": 1, "maximum": 1000, - "x-categories": ["Pagination"] + "x-categories": [ + "Pagination" + ] }, "SearchPagination": { "type": "object", @@ -2603,7 +3014,11 @@ "matchLevel": { "type": "string", "description": "Whether the whole query string matches or only a part.", - "enum": ["none", "partial", "full"] + "enum": [ + "none", + "partial", + "full" + ] }, "highlightResultOption": { "type": "object", @@ -2619,7 +3034,9 @@ "matchedWords": { "type": "array", "description": "List of matched words from the search query.", - "example": ["action"], + "example": [ + "action" + ], "items": { "type": "string" } @@ -2629,8 +3046,15 @@ "description": "Whether the entire attribute value is highlighted." } }, - "required": ["value", "matchLevel", "matchedWords"], - "x-discriminator-fields": ["matchLevel", "matchedWords"] + "required": [ + "value", + "matchLevel", + "matchedWords" + ], + "x-discriminator-fields": [ + "matchLevel", + "matchedWords" + ] }, "highlightResultMap": { "type": "object", @@ -2673,8 +3097,13 @@ "$ref": "#/components/schemas/matchLevel" } }, - "required": ["value", "matchLevel"], - "x-discriminator-fields": ["matchLevel"] + "required": [ + "value", + "matchLevel" + ], + "x-discriminator-fields": [ + "matchLevel" + ] }, "snippetResultMap": { "type": "object", @@ -2805,7 +3234,13 @@ "description": "Whether the record is re-ranked." } }, - "required": ["nbTypos", "firstMatchedWord", "geoDistance", "nbExactWords", "userScore"] + "required": [ + "nbTypos", + "firstMatchedWord", + "geoDistance", + "nbExactWords", + "userScore" + ] }, "distinctSeqID": { "type": "integer" @@ -2821,7 +3256,9 @@ "type": "object", "description": "Recommend hit.", "additionalProperties": true, - "required": ["objectID"], + "required": [ + "objectID" + ], "properties": { "objectID": { "$ref": "#/components/schemas/objectID" @@ -2842,12 +3279,17 @@ "$ref": "#/components/schemas/recommendScore" } }, - "x-discriminator-fields": ["objectID"] + "x-discriminator-fields": [ + "objectID" + ] }, "trendingFacetHit": { "type": "object", "description": "Trending facet hit.", - "required": ["facetName", "facetValue"], + "required": [ + "facetName", + "facetValue" + ], "properties": { "_score": { "$ref": "#/components/schemas/recommendScore" @@ -2859,7 +3301,10 @@ "$ref": "#/components/schemas/facetValue" } }, - "x-discriminator-fields": ["facetName", "facetValue"] + "x-discriminator-fields": [ + "facetName", + "facetValue" + ] }, "recommendationsHit": { "oneOf": [ @@ -2882,7 +3327,9 @@ } } }, - "required": ["hits"] + "required": [ + "hits" + ] }, "recommendationsResults": { "allOf": [ @@ -2899,7 +3346,12 @@ }, "recommendModels": { "type": "string", - "enum": ["related-products", "bought-together", "trending-facets", "trending-items"] + "enum": [ + "related-products", + "bought-together", + "trending-facets", + "trending-items" + ] }, "updatedAt": { "type": "string", @@ -3002,7 +3454,10 @@ "items": { "type": "string" }, - "example": ["category:books", "category:-movies"] + "example": [ + "category:books", + "category:-movies" + ] } } }, @@ -3036,7 +3491,10 @@ "description": "When the rule should stop to be active, in Unix epoch time." } }, - "required": ["from", "until"] + "required": [ + "from", + "until" + ] }, "RecommendRule": { "type": "object", @@ -3094,7 +3552,10 @@ }, "taskStatus": { "type": "string", - "enum": ["published", "notPublished"], + "enum": [ + "published", + "notPublished" + ], "description": "Task status, `published` if the task is completed, `notPublished` otherwise." }, "parameters_query": { @@ -3118,7 +3579,10 @@ "type": "object", "description": "Response, taskID, and update timestamp.", "additionalProperties": false, - "required": ["taskID", "updatedAt"], + "required": [ + "taskID", + "updatedAt" + ], "properties": { "taskID": { "$ref": "#/components/schemas/taskID" @@ -3179,7 +3643,10 @@ "description": "Response, taskID, and deletion timestamp.", "additionalProperties": false, "type": "object", - "required": ["taskID", "deletedAt"], + "required": [ + "taskID", + "deletedAt" + ], "properties": { "taskID": { "$ref": "#/components/schemas/taskID" @@ -3207,7 +3674,10 @@ "x-tagGroups": [ { "name": "Recommend", - "tags": ["recommendations", "rules"] + "tags": [ + "recommendations", + "rules" + ] } ] -} +} \ No newline at end of file diff --git a/src/data/search.json b/src/data/search.json index eb22759..e38ff14 100644 --- a/src/data/search.json +++ b/src/data/search.json @@ -166,8 +166,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["search"] + } }, "post": { "operationId": "customPost", @@ -214,8 +213,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["search"] + } }, "put": { "operationId": "customPut", @@ -262,8 +260,7 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["search"] + } }, "delete": { "operationId": "customDelete", @@ -300,17 +297,21 @@ "404": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["search"] + } } }, "/1/indexes/{indexName}/query": { "post": { - "tags": ["search"], + "tags": [ + "Search" + ], "operationId": "searchSingleIndex", + "x-mcp-tool": true, "x-use-read-transporter": true, "x-cacheable": true, - "x-acl": ["search"], + "x-acl": [ + "search" + ], "summary": "Search an index", "description": "Searches a single index and returns matching search results (_hits_).\n\nThis method lets you retrieve up to 1,000 hits.\nIf you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting.\n", "parameters": [ @@ -355,14 +356,18 @@ }, "/1/indexes/*/queries": { "post": { - "tags": ["search"], + "tags": [ + "Search" + ], "operationId": "search", "x-use-read-transporter": true, "x-cacheable": true, "x-legacy-signature": true, - "x-acl": ["search"], + "x-acl": [ + "search" + ], "summary": "Search multiple indices", - "description": "Sends multiple search requests to one or more indices.\n\nThis can be useful in these cases:\n\n- Different indices for different purposes, such as, one index for products, another one for marketing content.\n- Multiple searches to the same index—for example, with different filters.\n", + "description": "Sends multiple search requests to one or more indices.\n\nThis can be useful in these cases:\n\n- Different indices for different purposes, such as, one index for products, another one for marketing content.\n- Multiple searches to the same index—for example, with different filters.\n\nUse the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.\n", "requestBody": { "required": true, "description": "Muli-search request body. Results are returned in the same order as the requests.", @@ -383,7 +388,9 @@ "$ref": "#/components/schemas/searchStrategy" } }, - "required": ["requests"] + "required": [ + "requests" + ] } } } @@ -405,7 +412,9 @@ } } }, - "required": ["results"] + "required": [ + "results" + ] } } } @@ -427,11 +436,15 @@ }, "/1/indexes/{indexName}/facets/{facetName}/query": { "post": { - "tags": ["search"], + "tags": [ + "Search" + ], "operationId": "searchForFacetValues", "x-use-read-transporter": true, "x-cacheable": true, - "x-acl": ["search"], + "x-acl": [ + "search" + ], "summary": "Search for facet values", "description": "Searches for values of a specified facet attribute.\n\n- By default, facet values are sorted by decreasing count.\n You can adjust this with the `sortFacetValueBy` parameter.\n- Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**.\n", "parameters": [ @@ -498,10 +511,14 @@ }, "/1/indexes/{indexName}/browse": { "post": { - "tags": ["search"], + "tags": [ + "Search" + ], "operationId": "browse", "x-use-read-transporter": true, - "x-acl": ["browse"], + "x-acl": [ + "browse" + ], "summary": "Browse for records", "description": "Retrieves records from an index, up to 1,000 per request.\n\nWhile searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details),\nbrowsing _just_ returns matching records.\nThis can be useful if you want to export your indices.\n\n- The Analytics API doesn't collect data when using `browse`.\n- Records are ranked by attributes and custom ranking.\n- There's no ranking for: typo-tolerance, number of matched words, proximity, geo distance.\n\nBrowse requests automatically apply these settings:\n\n- `advancedSyntax`: `false`\n- `attributesToHighlight`: `[]`\n- `attributesToSnippet`: `[]`\n- `distinct`: `false`\n- `enablePersonalization`: `false`\n- `enableRules`: `false`\n- `facets`: `[]`\n- `getRankingInfo`: `false`\n- `ignorePlurals`: `false`\n- `optionalFilters`: `[]`\n- `typoTolerance`: `true` or `false` (`min` and `strict` evaluate to `true`)\n\nIf you send these parameters with your browse requests, they'll be ignored.\n", "parameters": [ @@ -546,9 +563,14 @@ }, "/1/indexes/{indexName}": { "post": { - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "saveObject", - "x-acl": ["addObject"], + "x-mcp-tool": true, + "x-acl": [ + "addObject" + ], "description": "Adds a record to an index or replaces it.\n\n- If the record doesn't have an object ID, a new record with an auto-generated object ID is added to your index.\n- If a record with the specified object ID exists, the existing record is replaced.\n- If a record with the specified object ID doesn't exist, a new record is added to your index.\n- If you add a record to an index that doesn't exist yet, a new index is created.\n\nTo update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject).\nTo add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).\n\nThis operation is subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n", "summary": "Add a new record (with auto-generated object ID)", "parameters": [ @@ -587,7 +609,10 @@ "$ref": "#/components/schemas/objectID" } }, - "required": ["taskID", "createdAt"] + "required": [ + "taskID", + "createdAt" + ] } } } @@ -607,9 +632,13 @@ } }, "delete": { - "tags": ["search"], + "tags": [ + "Indices" + ], "operationId": "deleteIndex", - "x-acl": ["deleteIndex"], + "x-acl": [ + "deleteIndex" + ], "summary": "Delete an index", "description": "Deletes an index and all its settings.\n\n- Deleting an index doesn't delete its analytics data.\n- If you try to delete a non-existing index, the operation is ignored without warning.\n- If the index you want to delete has replica indices, the replicas become independent indices.\n- If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it.\n For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/).\n", "externalDocs": { @@ -642,9 +671,13 @@ }, "/1/indexes/{indexName}/{objectID}": { "get": { - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "getObject", - "x-acl": ["search"], + "x-acl": [ + "search" + ], "summary": "Retrieve a record", "description": "Retrieves one record by its object ID.\n\nTo retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).\n", "parameters": [ @@ -693,9 +726,13 @@ } }, "put": { - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "addOrUpdateObject", - "x-acl": ["addObject"], + "x-acl": [ + "addObject" + ], "summary": "Add or replace a record", "description": "If a record with the specified object ID exists, the existing record is replaced.\nOtherwise, a new record is added to the index.\n\nIf you want to use auto-generated object IDs, use the [`saveObject` operation](#tag/Records/operation/saveObject).\nTo update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead.\nTo add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).\n", "parameters": [ @@ -736,11 +773,15 @@ } }, "delete": { - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "deleteObject", - "x-acl": ["deleteObject"], + "x-acl": [ + "deleteObject" + ], "summary": "Delete a record", - "description": "Deletes a record by its object ID.\n\nTo delete more than one record, use the [`batch` operation](#tag/Records/operation/batch).\nTo delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy).\n", + "description": "Deletes a record by its object ID.\n\nTo delete more than one record, use the [`batch` operation](#tag/Records/operation/batch).\nTo delete records matching a query, use the [`deleteBy` operation](#tag/Records/operation/deleteBy).\n", "parameters": [ { "$ref": "#/components/parameters/IndexName" @@ -770,9 +811,14 @@ }, "/1/indexes/{indexName}/deleteByQuery": { "post": { - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "deleteBy", - "x-acl": ["deleteIndex"], + "x-mcp-tool": true, + "x-acl": [ + "deleteIndex" + ], "summary": "Delete records matching a filter", "description": "This operation doesn't accept empty filters.\n\nThis operation is resource-intensive.\nYou should only use it if you can't get the object IDs of the records you want to delete.\nIt's more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse),\nand then delete the records using the [`batch` operation](#tag/Records/operation/batch).\n\nThis operation is subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n", "externalDocs": { @@ -815,9 +861,13 @@ }, "/1/indexes/{indexName}/clear": { "post": { - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "clearObjects", - "x-acl": ["deleteIndex"], + "x-acl": [ + "deleteIndex" + ], "summary": "Delete all records from an index", "description": "Deletes only the records from an index while keeping settings, synonyms, and rules.\nThis operation is resource-intensive and subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n", "parameters": [ @@ -846,9 +896,14 @@ }, "/1/indexes/{indexName}/{objectID}/partial": { "post": { - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "partialUpdateObject", - "x-acl": ["addObject"], + "x-mcp-tool": true, + "x-acl": [ + "addObject" + ], "summary": "Add or update attributes", "x-codegen-request-body-name": "attributesToUpdate", "description": "Adds new attributes to a record, or updates existing ones.\n\n- If a record with the specified object ID doesn't exist,\n a new record is added to the index **if** `createIfNotExists` is true.\n- If the index doesn't exist yet, this method creates a new index.\n- You can use any first-level attribute but not nested attributes.\n If you specify a nested attribute, this operation replaces its first-level ancestor.\n\nTo update an attribute without pushing the entire record, you can use these built-in operations.\nThese operations can be helpful if you don't have access to your initial data.\n\n- Increment: increment a numeric attribute\n- Decrement: decrement a numeric attribute\n- Add: append a number or string element to an array attribute\n- Remove: remove all matching number or string elements from an array attribute made of numbers or strings\n- AddUnique: add a number or string element to an array attribute made of numbers or strings only if it's not already present\n- IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn't exist, the engine only creates it if you pass an IncrementFrom value of 0.\n- IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn't exist yet, the engine only creates it if you pass an IncrementSet value greater than 0.\n\nYou can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties:\n\n- _operation: the operation to apply on the attribute\n- value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.\n\nWhen updating multiple attributes or using multiple operations targeting the same record, you should use a single partial update for faster processing.\n\nThis operation is subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n", @@ -902,8 +957,11 @@ }, "/1/indexes/{indexName}/batch": { "post": { - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "batch", + "x-mcp-tool": true, "summary": "Batch indexing operations on one index", "description": "Adds, updates, or deletes records in one index with a single API request.\n\nBatching index updates reduces latency and increases data integrity.\n\n- Actions are applied in the order they're specified.\n- Actions are equivalent to the individual API requests of the same name.\n\nThis operation is subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n", "parameters": [ @@ -950,8 +1008,11 @@ }, "/1/indexes/*/batch": { "post": { - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "multipleBatch", + "x-mcp-tool": true, "description": "Adds, updates, or deletes records in multiple indices with a single API request.\n\n- Actions are applied in the order they are specified.\n- Actions are equivalent to the individual API requests of the same name.\n\nThis operation is subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n", "summary": "Batch indexing operations on multiple indices", "requestBody": { @@ -982,11 +1043,16 @@ "$ref": "#/components/schemas/indexName" } }, - "required": ["action", "indexName"] + "required": [ + "action", + "indexName" + ] } } }, - "required": ["requests"] + "required": [ + "requests" + ] }, "examples": { "batch": { @@ -1039,7 +1105,10 @@ "$ref": "#/components/schemas/objectIDs" } }, - "required": ["taskID", "objectIDs"] + "required": [ + "taskID", + "objectIDs" + ] } } } @@ -1061,11 +1130,15 @@ }, "/1/indexes/*/objects": { "post": { - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "getObjects", "x-use-read-transporter": true, "x-cacheable": true, - "x-acl": ["search"], + "x-acl": [ + "search" + ], "summary": "Retrieve records", "description": "Retrieves one or more records, potentially from different indices.\n\nRecords are returned in the same order as the requests.\n", "requestBody": { @@ -1086,7 +1159,10 @@ "description": "Request body for retrieving records.", "type": "object", "additionalProperties": false, - "required": ["objectID", "indexName"], + "required": [ + "objectID", + "indexName" + ], "properties": { "attributesToRetrieve": { "type": "array", @@ -1094,7 +1170,11 @@ "type": "string" }, "description": "Attributes to retrieve.\nIf not specified, all retrievable attributes are returned.\n", - "example": ["author", "title", "content"] + "example": [ + "author", + "title", + "content" + ] }, "objectID": { "type": "string", @@ -1110,7 +1190,9 @@ } } }, - "required": ["requests"] + "required": [ + "requests" + ] } } } @@ -1140,7 +1222,9 @@ } } }, - "required": ["results"] + "required": [ + "results" + ] } } } @@ -1162,9 +1246,14 @@ }, "/1/indexes/{indexName}/settings": { "get": { - "tags": ["search"], + "tags": [ + "Indices" + ], "operationId": "getSettings", - "x-acl": ["search"], + "x-mcp-tool": true, + "x-acl": [ + "search" + ], "description": "Retrieves an object with non-null index settings.", "summary": "Retrieve index settings", "parameters": [ @@ -1198,9 +1287,13 @@ } }, "put": { - "tags": ["search"], + "tags": [ + "Indices" + ], "operationId": "setSettings", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "description": "Update the specified index settings.\n\nIndex settings that you don't specify are left unchanged.\nSpecify `null` to reset a setting to its default value.\n\nFor best performance, update the index settings before you add new records to your index.\n", "summary": "Update index settings", "parameters": [ @@ -1242,9 +1335,13 @@ }, "/1/indexes/{indexName}/synonyms/{objectID}": { "get": { - "tags": ["search"], + "tags": [ + "Synonyms" + ], "operationId": "getSynonym", - "x-acl": ["settings"], + "x-acl": [ + "settings" + ], "summary": "Retrieve a synonym", "description": "Retrieves a synonym by its ID.\nTo find the object IDs for your synonyms,\nuse the [`search` operation](#tag/Synonyms/operation/searchSynonyms).\n", "parameters": [ @@ -1281,9 +1378,13 @@ } }, "put": { - "tags": ["search"], + "tags": [ + "Synonyms" + ], "operationId": "saveSynonym", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Create or replace a synonym", "description": "If a synonym with the specified object ID doesn't exist, Algolia adds a new one.\nOtherwise, the existing synonym is replaced.\nTo add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms).\n", "parameters": [ @@ -1327,7 +1428,11 @@ "$ref": "#/components/schemas/id" } }, - "required": ["taskID", "updatedAt", "id"] + "required": [ + "taskID", + "updatedAt", + "id" + ] } } } @@ -1347,9 +1452,13 @@ } }, "delete": { - "tags": ["search"], + "tags": [ + "Synonyms" + ], "operationId": "deleteSynonym", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Delete a synonym", "description": "Deletes a synonym by its ID.\nTo find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).\n", "parameters": [ @@ -1384,9 +1493,13 @@ }, "/1/indexes/{indexName}/synonyms/batch": { "post": { - "tags": ["search"], + "tags": [ + "Synonyms" + ], "operationId": "saveSynonyms", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Create or replace synonyms", "description": "If a synonym with the `objectID` doesn't exist, Algolia adds a new one.\nOtherwise, existing synonyms are replaced.\n\nThis operation is subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n", "parameters": [ @@ -1431,9 +1544,13 @@ }, "/1/indexes/{indexName}/synonyms/clear": { "post": { - "tags": ["search"], + "tags": [ + "Synonyms" + ], "operationId": "clearSynonyms", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Delete all synonyms", "description": "Deletes all synonyms from the index.", "parameters": [ @@ -1465,11 +1582,16 @@ }, "/1/indexes/{indexName}/synonyms/search": { "post": { - "tags": ["search"], + "tags": [ + "Synonyms" + ], "operationId": "searchSynonyms", + "x-mcp-tool": true, "x-use-read-transporter": true, "x-cacheable": true, - "x-acl": ["settings"], + "x-acl": [ + "settings" + ], "summary": "Search for synonyms", "description": "Searches for synonyms in your index.", "parameters": [ @@ -1531,9 +1653,13 @@ }, "/1/keys": { "get": { - "tags": ["search"], + "tags": [ + "Api Keys" + ], "operationId": "listApiKeys", - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "List API keys", "description": "Lists all API keys associated with your Algolia application, including their permissions and restrictions.", "responses": { @@ -1545,7 +1671,9 @@ "title": "listApiKeysResponse", "type": "object", "additionalProperties": false, - "required": ["keys"], + "required": [ + "keys" + ], "properties": { "keys": { "type": "array", @@ -1574,9 +1702,13 @@ } }, "post": { - "tags": ["search"], + "tags": [ + "Api Keys" + ], "operationId": "addApiKey", - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "Create an API key", "description": "Creates a new API key with specific permissions and restrictions.", "requestBody": { @@ -1617,7 +1749,9 @@ }, "/1/keys/{key}": { "get": { - "tags": ["search"], + "tags": [ + "Api Keys" + ], "operationId": "getApiKey", "summary": "Retrieve API key permissions", "description": "Gets the permissions and restrictions of an API key.\n\nWhen authenticating with the admin API key, you can request information for any of your application's keys.\nWhen authenticating with other API keys, you can only retrieve information for that key,\nwith the description replaced by ``.\n", @@ -1652,9 +1786,13 @@ } }, "put": { - "tags": ["search"], + "tags": [ + "Api Keys" + ], "operationId": "updateApiKey", - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "Update an API key", "description": "Replaces the permissions of an existing API key.\n\nAny unspecified attribute resets that attribute to its default value.\n", "parameters": [ @@ -1681,7 +1819,10 @@ "title": "updateApiKeyResponse", "type": "object", "additionalProperties": false, - "required": ["key", "updatedAt"], + "required": [ + "key", + "updatedAt" + ], "properties": { "key": { "$ref": "#/components/schemas/keyString" @@ -1709,9 +1850,13 @@ } }, "delete": { - "tags": ["search"], + "tags": [ + "Api Keys" + ], "operationId": "deleteApiKey", - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "Delete an API key", "description": "Deletes the API key.", "parameters": [ @@ -1728,7 +1873,9 @@ "title": "deleteApiKeyResponse", "type": "object", "additionalProperties": false, - "required": ["deletedAt"], + "required": [ + "deletedAt" + ], "properties": { "deletedAt": { "$ref": "#/components/schemas/deletedAt" @@ -1755,9 +1902,13 @@ }, "/1/keys/{key}/restore": { "post": { - "tags": ["search"], + "tags": [ + "Api Keys" + ], "operationId": "restoreApiKey", - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "Restore an API key", "description": "Restores a deleted API key.\n\nRestoring resets the `validity` attribute to `0`.\n\nAlgolia stores up to 1,000 API keys per application.\nIf you create more, the oldest API keys are deleted and can't be restored.\n", "parameters": [ @@ -1793,9 +1944,13 @@ }, "/1/indexes/{indexName}/rules/{objectID}": { "get": { - "tags": ["search"], + "tags": [ + "Rules" + ], "operationId": "getRule", - "x-acl": ["settings"], + "x-acl": [ + "settings" + ], "summary": "Retrieve a rule", "description": "Retrieves a rule by its ID.\nTo find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).\n", "parameters": [ @@ -1832,9 +1987,13 @@ } }, "put": { - "tags": ["search"], + "tags": [ + "Rules" + ], "operationId": "saveRule", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Create or replace a rule", "description": "If a rule with the specified object ID doesn't exist, it's created.\nOtherwise, the existing rule is replaced.\n\nTo create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).\n", "parameters": [ @@ -1877,9 +2036,13 @@ } }, "delete": { - "tags": ["search"], + "tags": [ + "Rules" + ], "operationId": "deleteRule", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Delete a rule", "description": "Deletes a rule by its ID.\nTo find the object ID for rules,\nuse the [`search` operation](#tag/Rules/operation/searchRules).\n", "parameters": [ @@ -1914,9 +2077,13 @@ }, "/1/indexes/{indexName}/rules/batch": { "post": { - "tags": ["search"], + "tags": [ + "Rules" + ], "operationId": "saveRules", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Create or update rules", "description": "Create or update multiple rules.\n\nIf a rule with the specified object ID doesn't exist, Algolia creates a new one.\nOtherwise, existing rules are replaced.\n\nThis operation is subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n", "x-codegen-request-body-name": "rules", @@ -1966,9 +2133,13 @@ }, "/1/indexes/{indexName}/rules/clear": { "post": { - "tags": ["search"], + "tags": [ + "Rules" + ], "operationId": "clearRules", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "summary": "Delete all rules", "description": "Deletes all rules from the index.", "parameters": [ @@ -2000,11 +2171,16 @@ }, "/1/indexes/{indexName}/rules/search": { "post": { - "tags": ["search"], + "tags": [ + "Rules" + ], "operationId": "searchRules", + "x-mcp-tool": true, "x-use-read-transporter": true, "x-cacheable": true, - "x-acl": ["settings"], + "x-acl": [ + "settings" + ], "summary": "Search for rules", "description": "Searches for rules in your index.", "parameters": [ @@ -2064,7 +2240,12 @@ "title": "searchRulesResponse", "type": "object", "additionalProperties": false, - "required": ["hits", "nbHits", "page", "nbPages"], + "required": [ + "hits", + "nbHits", + "page", + "nbPages" + ], "properties": { "hits": { "type": "array", @@ -2107,9 +2288,13 @@ }, "/1/dictionaries/{dictionaryName}/batch": { "post": { - "tags": ["search"], + "tags": [ + "Dictionaries" + ], "operationId": "batchDictionaryEntries", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "description": "Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.", "summary": "Add or delete dictionary entries", "parameters": [ @@ -2125,7 +2310,9 @@ "title": "batchDictionaryEntriesParams", "description": "Request body for updating dictionary entries.", "type": "object", - "required": ["requests"], + "required": [ + "requests" + ], "additionalProperties": false, "properties": { "clearExistingDictionaryEntries": { @@ -2140,7 +2327,10 @@ "title": "batchDictionaryEntriesRequest", "type": "object", "additionalProperties": false, - "required": ["action", "body"], + "required": [ + "action", + "body" + ], "properties": { "action": { "$ref": "#/components/schemas/dictionaryAction" @@ -2177,11 +2367,15 @@ }, "/1/dictionaries/{dictionaryName}/search": { "post": { - "tags": ["search"], + "tags": [ + "Dictionaries" + ], "operationId": "searchDictionaryEntries", "x-use-read-transporter": true, "x-cacheable": true, - "x-acl": ["settings"], + "x-acl": [ + "settings" + ], "description": "Searches for standard and custom dictionary entries.", "summary": "Search dictionary entries", "parameters": [ @@ -2197,7 +2391,9 @@ "title": "searchDictionaryEntriesParams", "description": "Search parameter.", "type": "object", - "required": ["query"], + "required": [ + "query" + ], "additionalProperties": false, "properties": { "query": { @@ -2245,9 +2441,13 @@ }, "/1/dictionaries/*/settings": { "get": { - "tags": ["search"], + "tags": [ + "Dictionaries" + ], "operationId": "getDictionarySettings", - "x-acl": ["settings"], + "x-acl": [ + "settings" + ], "summary": "Retrieve dictionary settings", "description": "Retrieves the languages for which standard dictionary entries are turned off.", "responses": { @@ -2259,7 +2459,9 @@ "title": "getDictionarySettingsResponse", "additionalProperties": false, "type": "object", - "required": ["disableStandardEntries"], + "required": [ + "disableStandardEntries" + ], "properties": { "disableStandardEntries": { "$ref": "#/components/schemas/standardEntries" @@ -2284,9 +2486,13 @@ } }, "put": { - "tags": ["search"], + "tags": [ + "Dictionaries" + ], "operationId": "setDictionarySettings", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "description": "Turns standard stop word dictionary entries on or off for a given language.", "summary": "Update dictionary settings", "requestBody": { @@ -2298,7 +2504,9 @@ "type": "object", "additionalProperties": false, "description": "Turn on or off the built-in Algolia stop words for a specific language.\n", - "required": ["disableStandardEntries"], + "required": [ + "disableStandardEntries" + ], "properties": { "disableStandardEntries": { "$ref": "#/components/schemas/standardEntries" @@ -2329,9 +2537,13 @@ }, "/1/dictionaries/*/languages": { "get": { - "tags": ["search"], + "tags": [ + "Dictionaries" + ], "operationId": "getDictionaryLanguages", - "x-acl": ["settings"], + "x-acl": [ + "settings" + ], "description": "Lists supported languages with their supported dictionary types and number of custom entries.\n", "summary": "List available languages", "externalDocs": { @@ -2371,10 +2583,14 @@ }, "/1/clusters/mapping": { "post": { - "tags": ["search"], + "tags": [ + "Clusters" + ], "operationId": "assignUserId", "deprecated": true, - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "Assign or move a user ID", "description": "Assigns or moves a user ID to a cluster.\n\nThe time it takes to move a user is proportional to the amount of data linked to the user ID.\n", "parameters": [ @@ -2396,7 +2612,9 @@ "$ref": "#/components/schemas/clusterName" } }, - "required": ["cluster"] + "required": [ + "cluster" + ] } } } @@ -2420,10 +2638,14 @@ } }, "get": { - "tags": ["search"], + "tags": [ + "Clusters" + ], "operationId": "listUserIds", "deprecated": true, - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "List user IDs", "description": "Lists the userIDs assigned to a multi-cluster application.\n\nSince it can take a few seconds to get the data from the different clusters,\nthe response isn't real-time.\n", "parameters": [ @@ -2452,7 +2674,9 @@ } } }, - "required": ["userIDs"] + "required": [ + "userIDs" + ] } } } @@ -2474,10 +2698,14 @@ }, "/1/clusters/mapping/batch": { "post": { - "tags": ["search"], + "tags": [ + "Clusters" + ], "operationId": "batchAssignUserIds", "deprecated": true, - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "Assign multiple userIDs", "description": "Assigns multiple user IDs to a cluster.\n\n**You can't move users with this operation**.\n", "parameters": [ @@ -2501,13 +2729,20 @@ "users": { "type": "array", "description": "User IDs to assign.", - "example": ["einstein", "bohr", "feynman"], + "example": [ + "einstein", + "bohr", + "feynman" + ], "items": { "type": "string" } } }, - "required": ["cluster", "users"] + "required": [ + "cluster", + "users" + ] } } } @@ -2533,10 +2768,14 @@ }, "/1/clusters/mapping/top": { "get": { - "tags": ["search"], + "tags": [ + "Clusters" + ], "operationId": "getTopUserIds", "deprecated": true, - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "Get top user IDs", "description": "Get the IDs of the 10 users with the highest number of records per cluster.\n\nSince it can take a few seconds to get the data from the different clusters,\nthe response isn't real-time.\n", "responses": { @@ -2564,7 +2803,9 @@ } } }, - "required": ["topUsers"] + "required": [ + "topUsers" + ] } } } @@ -2586,10 +2827,14 @@ }, "/1/clusters/mapping/{userID}": { "get": { - "tags": ["search"], + "tags": [ + "Clusters" + ], "operationId": "getUserId", "deprecated": true, - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "Retrieve user ID", "description": "Returns the user ID data stored in the mapping.\n\nSince it can take a few seconds to get the data from the different clusters,\nthe response isn't real-time.\n", "parameters": [ @@ -2623,10 +2868,14 @@ } }, "delete": { - "tags": ["search"], + "tags": [ + "Clusters" + ], "operationId": "removeUserId", "deprecated": true, - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "Delete user ID", "description": "Deletes a user ID and its associated data from the clusters.", "parameters": [ @@ -2648,7 +2897,9 @@ "$ref": "#/components/schemas/deletedAt" } }, - "required": ["deletedAt"] + "required": [ + "deletedAt" + ] } } } @@ -2670,10 +2921,14 @@ }, "/1/clusters": { "get": { - "tags": ["search"], + "tags": [ + "Clusters" + ], "operationId": "listClusters", "deprecated": true, - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "List clusters", "description": "Lists the available clusters in a multi-cluster setup.", "responses": { @@ -2694,7 +2949,9 @@ } } }, - "required": ["topUsers"] + "required": [ + "topUsers" + ] } } } @@ -2716,12 +2973,16 @@ }, "/1/clusters/mapping/search": { "post": { - "tags": ["search"], + "tags": [ + "Clusters" + ], "operationId": "searchUserIds", "deprecated": true, "x-use-read-transporter": true, "x-cacheable": true, - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "Search for user IDs", "description": "Since it can take a few seconds to get the data from the different clusters,\nthe response isn't real-time.\n\nTo ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).\n", "requestBody": { @@ -2748,7 +3009,9 @@ "$ref": "#/components/schemas/hitsPerPage" } }, - "required": ["query"] + "required": [ + "query" + ] } } } @@ -2797,7 +3060,10 @@ "$ref": "#/components/schemas/highlightResult" } }, - "required": ["userID", "clusterName"] + "required": [ + "userID", + "clusterName" + ] } }, "required": [ @@ -2823,7 +3089,13 @@ "$ref": "#/components/schemas/updatedAt" } }, - "required": ["hits", "nbHits", "page", "hitsPerPage", "updatedAt"] + "required": [ + "hits", + "nbHits", + "page", + "hitsPerPage", + "updatedAt" + ] } } } @@ -2845,10 +3117,14 @@ }, "/1/clusters/mapping/pending": { "get": { - "tags": ["search"], + "tags": [ + "Clusters" + ], "operationId": "hasPendingMappings", "deprecated": true, - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "Get migration and user mapping status", "description": "To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.\n", "parameters": [ @@ -2886,7 +3162,9 @@ } } }, - "required": ["pending"] + "required": [ + "pending" + ] } } } @@ -2908,9 +3186,13 @@ }, "/1/security/sources": { "get": { - "tags": ["search"], + "tags": [ + "Vaults" + ], "operationId": "getSources", - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "List allowed sources", "description": "Retrieves all allowed IP addresses with access to your application.", "responses": { @@ -2939,9 +3221,13 @@ } }, "put": { - "tags": ["search"], + "tags": [ + "Vaults" + ], "operationId": "replaceSources", - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "summary": "Replace allowed sources", "description": "Replaces the list of allowed sources.", "requestBody": { @@ -2964,7 +3250,9 @@ "title": "replaceSourceResponse", "type": "object", "additionalProperties": false, - "required": ["updatedAt"], + "required": [ + "updatedAt" + ], "properties": { "updatedAt": { "$ref": "#/components/schemas/updatedAt" @@ -2991,9 +3279,13 @@ }, "/1/security/sources/append": { "post": { - "tags": ["search"], + "tags": [ + "Vaults" + ], "operationId": "appendSource", - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "description": "Adds a source to the list of allowed sources.", "summary": "Add a source", "requestBody": { @@ -3028,9 +3320,13 @@ }, "/1/security/sources/{source}": { "delete": { - "tags": ["search"], + "tags": [ + "Vaults" + ], "operationId": "deleteSource", - "x-acl": ["admin"], + "x-acl": [ + "admin" + ], "description": "Deletes a source from the list of allowed sources.", "summary": "Delete a source", "parameters": [ @@ -3054,7 +3350,9 @@ "title": "deleteSourceResponse", "type": "object", "additionalProperties": false, - "required": ["deletedAt"], + "required": [ + "deletedAt" + ], "properties": { "deletedAt": { "$ref": "#/components/schemas/deletedAt" @@ -3081,9 +3379,13 @@ }, "/1/logs": { "get": { - "tags": ["search"], + "tags": [ + "Advanced" + ], "operationId": "getLogs", - "x-acl": ["logs"], + "x-acl": [ + "logs" + ], "description": "The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl).\n\n- Logs are held for the last seven days.\n- Up to 1,000 API requests per server are logged.\n- This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn't appear in the logs itself.\n", "summary": "Retrieve log entries", "parameters": [ @@ -3140,7 +3442,9 @@ "title": "getLogsResponse", "type": "object", "additionalProperties": false, - "required": ["logs"], + "required": [ + "logs" + ], "properties": { "logs": { "type": "array", @@ -3167,13 +3471,13 @@ "type": "string", "maxLength": 1000, "description": "Request body.", - "example": "{\\n \\\"requests\\\": [\\n {\\n \\\"indexName\\\": \\\"best_buy\\\",\\n \\\"params\\\": \\\"query=&hitsPerPage=10&page=0&attributesToRetrieve=*&highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&getRankingInfo=1&facets=%5B%22brand%22%2C%22categories%22%2C%22free_shipping%22%2C%22type%22%5D&tagFilters=\\\"\\n }\\n ]\\n}\\n" + "example": "{\\n \\\"requests\\\": [\\n {\\n \\\"indexName\\\": \\\"best_buy\\\",\\n \\\"params\\\": \\\"query=&hitsPerPage=10&page=0&attributesToRetrieve=*&highlightPreTag=%3Cais-highlight-0000000000%3E&highlightPostTag=%3C%2Fais-highlight-0000000000%3E&getRankingInfo=1&facets=%5B%22brand%22%2C%22categories%22%2C%22free_shipping%22%2C%22type%22%5D&tagFilters=\\\"\\n }\\n ]\\n}\\n" }, "answer": { "type": "string", "maxLength": 1000, "description": "Response body.", - "example": "'n{\\n \"results\": [\\n {\\n \"hits\": [\\n {\\n \"name\": \"Amazon - Fire TV Stick\",\\n \"description\": \"Amazon Fire TV Stick connects to your TV's HDMI port. Just grab and go to enjoy Netflix, Prime Instant Video, Hulu Plus, YouTube.com, music, and much more.\",\\n \"brand\": \"Amazon\",\\n \"categories\": [\\n \"TV & Home Theater\",\\n \"Streaming Media Players\"\\n ],\\n \"hierarchicalCategories\": {\\n \"lvl0\": \"TV & Home Theater\",\\n \"lvl1\": \"TV & Home Theater > Streaming Media Players\"\\n },\\n \"type\": \"Streaming media player\",\\n \"price\": 39.99,\\n \"price_range\": \"1 }\\n ]\\n }\\n ]\\n}'\n" + "example": "'n{\\n \"results\": [\\n {\\n \"hits\": [\\n {\\n \"name\": \"Amazon - Fire TV Stick\",\\n \"description\": \"Amazon Fire TV Stick connects to your TV's HDMI port. Just grab and go to enjoy Netflix, Prime Instant Video, Hulu Plus, YouTube.com, music, and much more.\",\\n \"brand\": \"Amazon\",\\n \"categories\": [\\n \"TV & Home Theater\",\\n \"Streaming Media Players\"\\n ],\\n \"hierarchicalCategories\": {\\n \"lvl0\": \"TV & Home Theater\",\\n \"lvl1\": \"TV & Home Theater > Streaming Media Players\"\\n },\\n \"type\": \"Streaming media player\",\\n \"price\": 39.99,\\n \"price_range\": \"1 }\\n ]\\n }\\n ]\\n}'\n" }, "url": { "type": "string", @@ -3284,9 +3588,13 @@ }, "/1/task/{taskID}": { "get": { - "tags": ["search"], + "tags": [ + "Advanced" + ], "operationId": "getAppTask", - "x-acl": ["editSettings"], + "x-acl": [ + "editSettings" + ], "description": "Checks the status of a given application task.\n", "summary": "Check application task status", "parameters": [ @@ -3327,9 +3635,13 @@ }, "/1/indexes/{indexName}/task/{taskID}": { "get": { - "tags": ["search"], + "tags": [ + "Indices" + ], "operationId": "getTask", - "x-acl": ["addObject"], + "x-acl": [ + "addObject" + ], "description": "Checks the status of a given task.\n\nIndexing tasks are asynchronous.\nWhen you add, update, or delete records or indices,\na task is created on a queue and completed depending on the load on the server.\n\nThe indexing tasks' responses include a task ID that you can use to check the status.\n", "summary": "Check task status", "parameters": [ @@ -3376,9 +3688,13 @@ }, "/1/indexes/{indexName}/operation": { "post": { - "tags": ["search"], + "tags": [ + "Indices" + ], "operationId": "operationIndex", - "x-acl": ["addObject"], + "x-acl": [ + "addObject" + ], "summary": "Copy or move an index", "description": "Copies or moves (renames) an index within the same Algolia application.\n\n- Existing destination indices are overwritten, except for their analytics data.\n- If the destination index doesn't exist yet, it'll be created.\n- This operation is resource-intensive.\n\n**Copy**\n\n- Copying a source index that doesn't exist creates a new index with 0 records and default settings.\n- The API keys of the source index are merged with the existing keys in the destination index.\n- You can't copy the `enableReRanking`, `mode`, and `replicas` settings.\n- You can't copy to a destination index that already has replicas.\n- Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits).\n- Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/)\n\n**Move**\n\n- Moving a source index that doesn't exist is ignored without returning an error.\n- When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name.\n To access the original analytics in the dashboard, create an index with the original name.\n- If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices.\n- Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).\n\nThis operation is subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).\n", "parameters": [ @@ -3409,7 +3725,10 @@ "description": "**Only for copying.**\n\nIf you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged.\nIf you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules.\n" } }, - "required": ["operation", "destination"] + "required": [ + "operation", + "destination" + ] } } } @@ -3435,9 +3754,14 @@ }, "/1/indexes": { "get": { - "tags": ["search"], + "tags": [ + "Indices" + ], "operationId": "listIndices", - "x-acl": ["listIndexes"], + "x-mcp-tool": true, + "x-acl": [ + "listIndexes" + ], "summary": "List indices", "description": "Lists all indices in the current Algolia application.\n\nThe request follows any index restrictions of the API key you use to make the request.\n", "parameters": [ @@ -3477,7 +3801,9 @@ "/waitForApiKey": { "get": { "x-helper": true, - "tags": ["search"], + "tags": [ + "Api Keys" + ], "operationId": "waitForApiKey", "summary": "Wait for an API key operation", "description": "Waits for an API key to be added, updated, or deleted.", @@ -3530,7 +3856,9 @@ "/waitForTask": { "get": { "x-helper": true, - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "waitForTask", "summary": "Wait for operation to complete", "description": "Wait for a task to complete to ensure synchronized index updates.\n\nAll Algolia write operations are asynchronous. When you make a request for a write operation, for example, to add or update records in your index, Algolia creates a task on a queue and returns a taskID. The task itself runs separately, depending on the server load.\n", @@ -3604,14 +3932,15 @@ "400": { "$ref": "#/components/responses/IndexNotFound" } - }, - "tags": ["search"] + } } }, "/browseObjects": { "get": { "x-helper": true, - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "browseObjects", "summary": "Get all records from an index", "description": "You can use the browse method to get records from an index—for example, to export your index as a backup. To export all records, use an empty query.\n\nUse browse instead of search when exporting records from your index, when ranking, or analytics, isn't important. The Analytics API doesn't collect data when using browse.\n\nDon't use this method for building a search UI. Use search instead.\n", @@ -3649,7 +3978,9 @@ "get": { "x-helper": true, "x-asynchronous-helper": false, - "tags": ["search"], + "tags": [ + "Api Keys" + ], "operationId": "generateSecuredApiKey", "summary": "Create secured API keys", "description": "Generates a secured API key without any requests to Algolia's servers.\n\nSecured API keys are API keys that you generate on your server without any API request to Algolia.\nSecured API keys help in environments where you can't easily update the client-side code, such as mobile apps,\nor when you need to restrict access to a part of your index for every user.\n\nWhen your users start searching, instead of using the Search API key, they request a short-lived secured API key from your server.\nOn your server, you use this method to create a secured API key, with any restrictions you'd like, such as filters, index access restrictions,\nor expiration times. The API key gets longer the more restrictions you add.\nYour users then use the secured API key to search with Algolia.\n\nYou can't create secured API keys from other secured API keys or from your Admin API key.\nThe generated API key can have the same restrictions as the parent API key, or be more restrictive.\n", @@ -3690,10 +4021,82 @@ } } }, + "/accountCopyIndex": { + "get": { + "x-helper": true, + "x-available-languages": [ + "javascript" + ], + "tags": [ + "Account" + ], + "x-acl": [ + "browse", + "editSettings", + "addObject", + "settings", + "search" + ], + "operationId": "accountCopyIndex", + "summary": "Copies the given `sourceIndexName` records, rules and synonyms to an other Algolia application for the given `destinationIndexName`", + "description": "Copies the given `sourceIndexName` records, rules and synonyms to an other Algolia application for the given `destinationIndexName`.\n", + "parameters": [ + { + "in": "query", + "name": "sourceIndexName", + "description": "The name of the index to copy.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "destinationAppID", + "description": "The application ID to write the index to.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "destinationApiKey", + "description": "The API Key of the `destinationAppID` to write the index to, must have write ACLs.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "destinationIndexName", + "description": "The name of the index to write the copied index to.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "$ref": "#/components/responses/IndexInSameApp" + }, + "403": { + "$ref": "#/components/responses/IndexAlreadyExists" + }, + "404": { + "$ref": "#/components/responses/IndexNotFound" + } + } + } + }, "/replaceAllObjects": { "get": { "x-helper": true, - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "replaceAllObjects", "summary": "Replace all records in an index", "description": "Replace all records from your index with a new set of records.\n\nThis method lets you replace all records in your index without downtime. It performs these operations:\n 1. Copy settings, synonyms, and rules from your original index to a temporary index.\n 2. Add your new records to the temporary index.\n 3. Replace your original index with the temporary index.\n\nUse the safe parameter to ensure that these (asynchronous) operations are performed in sequence.\nIf there's an error duing one of these steps, the temporary index won't be deleted.\nThis operation is rate-limited.\nThis method creates a temporary index: your record count is temporarily doubled. Algolia doesn't count the three days with the highest number of records towards your monthly usage.\nIf you're on a legacy plan (before July 2020), this method counts two operations towards your usage (in addition to the number of records): copySettings and moveIndex.\nThe API key you use for this operation must have access to the index YourIndex and the temporary index YourIndex_tmp.\n", @@ -3762,7 +4165,9 @@ "/chunkedBatch": { "get": { "x-helper": true, - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "chunkedBatch", "summary": "Replace all records in an index", "description": "Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.\n", @@ -3839,7 +4244,9 @@ "/saveObjects": { "get": { "x-helper": true, - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "saveObjects", "summary": "Saves the given array of objects in the given index", "description": "Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.\n", @@ -3918,7 +4325,9 @@ "/deleteObjects": { "post": { "x-helper": true, - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "deleteObjects", "summary": "Deletes every records for the given objectIDs", "description": "Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.\n", @@ -3995,7 +4404,9 @@ "/partialUpdateObjects": { "post": { "x-helper": true, - "tags": ["search"], + "tags": [ + "Records" + ], "operationId": "partialUpdateObjects", "summary": "Replaces object content of all the given objects according to their respective `objectID` field", "description": "Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.\n", @@ -4084,7 +4495,9 @@ "/indexExists": { "get": { "x-helper": true, - "tags": ["search"], + "tags": [ + "Index" + ], "operationId": "indexExists", "summary": "Check if an index exists or not", "description": "You can initialize an index with any name. The index is created on Algolia's servers when you add objects or set settings. To prevent accidentally creating new indices, or changing existing indices, you can use the exists method. The exists method returns a boolean that indicates whether an initialized index has been created.\n", @@ -4117,7 +4530,9 @@ "get": { "x-helper": true, "x-asynchronous-helper": false, - "tags": ["search"], + "tags": [ + "Api Key" + ], "operationId": "setClientApiKey", "summary": "Switch the API key used to authenticate requests", "description": "Switch the API key used to authenticate requests.\n", @@ -4191,7 +4606,9 @@ "title": "Search parameters as query string.", "description": "Search parameters as query string.", "additionalProperties": false, - "x-discriminator-fields": ["params"], + "x-discriminator-fields": [ + "params" + ], "properties": { "params": { "$ref": "#/components/schemas/paramsAsString" @@ -4202,7 +4619,9 @@ "type": "string", "description": "Search query.", "default": "", - "x-categories": ["Search"] + "x-categories": [ + "Search" + ] }, "searchParamsQuery": { "type": "object", @@ -4217,11 +4636,19 @@ "type": "string", "description": "Filter expression to only include items that match the filter criteria in the response.\n\nYou can use these filter expressions:\n\n- **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`.\n- **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive).\n- **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value.\n- **Tag filters.** `_tags:` or just `` (case-sensitive).\n- **Boolean filters.** `: true | false`.\n\nYou can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions:\n\n- You can only combine filters of the same type with `OR`.\n **Not supported:** `facet:value OR num > 3`.\n- You can't use `NOT` with combinations of filters.\n **Not supported:** `NOT(facet:value OR facet:value)`\n- You can't combine conjunctions (`AND`) with `OR`.\n **Not supported:** `facet:value OR (facet:value AND facet:value)`\n\nUse quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes.\nIf a facet attribute is an array, the filter matches if it matches at least one element of the array.\n\nFor more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).\n", "example": "(category:Book OR category:Ebook) AND _tags:published", - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "facetFilters": { "description": "Filter the search by facet values, so that only records with the same facet values are retrieved.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\n- `[filter1, filter2]` is interpreted as `filter1 AND filter2`.\n- `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`.\n- `facet:-value` is interpreted as `NOT facet:value`.\n\nWhile it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash:\n`facet:\\-value`.\n", - "example": [["category:Book", "category:-Movie"], "author:John Doe"], + "example": [ + [ + "category:Book", + "category:-Movie" + ], + "author:John Doe" + ], "oneOf": [ { "type": "array", @@ -4233,11 +4660,16 @@ "type": "string" } ], - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "optionalFilters": { "description": "Filters to promote or demote records in the search results.\n\nOptional filters work like facet filters, but they don't exclude records from the search results.\nRecords that match the optional filter rank before records that don't match.\nIf you're using a negative filter `facet:-value`, matching records rank after records that don't match.\n\n- Optional filters don't work on virtual replicas.\n- Optional filters are applied _after_ sort-by attributes.\n- Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/)).\n- Optional filters don't work with numeric attributes.\n", - "example": ["category:Book", "author:John Doe"], + "example": [ + "category:Book", + "author:John Doe" + ], "oneOf": [ { "type": "array", @@ -4249,11 +4681,19 @@ "type": "string" } ], - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "numericFilters": { "description": "Filter by numeric facets.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\nYou can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`.\nComparisons are precise up to 3 decimals.\nYou can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries.\nThe same combination rules apply as for `facetFilters`.\n", - "example": [["inStock = 1", "deliveryDate < 1441755506"], "price < 1000"], + "example": [ + [ + "inStock = 1", + "deliveryDate < 1441755506" + ], + "price < 1000" + ], "oneOf": [ { "type": "array", @@ -4265,11 +4705,19 @@ "type": "string" } ], - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "tagFilters": { "description": "Filter the search by values of the special `_tags` attribute.\n\n**Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.**\n\nDifferent from regular facets, `_tags` can only be used for filtering (including or excluding records).\nYou won't get a facet count.\nThe same combination and escaping rules apply as for `facetFilters`.\n", - "example": [["Book", "Movie"], "SciFi"], + "example": [ + [ + "Book", + "Movie" + ], + "SciFi" + ], "oneOf": [ { "type": "array", @@ -4281,33 +4729,43 @@ "type": "string" } ], - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "page": { "type": "integer", "description": "Page of search results to retrieve.", "default": 0, "minimum": 0, - "x-categories": ["Pagination"] + "x-categories": [ + "Pagination" + ] }, "aroundLatLng": { "type": "string", "description": "Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude.\n\nOnly records included within a circle around this central location are included in the results.\nThe radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings.\nThis parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.\n", "example": "40.71,-74.01", "default": "", - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "aroundLatLngViaIP": { "type": "boolean", "description": "Whether to obtain the coordinates from the request's IP address.", "default": false, - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "aroundRadiusAll": { "title": "all", "type": "string", "description": "Return all records with a valid `_geoloc` attribute. Don't filter by distance.", - "enum": ["all"] + "enum": [ + "all" + ] }, "aroundRadius": { "description": "Maximum radius for a search around a central location.\n\nThis parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters.\nBy default, the search radius is determined automatically from the density of hits around the central location.\nThe search radius is small if there are many hits close to the central coordinates.\n", @@ -4321,7 +4779,9 @@ "$ref": "#/components/schemas/aroundRadiusAll" } ], - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "aroundPrecisionFromValue": { "title": "range objects", @@ -4355,7 +4815,9 @@ "$ref": "#/components/schemas/aroundPrecisionFromValue" } ], - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "insideBoundingBoxArray": { "type": "array", @@ -4370,10 +4832,22 @@ }, "description": "Coordinates for a rectangular area in which to search.\n\nEach bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair:\n`[p1 lat, p1 long, p2 lat, p2 long]`.\nProvide multiple bounding boxes as nested arrays.\nFor more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).\n", "example": [ - [47.3165, 4.9665, 47.3424, 5.0201], - [40.9234, 2.1185, 38.643, 1.9916] + [ + 47.3165, + 4.9665, + 47.3424, + 5.0201 + ], + [ + 40.9234, + 2.1185, + 38.643, + 1.9916 + ] ], - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "insideBoundingBox": { "oneOf": [ @@ -4401,10 +4875,26 @@ }, "description": "Coordinates of a polygon in which to search.\n\nPolygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude.\nProvide multiple polygons as nested arrays.\nFor more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).\nThis parameter is ignored if you also specify `insideBoundingBox`.\n", "example": [ - [47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9], - [40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104] + [ + 47.3165, + 4.9665, + 47.3424, + 5.0201, + 47.32, + 4.9 + ], + [ + 40.9234, + 2.1185, + 38.643, + 1.9916, + 39.2587, + 2.0104 + ] ], - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "supportedLanguage": { "type": "string", @@ -4484,7 +4974,9 @@ "type": "string", "description": "Unique pseudonymous or anonymous user identifier.\n\nThis helps with analytics and click and conversion events.\nFor more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).\n", "example": "test-user-123", - "x-categories": ["Personalization"] + "x-categories": [ + "Personalization" + ] }, "baseSearchParamsWithoutQuery": { "type": "object", @@ -4495,7 +4987,9 @@ "description": "Keywords to be used instead of the search query to conduct a more broader search.\n\nUsing the `similarQuery` parameter changes other settings:\n\n- `queryType` is set to `prefixNone`.\n- `removeStopWords` is set to true.\n- `words` is set as the first ranking criterion.\n- All remaining words are treated as `optionalWords`.\n\nSince the `similarQuery` is supposed to do a broad search, they usually return many results.\nCombine it with `filters` to narrow down the list of results.\n", "default": "", "example": "comedy drama crime Macy Buscemi", - "x-categories": ["Search"] + "x-categories": [ + "Search" + ] }, "filters": { "$ref": "#/components/schemas/filters" @@ -4516,17 +5010,24 @@ "type": "boolean", "description": "Whether to sum all filter scores.\n\nIf true, all filter scores are summed.\nOtherwise, the maximum filter score is kept.\nFor more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).\n", "default": false, - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "restrictSearchableAttributes": { "type": "array", "items": { "type": "string" }, - "example": ["title", "author"], + "example": [ + "title", + "author" + ], "description": "Restricts a search to a subset of your searchable attributes.\nAttribute names are case-sensitive.\n", "default": [], - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "facets": { "type": "array", @@ -4535,14 +5036,20 @@ }, "description": "Facets for which to retrieve facet values that match the search criteria and the number of matching facet values.\n\nTo retrieve all facets, use the wildcard character `*`.\nFor more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).\n", "default": [], - "example": ["*"], - "x-categories": ["Faceting"] + "example": [ + "*" + ], + "x-categories": [ + "Faceting" + ] }, "facetingAfterDistinct": { "type": "boolean", "description": "Whether faceting should be applied after deduplication with `distinct`.\n\nThis leads to accurate facet counts when using faceting in combination with `distinct`.\nIt's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting,\nas `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.\n", "default": false, - "x-categories": ["Faceting"] + "x-categories": [ + "Faceting" + ] }, "page": { "$ref": "#/components/schemas/page" @@ -4550,14 +5057,18 @@ "offset": { "type": "integer", "description": "Position of the first hit to retrieve.", - "x-categories": ["Pagination"] + "x-categories": [ + "Pagination" + ] }, "length": { "type": "integer", "description": "Number of hits to retrieve (used in combination with `offset`).", "minimum": 0, "maximum": 1000, - "x-categories": ["Pagination"] + "x-categories": [ + "Pagination" + ] }, "aroundLatLng": { "$ref": "#/components/schemas/aroundLatLng" @@ -4575,7 +5086,9 @@ "type": "integer", "description": "Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.", "minimum": 1, - "x-categories": ["Geo-Search"] + "x-categories": [ + "Geo-Search" + ] }, "insideBoundingBox": { "$ref": "#/components/schemas/insideBoundingBox" @@ -4590,7 +5103,9 @@ }, "description": "ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches):\n\n- Sets `removeStopWords` and `ignorePlurals` to the list of provided languages.\n- Sets `removeWordsIfNoResults` to `allOptional`.\n- Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.\n", "default": [], - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "ruleContexts": { "type": "array", @@ -4599,8 +5114,12 @@ }, "description": "Assigns a rule context to the search query.\n\n[Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.\n", "default": [], - "example": ["mobile"], - "x-categories": ["Rules"] + "example": [ + "mobile" + ], + "x-categories": [ + "Rules" + ] }, "personalizationImpact": { "type": "integer", @@ -4608,7 +5127,9 @@ "default": 100, "minimum": 0, "maximum": 100, - "x-categories": ["Personalization"] + "x-categories": [ + "Personalization" + ] }, "userToken": { "$ref": "#/components/schemas/userToken" @@ -4617,25 +5138,33 @@ "type": "boolean", "description": "Whether the search response should include detailed ranking information.", "default": false, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "synonyms": { "type": "boolean", "description": "Whether to take into account an index's synonyms for this search.", "default": true, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "clickAnalytics": { "type": "boolean", "description": "Whether to include a `queryID` attribute in the response.\n\nThe query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).\n", "default": false, - "x-categories": ["Analytics"] + "x-categories": [ + "Analytics" + ] }, "analytics": { "type": "boolean", "description": "Whether this search will be included in Analytics.", "default": true, - "x-categories": ["Analytics"] + "x-categories": [ + "Analytics" + ] }, "analyticsTags": { "type": "array", @@ -4644,19 +5173,25 @@ }, "description": "Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).", "default": [], - "x-categories": ["Analytics"] + "x-categories": [ + "Analytics" + ] }, "percentileComputation": { "type": "boolean", "description": "Whether to include this search when calculating processing-time percentiles.", "default": true, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "enableABTest": { "type": "boolean", "description": "Whether to enable A/B testing for this search.", "default": true, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] } } }, @@ -4676,13 +5211,18 @@ "default": 20, "minimum": 1, "maximum": 1000, - "x-categories": ["Pagination"] + "x-categories": [ + "Pagination" + ] }, "typoToleranceEnum": { "type": "string", "title": "typo tolerance", "description": "- `min`. Return matches with the lowest number of typos.\n For example, if you have matches without typos, only include those.\n But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos).\n- `strict`. Return matches with the two lowest numbers of typos.\n With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.\n", - "enum": ["min", "strict"] + "enum": [ + "min", + "strict" + ] }, "typoTolerance": { "description": "Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied.\n\nIf typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) are also active.\n", @@ -4696,15 +5236,23 @@ "$ref": "#/components/schemas/typoToleranceEnum" } ], - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "booleanString": { "type": "string", - "enum": ["true", "false"] + "enum": [ + "true", + "false" + ] }, "ignorePlurals": { "description": "Treat singular, plurals, and other forms of declensions as equivalent.\nYou should only use this feature for the languages used in your index.\n", - "example": ["ca", "es"], + "example": [ + "ca", + "es" + ], "oneOf": [ { "type": "array", @@ -4722,11 +5270,16 @@ "default": false } ], - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "removeStopWords": { "description": "Removes stop words from the search query.\n\nStop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own.\nIn English, \"the\", \"a\", or \"and\" are stop words.\n\nYou should only use this feature for the languages used in your index.\n", - "example": ["ca", "es"], + "example": [ + "ca", + "es" + ], "oneOf": [ { "type": "array", @@ -4741,29 +5294,49 @@ "description": "If true, stop words are removed for all languages you included in `queryLanguages`, or for all supported languages, if `queryLanguages` is empty.\nIf false, stop words are not removed.\n" } ], - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "queryType": { "type": "string", - "enum": ["prefixLast", "prefixAll", "prefixNone"], + "enum": [ + "prefixLast", + "prefixAll", + "prefixNone" + ], "description": "Determines if and how query words are interpreted as prefixes.\n\nBy default, only the last query word is treated as a prefix (`prefixLast`).\nTo turn off prefix search, use `prefixNone`.\nAvoid `prefixAll`, which treats all query words as prefixes.\nThis might lead to counterintuitive results and makes your search slower.\n\nFor more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).\n", "default": "prefixLast", - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "removeWordsIfNoResults": { "type": "string", - "enum": ["none", "lastWords", "firstWords", "allOptional"], + "enum": [ + "none", + "lastWords", + "firstWords", + "allOptional" + ], "example": "firstWords", "description": "Strategy for removing words from the query when it doesn't return any results.\nThis helps to avoid returning empty search results.\n\n- `none`.\n No words are removed when a query doesn't return results.\n\n- `lastWords`.\n Treat the last (then second to last, then third to last) word as optional,\n until there are results or at most 5 words have been removed.\n\n- `firstWords`.\n Treat the first (then second, then third) word as optional,\n until there are results or at most 5 words have been removed.\n\n- `allOptional`.\n Treat all words as optional.\n\nFor more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).\n", "default": "none", - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "mode": { "type": "string", - "enum": ["neuralSearch", "keywordSearch"], + "enum": [ + "neuralSearch", + "keywordSearch" + ], "description": "Search mode the index will use to query for results.\n\nThis setting only applies to indices, for which Algolia enabled NeuralSearch for you.\n", "default": "keywordSearch", - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "semanticSearch": { "type": "object", @@ -4790,10 +5363,15 @@ "items": { "type": "string" }, - "example": ["blue", "iphone case"], + "example": [ + "blue", + "iphone case" + ], "description": "List of [optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).", "default": [], - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "optionalWords": { "description": "Words that should be considered optional when found in the query.\n\nBy default, records must match all words in the search query to be included in the search results.\nAdding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words.\nFor example, if the search query is \"action video\" and \"video\" is an optional word,\nthe search engine runs two queries. One for \"action video\" and one for \"action\".\nRecords that match all words are ranked higher.\n\nFor a search query with 4 or more words **and** all its words are optional,\nthe number of matched words required for a record to be included in the search results increases for every 1,000 records:\n\n- If `optionalWords` has less than 10 words, the required number of matched words increases by 1:\n results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words.\n- If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down).\n For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words.\n\nFor more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).\n", @@ -4811,20 +5389,38 @@ }, "exactOnSingleWordQuery": { "type": "string", - "enum": ["attribute", "none", "word"], + "enum": [ + "attribute", + "none", + "word" + ], "description": "Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word.\n\n- `attribute`.\n The Exact ranking criterion is 1 if the query word and attribute value are the same.\n For example, a search for \"road\" will match the value \"road\", but not \"road trip\".\n\n- `none`.\n The Exact ranking criterion is ignored on single-word searches.\n\n- `word`.\n The Exact ranking criterion is 1 if the query word is found in the attribute value.\n The query word must have at least 3 characters and must not be a stop word.\n Only exact matches will be highlighted,\n partial and prefix matches won't.\n", "default": "attribute", - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "alternativesAsExact": { "type": "string", - "enum": ["ignorePlurals", "singleWordSynonym", "multiWordsSynonym", "ignoreConjugations"], - "x-categories": ["Query strategy"] + "enum": [ + "ignorePlurals", + "singleWordSynonym", + "multiWordsSynonym", + "ignoreConjugations" + ], + "x-categories": [ + "Query strategy" + ] }, "advancedSyntaxFeatures": { "type": "string", - "enum": ["exactPhrase", "excludeWords"], - "x-categories": ["Query strategy"] + "enum": [ + "exactPhrase", + "excludeWords" + ], + "x-categories": [ + "Query strategy" + ] }, "distinct": { "description": "Determines how many records of a group are included in the search results.\n\nRecords with the same value for the `attributeForDistinct` attribute are considered a group.\nThe `distinct` setting controls how many members of the group are returned.\nThis is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature).\n\nThe `distinct` setting is ignored if `attributeForDistinct` is not set.\n", @@ -4842,7 +5438,9 @@ "default": 0 } ], - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "order": { "description": "Explicit order of facets or facet values.\n\nThis setting lets you always show specific facets or facet values at the top of the list.\n", @@ -4864,7 +5462,11 @@ "sortRemainingBy": { "description": "Order of facet values that aren't explicitly positioned with the `order` setting.\n\n- `count`.\n Order remaining facet values by decreasing count.\n The count is the number of matching records containing this facet value.\n\n- `alpha`.\n Sort facet values alphabetically.\n\n- `hidden`.\n Don't show facet values that aren't explicitly positioned.\n", "type": "string", - "enum": ["count", "alpha", "hidden"] + "enum": [ + "count", + "alpha", + "hidden" + ] }, "hide": { "description": "Hide facet values.", @@ -5000,7 +5602,9 @@ "$ref": "#/components/schemas/widgets" } }, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "reRankingApplyFilter": { "description": "Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.\n", @@ -5013,7 +5617,9 @@ }, { "type": "string", - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] } ] }, @@ -5026,10 +5632,18 @@ "items": { "type": "string" }, - "example": ["author", "title", "content"], + "example": [ + "author", + "title", + "content" + ], "description": "Attributes to include in the API response.\n\nTo reduce the size of your response, you can retrieve only some of the attributes.\nAttribute names are case-sensitive.\n\n- `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings.\n- To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`.\n- The `objectID` attribute is always included.\n", - "default": ["*"], - "x-categories": ["Attributes"] + "default": [ + "*" + ], + "x-categories": [ + "Attributes" + ] }, "ranking": { "type": "array", @@ -5047,57 +5661,81 @@ "exact", "custom" ], - "x-categories": ["Ranking"] + "x-categories": [ + "Ranking" + ] }, "relevancyStrictness": { "type": "integer", "example": 90, "description": "Relevancy threshold below which less relevant results aren't included in the results.\n\nYou can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas).\nUse this setting to strike a balance between the relevance and number of returned results.\n", "default": 100, - "x-categories": ["Ranking"] + "x-categories": [ + "Ranking" + ] }, "attributesToHighlight": { "type": "array", "items": { "type": "string" }, - "example": ["author", "title", "conten", "content"], + "example": [ + "author", + "title", + "conten", + "content" + ], "description": "Attributes to highlight.\n\nBy default, all searchable attributes are highlighted.\nUse `*` to highlight all attributes or use an empty array `[]` to turn off highlighting.\nAttribute names are case-sensitive.\n\nWith highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`.\nYou can use this to visually highlight matching parts of a search query in your UI.\n\nFor more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/).\n", - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "attributesToSnippet": { "type": "array", "items": { "type": "string" }, - "example": ["content:80", "description"], + "example": [ + "content:80", + "description" + ], "description": "Attributes for which to enable snippets.\nAttribute names are case-sensitive.\n\nSnippets provide additional context to matched words.\nIf you enable snippets, they include 10 words, including the matched word.\nThe matched word will also be wrapped by HTML tags for highlighting.\nYou can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`,\nwhere `NUMBER` is the number of words to be extracted.\n", "default": [], - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "highlightPreTag": { "type": "string", "description": "HTML tag to insert before the highlighted parts in all highlighted results and snippets.", "default": "", - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "highlightPostTag": { "type": "string", "description": "HTML tag to insert after the highlighted parts in all highlighted results and snippets.", "default": "", - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "snippetEllipsisText": { "type": "string", "description": "String used as an ellipsis indicator when a snippet is truncated.", "default": "…", - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "restrictHighlightAndSnippetArrays": { "type": "boolean", "description": "Whether to restrict highlighting and snippeting to items that at least partially matched the search query.\nBy default, all items are highlighted and snippeted.\n", "default": false, - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "hitsPerPage": { "$ref": "#/components/schemas/hitsPerPage" @@ -5106,13 +5744,17 @@ "type": "integer", "description": "Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", "default": 4, - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "minWordSizefor2Typos": { "type": "integer", "description": "Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).", "default": 8, - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "typoTolerance": { "$ref": "#/components/schemas/typoTolerance" @@ -5121,17 +5763,23 @@ "type": "boolean", "description": "Whether to allow typos on numbers in the search query.\n\nTurn off this setting to reduce the number of irrelevant matches\nwhen searching in large sets of similar numbers.\n", "default": true, - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "disableTypoToleranceOnAttributes": { "type": "array", "items": { "type": "string" }, - "example": ["sku"], + "example": [ + "sku" + ], "description": "Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).\nAttribute names are case-sensitive.\n\nReturning only exact matches can help when:\n\n- [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/).\n- Reducing the number of matches when you have too many.\n This can happen with attributes that are long blocks of text, such as product descriptions.\n\nConsider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.\n", "default": [], - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "ignorePlurals": { "$ref": "#/components/schemas/ignorePlurals" @@ -5144,28 +5792,38 @@ "items": { "$ref": "#/components/schemas/supportedLanguage" }, - "example": ["es"], + "example": [ + "es" + ], "description": "Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries.\n\nThis setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings.\nThis setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages.\nTo support this, you must place the CJK language **first**.\n\n**You should always specify a query language.**\nIf you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).\n", "default": [], - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "decompoundQuery": { "type": "boolean", "description": "Whether to split compound words in the query into their building blocks.\n\nFor more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words).\nWord segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.\nDecompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).\nFor example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).\n", "default": true, - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "enableRules": { "type": "boolean", "description": "Whether to enable rules.", "default": true, - "x-categories": ["Rules"] + "x-categories": [ + "Rules" + ] }, "enablePersonalization": { "type": "boolean", "description": "Whether to enable Personalization.", "default": false, - "x-categories": ["Personalization"] + "x-categories": [ + "Personalization" + ] }, "queryType": { "$ref": "#/components/schemas/queryType" @@ -5183,7 +5841,9 @@ "type": "boolean", "description": "Whether to support phrase matching and excluding words from search queries.\n\nUse the `advancedSyntaxFeatures` parameter to control which feature is supported.\n", "default": false, - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "optionalWords": { "$ref": "#/components/schemas/optionalWords" @@ -5193,10 +5853,14 @@ "items": { "type": "string" }, - "example": ["description"], + "example": [ + "description" + ], "description": "Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes).\nAttribute names are case-sensitive.\n\nThis can be useful for attributes with long values, where the likelihood of an exact match is high,\nsuch as product descriptions.\nTurning off the Exact ranking criterion for these attributes favors exact matching on other attributes.\nThis reduces the impact of individual attributes with a lot of content on ranking.\n", "default": [], - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "exactOnSingleWordQuery": { "$ref": "#/components/schemas/exactOnSingleWordQuery" @@ -5207,8 +5871,13 @@ "$ref": "#/components/schemas/alternativesAsExact" }, "description": "Determine which plurals and synonyms should be considered an exact matches.\n\nBy default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching.\nFor example:\n\n- \"swimsuit\" and \"swimsuits\" are treated the same\n- \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)).\n\n- `ignorePlurals`.\n Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.\n\n- `singleWordSynonym`.\n Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches.\n\n- `multiWordsSynonym`.\n Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.\n", - "default": ["ignorePlurals", "singleWordSynonym"], - "x-categories": ["Query strategy"] + "default": [ + "ignorePlurals", + "singleWordSynonym" + ], + "x-categories": [ + "Query strategy" + ] }, "advancedSyntaxFeatures": { "type": "array", @@ -5216,8 +5885,13 @@ "$ref": "#/components/schemas/advancedSyntaxFeatures" }, "description": "Advanced search syntax features you want to support.\n\n- `exactPhrase`.\n Phrases in quotes must match exactly.\n For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\".\n\n- `excludeWords`.\n Query words prefixed with a `-` must not occur in a record.\n For example, `search -engine` matches records that contain \"search\" but not \"engine\".\n\nThis setting only has an effect if `advancedSyntax` is true.\n", - "default": ["exactPhrase", "excludeWords"], - "x-categories": ["Query strategy"] + "default": [ + "exactPhrase", + "excludeWords" + ], + "x-categories": [ + "Query strategy" + ] }, "distinct": { "$ref": "#/components/schemas/distinct" @@ -5226,7 +5900,9 @@ "type": "boolean", "description": "Whether to replace a highlighted word with the matched synonym.\n\nBy default, the original words are highlighted even if a synonym matches.\nFor example, with `home` as a synonym for `house` and a search for `home`,\nrecords matching either \"home\" or \"house\" are included in the search results,\nand either \"home\" or \"house\" are highlighted.\n\nWith `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records,\nbut all occurrences of \"house\" are replaced by \"home\" in the highlighted response.\n", "default": false, - "x-categories": ["Highlighting and Snippeting"] + "x-categories": [ + "Highlighting and Snippeting" + ] }, "minProximity": { "type": "integer", @@ -5234,7 +5910,9 @@ "maximum": 7, "description": "Minimum proximity score for two matching words.\n\nThis adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity)\nby equally scoring matches that are farther apart.\n\nFor example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.\n", "default": 1, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "responseFields": { "type": "array", @@ -5242,27 +5920,37 @@ "type": "string" }, "description": "Properties to include in the API response of search and browse requests.\n\nBy default, all response properties are included.\nTo reduce the response size, you can select which properties should be included.\n\nAn empty list may lead to an empty API response (except properties you can't exclude).\n\nYou can't exclude these properties:\n`message`, `warning`, `cursor`, `abTestVariantID`,\nor any property added by setting `getRankingInfo` to true.\n\nYour search depends on the `hits` field. If you omit this field, searches won't return any results.\nYour UI might also depend on other properties, for example, for pagination.\nBefore restricting the response size, check the impact on your search experience.\n", - "default": ["*"], - "x-categories": ["Advanced"] + "default": [ + "*" + ], + "x-categories": [ + "Advanced" + ] }, "maxValuesPerFacet": { "type": "integer", "description": "Maximum number of facet values to return for each facet.", "default": 100, "maximum": 1000, - "x-categories": ["Faceting"] + "x-categories": [ + "Faceting" + ] }, "sortFacetValuesBy": { "type": "string", "description": "Order in which to retrieve facet values.\n\n- `count`.\n Facet values are retrieved by decreasing count.\n The count is the number of matching records containing this facet value.\n\n- `alpha`.\n Retrieve facet values alphabetically.\n\nThis setting doesn't influence how facet values are displayed in your UI (see `renderingContent`).\nFor more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).\n", "default": "count", - "x-categories": ["Faceting"] + "x-categories": [ + "Faceting" + ] }, "attributeCriteriaComputedByMinProximity": { "type": "boolean", "description": "Whether the best matching attribute should be determined by minimum proximity.\n\nThis setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting.\nIf true, the best matching attribute is selected based on the minimum proximity of multiple matches.\nOtherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.\n", "default": false, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "renderingContent": { "$ref": "#/components/schemas/renderingContent" @@ -5271,7 +5959,9 @@ "type": "boolean", "description": "Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).\n\nThis setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.\n", "default": true, - "x-categories": ["Filtering"] + "x-categories": [ + "Filtering" + ] }, "reRankingApplyFilter": { "oneOf": [ @@ -5335,7 +6025,9 @@ "title": "redirectRuleIndexData", "type": "object", "description": "Redirect rule data.", - "required": ["ruleObjectID"], + "required": [ + "ruleObjectID" + ], "properties": { "ruleObjectID": { "type": "string" @@ -5343,7 +6035,13 @@ } } }, - "required": ["data", "succeed", "reason", "dest", "source"] + "required": [ + "data", + "succeed", + "reason", + "dest", + "source" + ] }, "userData": { "example": { @@ -5352,12 +6050,16 @@ }, "description": "An object with custom data.\n\nYou can store up to 32kB as custom data.\n", "default": {}, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "baseSearchResponse": { "type": "object", "additionalProperties": true, - "required": ["processingTimeMS"], + "required": [ + "processingTimeMS" + ], "properties": { "abTestID": { "type": "integer", @@ -5598,7 +6300,11 @@ "matchLevel": { "type": "string", "description": "Whether the whole query string matches or only a part.", - "enum": ["none", "partial", "full"] + "enum": [ + "none", + "partial", + "full" + ] }, "highlightResultOption": { "type": "object", @@ -5614,7 +6320,9 @@ "matchedWords": { "type": "array", "description": "List of matched words from the search query.", - "example": ["action"], + "example": [ + "action" + ], "items": { "type": "string" } @@ -5624,8 +6332,15 @@ "description": "Whether the entire attribute value is highlighted." } }, - "required": ["value", "matchLevel", "matchedWords"], - "x-discriminator-fields": ["matchLevel", "matchedWords"] + "required": [ + "value", + "matchLevel", + "matchedWords" + ], + "x-discriminator-fields": [ + "matchLevel", + "matchedWords" + ] }, "highlightResultMap": { "type": "object", @@ -5668,8 +6383,13 @@ "$ref": "#/components/schemas/matchLevel" } }, - "required": ["value", "matchLevel"], - "x-discriminator-fields": ["matchLevel"] + "required": [ + "value", + "matchLevel" + ], + "x-discriminator-fields": [ + "matchLevel" + ] }, "snippetResultMap": { "type": "object", @@ -5800,7 +6520,13 @@ "description": "Whether the record is re-ranked." } }, - "required": ["nbTypos", "firstMatchedWord", "geoDistance", "nbExactWords", "userScore"] + "required": [ + "nbTypos", + "firstMatchedWord", + "geoDistance", + "nbExactWords", + "userScore" + ] }, "distinctSeqID": { "type": "integer" @@ -5810,7 +6536,9 @@ "description": "Search result.\n\nA hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.\n", "x-is-generic": true, "additionalProperties": true, - "required": ["objectID"], + "required": [ + "objectID" + ], "properties": { "objectID": { "$ref": "#/components/schemas/objectID" @@ -5849,7 +6577,11 @@ "example": "query=a&hitsPerPage=20" } }, - "required": ["hits", "query", "params"] + "required": [ + "hits", + "query", + "params" + ] }, "searchResponse": { "additionalProperties": true, @@ -5872,7 +6604,9 @@ }, "searchTypeDefault": { "type": "string", - "enum": ["default"], + "enum": [ + "default" + ], "default": "default", "description": "- `default`: perform a search query\n- `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).\n" }, @@ -5887,7 +6621,9 @@ "$ref": "#/components/schemas/searchTypeDefault" } }, - "required": ["indexName"] + "required": [ + "indexName" + ] }, "SearchForHits": { "allOf": [ @@ -5910,11 +6646,15 @@ "description": "Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).", "maximum": 100, "default": 10, - "x-categories": ["Advanced"] + "x-categories": [ + "Advanced" + ] }, "searchTypeFacet": { "type": "string", - "enum": ["facet"], + "enum": [ + "facet" + ], "default": "facet", "description": "- `default`: perform a search query\n- `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).\n" }, @@ -5938,7 +6678,11 @@ "$ref": "#/components/schemas/searchTypeFacet" } }, - "required": ["indexName", "type", "facet"] + "required": [ + "indexName", + "type", + "facet" + ] }, "SearchForFacets": { "allOf": [ @@ -5949,7 +6693,10 @@ "$ref": "#/components/schemas/searchForFacetsOptions" } ], - "x-discriminator-fields": ["facet", "type"] + "x-discriminator-fields": [ + "facet", + "type" + ] }, "SearchQuery": { "oneOf": [ @@ -5963,14 +6710,22 @@ }, "searchStrategy": { "type": "string", - "enum": ["none", "stopIfEnoughMatches"], + "enum": [ + "none", + "stopIfEnoughMatches" + ], "description": "Strategy for multiple search queries:\n\n- `none`. Run all queries.\n- `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results.\n" }, "searchForFacetValuesResponse": { "type": "object", "additionalProperties": false, - "required": ["facetHits", "exhaustiveFacetsCount"], - "x-discriminator-fields": ["facetHits"], + "required": [ + "facetHits", + "exhaustiveFacetsCount" + ], + "x-discriminator-fields": [ + "facetHits" + ], "properties": { "facetHits": { "type": "array", @@ -5979,7 +6734,11 @@ "title": "facetHits", "type": "object", "additionalProperties": false, - "required": ["value", "highlighted", "count"], + "required": [ + "value", + "highlighted", + "count" + ], "properties": { "value": { "description": "Facet value.", @@ -6135,7 +6894,10 @@ "type": "object", "description": "Response, taskID, and update timestamp.", "additionalProperties": false, - "required": ["taskID", "updatedAt"], + "required": [ + "taskID", + "updatedAt" + ], "properties": { "taskID": { "$ref": "#/components/schemas/taskID" @@ -6184,11 +6946,16 @@ } } }, - "required": ["action", "body"] + "required": [ + "action", + "body" + ] } } }, - "required": ["requests"], + "required": [ + "requests" + ], "example": { "requests": [ { @@ -6215,7 +6982,10 @@ "items": { "type": "string" }, - "example": ["record-1", "record-2"], + "example": [ + "record-1", + "record-2" + ], "description": "Unique record identifiers." }, "batchResponse": { @@ -6229,7 +6999,10 @@ "$ref": "#/components/schemas/objectIDs" } }, - "required": ["taskID", "objectIDs"] + "required": [ + "taskID", + "objectIDs" + ] }, "baseIndexSettings": { "type": "object", @@ -6249,17 +7022,24 @@ ], "description": "Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/).\n\nFacets are attributes that let you categorize search results.\nThey can be used for filtering search results.\nBy default, no attribute is used for faceting.\nAttribute names are case-sensitive.\n\n**Modifiers**\n\n- `filterOnly(\"ATTRIBUTE\")`.\n Allows the attribute to be used as a filter but doesn't evaluate the facet values.\n\n- `searchable(\"ATTRIBUTE\")`.\n Allows searching for facet values.\n\n- `afterDistinct(\"ATTRIBUTE\")`.\n Evaluates the facet count _after_ deduplication with `distinct`.\n This ensures accurate facet counts.\n You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.\n", "default": [], - "x-categories": ["Faceting"] + "x-categories": [ + "Faceting" + ] }, "replicas": { "type": "array", "items": { "type": "string" }, - "example": ["virtual(prod_products_price_asc)", "dev_products_replica"], + "example": [ + "virtual(prod_products_price_asc)", + "dev_products_replica" + ], "description": "Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/).\n\nReplicas are copies of a primary index with the same records but different settings, synonyms, or rules.\nIf you want to offer a different ranking or sorting of your search results, you'll use replica indices.\nAll index operations on a primary index are automatically forwarded to its replicas.\nTo add a replica index, you must provide the complete set of replicas to this parameter.\nIf you omit a replica from this list, the replica turns into a regular, standalone index that will no longer be synced with the primary index.\n\n**Modifier**\n\n- `virtual(\"REPLICA\")`.\n Create a virtual replica,\n Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).\n", "default": [], - "x-categories": ["Ranking"] + "x-categories": [ + "Ranking" + ] }, "paginationLimitedTo": { "type": "integer", @@ -6273,20 +7053,29 @@ "items": { "type": "string" }, - "example": ["total_sales"], + "example": [ + "total_sales" + ], "description": "Attributes that can't be retrieved at query time.\n\nThis can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/),\nbut don't want to include it in the search results.\nAttribute names are case-sensitive.\n", "default": [], - "x-categories": ["Attributes"] + "x-categories": [ + "Attributes" + ] }, "disableTypoToleranceOnWords": { "type": "array", "items": { "type": "string" }, - "example": ["wheel", "1X2BCD"], + "example": [ + "wheel", + "1X2BCD" + ], "description": "Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words).\nThis also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.\n", "default": [], - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "attributesToTransliterate": { "description": "Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead).\n\nTransliteration supports searching in any of the Japanese writing systems.\nTo support transliteration, you must set the indexing language to Japanese.\nAttribute names are case-sensitive.\n", @@ -6294,53 +7083,76 @@ "items": { "type": "string" }, - "example": ["name", "description"], - "x-categories": ["Languages"] + "example": [ + "name", + "description" + ], + "x-categories": [ + "Languages" + ] }, "camelCaseAttributes": { "type": "array", "items": { "type": "string" }, - "example": ["description"], + "example": [ + "description" + ], "description": "Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.\nAttribute names are case-sensitive.\n", "default": [], - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "decompoundedAttributes": { "type": "object", "example": { - "de": ["name"] + "de": [ + "name" + ] }, "description": "Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding).\nAttribute names are case-sensitive.\n\nCompound words are formed by combining two or more individual words,\nand are particularly prevalent in Germanic languages—for example, \"firefighter\".\nWith decompounding, the individual components are indexed separately.\n\nYou can specify different lists for different languages.\nDecompounding is supported for these languages:\nDutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`).\nDecompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark).\nFor example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).\n", "default": {}, - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "indexLanguages": { "type": "array", "items": { "$ref": "#/components/schemas/supportedLanguage" }, - "example": ["ja"], + "example": [ + "ja" + ], "description": "Languages for language-specific processing steps, such as word detection and dictionary settings.\n\n**You should always specify an indexing language.**\nIf you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/),\nor the languages you specified with the `ignorePlurals` or `removeStopWords` parameters.\nThis can lead to unexpected search results.\nFor more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).\n", "default": [], - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "disablePrefixOnAttributes": { "type": "array", "items": { "type": "string" }, - "example": ["sku"], + "example": [ + "sku" + ], "description": "Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search).\nAttribute names are case-sensitive.\n", "default": [], - "x-categories": ["Query strategy"] + "x-categories": [ + "Query strategy" + ] }, "allowCompressionOfIntegerArray": { "type": "boolean", "description": "Whether arrays with exclusively non-negative integers should be compressed for better performance.\nIf true, the compressed arrays may be reordered.\n", "default": false, - "x-categories": ["Performance"] + "x-categories": [ + "Performance" + ] }, "numericAttributesForFiltering": { "type": "array", @@ -6348,26 +7160,40 @@ "type": "string" }, "description": "Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters).\nAttribute names are case-sensitive.\n\nBy default, all numeric attributes are available as numerical filters.\nFor faster indexing, reduce the number of numeric attributes.\n\nTo turn off filtering for all numeric attributes, specify an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`.\n\n**Modifier**\n\n- `equalOnly(\"ATTRIBUTE\")`.\n Support only filtering based on equality comparisons `=` and `!=`.\n", - "example": ["equalOnly(quantity)", "popularity"], + "example": [ + "equalOnly(quantity)", + "popularity" + ], "default": [], - "x-categories": ["Performance"] + "x-categories": [ + "Performance" + ] }, "separatorsToIndex": { "type": "string", "example": "+#", "description": "Control which non-alphanumeric characters are indexed.\n\nBy default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`).\nTo include such characters, define them with `separatorsToIndex`.\n\nSeparators are all non-letter characters except spaces and currency characters, such as $€£¥.\n\nWith `separatorsToIndex`, Algolia treats separator characters as separate words.\nFor example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.\n", "default": "", - "x-categories": ["Typos"] + "x-categories": [ + "Typos" + ] }, "searchableAttributes": { "type": "array", "items": { "type": "string" }, - "example": ["title,alternative_title", "author", "unordered(text)", "emails.personal"], + "example": [ + "title,alternative_title", + "author", + "unordered(text)", + "emails.personal" + ], "description": "Attributes used for searching. Attribute names are case-sensitive.\n\nBy default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off.\nWith a non-empty list, Algolia only returns results with matches in the selected attributes.\nIn addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first.\nTo make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`.\nAttributes with the same priority are always unordered.\n\nFor more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/).\n\n**Modifier**\n\n- `unordered(\"ATTRIBUTE\")`.\n Ignore the position of a match within the attribute.\n\nWithout a modifier, matches at the beginning of an attribute rank higher than matches at the end.\n", "default": [], - "x-categories": ["Attributes"] + "x-categories": [ + "Attributes" + ] }, "userData": { "$ref": "#/components/schemas/userData" @@ -6387,7 +7213,9 @@ "type": "string" } }, - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "attributeForDistinct": { "description": "Attribute that should be used to establish groups of results.\nAttribute names are case-sensitive.\n\nAll records with the same value for this attribute are considered a group.\nYou can combine `attributeForDistinct` with the `distinct` search parameter to control\nhow many items per group are included in the search results.\n\nIf you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting.\nThis applies faceting _after_ deduplication, which will result in accurate facet counts.\n", @@ -6402,17 +7230,24 @@ "example": "øé", "description": "Characters for which diacritics should be preserved.\n\nBy default, Algolia removes diacritics from letters.\nFor example, `é` becomes `e`. If this causes issues in your search,\nyou can specify characters that should keep their diacritics.\n", "default": "", - "x-categories": ["Languages"] + "x-categories": [ + "Languages" + ] }, "customRanking": { "type": "array", "items": { "type": "string" }, - "example": ["desc(popularity)", "asc(price)"], + "example": [ + "desc(popularity)", + "asc(price)" + ], "description": "Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/).\nAttribute names are case-sensitive.\n\nThe custom ranking attributes decide which items are shown first if the other ranking criteria are equal.\n\nRecords with missing values for your selected custom ranking attributes are always sorted last.\nBoolean attributes are sorted based on their alphabetical order.\n\n**Modifiers**\n\n- `asc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in ascending order.\n\n- `desc(\"ATTRIBUTE\")`.\n Sort the index by the values of an attribute, in descending order.\n\nIf you use two or more custom ranking attributes,\n[reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes,\nor the other attributes will never be applied.\n", "default": [], - "x-categories": ["Ranking"] + "x-categories": [ + "Ranking" + ] } } }, @@ -6481,7 +7316,10 @@ "type": "string" }, "description": "Words or phrases considered equivalent.", - "example": ["vehicle", "auto"] + "example": [ + "vehicle", + "auto" + ] }, "input": { "type": "string", @@ -6499,7 +7337,10 @@ "type": "string" }, "description": "Words to be matched in records.", - "example": ["vehicle", "auto"] + "example": [ + "vehicle", + "auto" + ] }, "placeholder": { "type": "string", @@ -6512,10 +7353,16 @@ "type": "string" }, "description": "Query words that will match the [placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/).", - "example": ["street", "st"] + "example": [ + "street", + "st" + ] } }, - "required": ["objectID", "type"] + "required": [ + "objectID", + "type" + ] }, "id": { "type": "string", @@ -6540,7 +7387,10 @@ "$ref": "#/components/schemas/nbHits" } }, - "required": ["hits", "nbHits"] + "required": [ + "hits", + "nbHits" + ] }, "keyString": { "type": "string", @@ -6564,7 +7414,10 @@ "$ref": "#/components/schemas/createdAtTimestamp" } }, - "required": ["value", "createdAt"] + "required": [ + "value", + "createdAt" + ] }, "acl": { "description": "Access control list permissions.", @@ -6595,7 +7448,10 @@ "acl": { "type": "array", "description": "Permissions that determine the type of API requests this key can make.\nThe required ACL is listed in each endpoint's reference.\nFor more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl).\n", - "example": ["search", "addObject"], + "example": [ + "search", + "addObject" + ], "default": [], "items": { "$ref": "#/components/schemas/acl" @@ -6610,7 +7466,10 @@ "indexes": { "type": "array", "description": "Index names or patterns that this API key can access.\nBy default, an API key can access all indices in the same application.\n\nYou can use leading and trailing wildcard characters (`*`):\n\n- `dev_*` matches all indices starting with \"dev_\".\n- `*_dev` matches all indices ending with \"_dev\".\n- `*_products_*` matches all indices containing \"_products_\".\n", - "example": ["dev_*", "prod_en_products"], + "example": [ + "dev_*", + "prod_en_products" + ], "default": [], "items": { "type": "string" @@ -6635,7 +7494,9 @@ "referers": { "type": "array", "description": "Allowed HTTP referrers for this API key.\n\nBy default, all referrers are allowed.\nYou can use leading and trailing wildcard characters (`*`):\n\n- `https://algolia.com/*` allows all referrers starting with \"https://algolia.com/\"\n- `*.algolia.com` allows all referrers ending with \".algolia.com\"\n- `*algolia.com*` allows all referrers in the domain \"algolia.com\".\n\nLike all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data.\nFor more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions).\n", - "example": ["*algolia.com*"], + "example": [ + "*algolia.com*" + ], "default": [], "items": { "type": "string" @@ -6648,7 +7509,9 @@ "default": 0 } }, - "required": ["acl"] + "required": [ + "acl" + ] }, "getApiKeyResponse": { "allOf": [ @@ -6671,7 +7534,10 @@ "$ref": "#/components/schemas/createdAt" } }, - "required": ["key", "createdAt"] + "required": [ + "key", + "createdAt" + ] }, "ruleID": { "title": "objectID", @@ -6681,7 +7547,12 @@ "anchoring": { "type": "string", "description": "Which part of the search query the pattern should match:\n\n- `startsWith`. The pattern must match the beginning of the query.\n- `endsWith`. The pattern must match the end of the query.\n- `is`. The pattern must match the query exactly.\n- `contains`. The pattern must match anywhere in the query.\n\nEmpty queries are only allowed as patterns with `anchoring: is`.\n", - "enum": ["is", "startsWith", "endsWith", "contains"] + "enum": [ + "is", + "startsWith", + "endsWith", + "contains" + ] }, "context": { "type": "string", @@ -6719,7 +7590,10 @@ "editType": { "description": "Type of edit.", "type": "string", - "enum": ["remove", "replace"] + "enum": [ + "remove", + "replace" + ] }, "edit": { "type": "object", @@ -6789,7 +7663,9 @@ "description": "Whether the filter is disjunctive or conjunctive.\n\nIf true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation.\nIf false, multiple occurences are combined with the logical `AND` operation.\n" } }, - "required": ["facet"] + "required": [ + "facet" + ] }, "automaticFacetFilters": { "description": "Filter to be applied to the search.\n\nYou can use this to respond to search queries that match a facet value.\nFor example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet,\nyou can filter the results to show the top-ranked comedy movies.\n", @@ -6863,8 +7739,13 @@ "$ref": "#/components/schemas/promotePosition" } }, - "required": ["position", "objectIDs"], - "x-discriminator-fields": ["objectIDs"] + "required": [ + "position", + "objectIDs" + ], + "x-discriminator-fields": [ + "objectIDs" + ] }, "promoteObjectID": { "title": "objectID", @@ -6879,8 +7760,13 @@ "$ref": "#/components/schemas/promotePosition" } }, - "required": ["position", "objectID"], - "x-discriminator-fields": ["objectID"] + "required": [ + "position", + "objectID" + ], + "x-discriminator-fields": [ + "objectID" + ] }, "promote": { "oneOf": [ @@ -6927,7 +7813,9 @@ "$ref": "#/components/schemas/objectID" } }, - "required": ["objectID"] + "required": [ + "objectID" + ] } }, "userData": { @@ -6955,7 +7843,10 @@ "description": "When the rule should stop to be active, in Unix epoch time." } }, - "required": ["from", "until"] + "required": [ + "from", + "until" + ] }, "rule": { "type": "object", @@ -6995,7 +7886,10 @@ } } }, - "required": ["objectID", "consequence"] + "required": [ + "objectID", + "consequence" + ] }, "parameters_query": { "type": "string", @@ -7016,29 +7910,44 @@ }, "dictionaryType": { "type": "string", - "enum": ["plurals", "stopwords", "compounds"] + "enum": [ + "plurals", + "stopwords", + "compounds" + ] }, "dictionaryAction": { "type": "string", - "enum": ["addEntry", "deleteEntry"], + "enum": [ + "addEntry", + "deleteEntry" + ], "description": "Actions to perform." }, "dictionaryEntryState": { "type": "string", - "enum": ["enabled", "disabled"], + "enum": [ + "enabled", + "disabled" + ], "default": "enabled", "description": "Whether a dictionary entry is active." }, "dictionaryEntryType": { "type": "string", - "enum": ["custom", "standard"], + "enum": [ + "custom", + "standard" + ], "description": "Whether a dictionary entry is provided by Algolia (standard), or has been added by you (custom)." }, "dictionaryEntry": { "type": "object", "description": "Dictionary entry.", "additionalProperties": true, - "required": ["objectID"], + "required": [ + "objectID" + ], "properties": { "objectID": { "type": "string", @@ -7056,7 +7965,10 @@ "words": { "type": "array", "description": "Matching words in the `plurals` dictionary including declensions.", - "example": ["cheval", "cheveaux"], + "example": [ + "cheval", + "cheveaux" + ], "items": { "type": "string" } @@ -7064,7 +7976,11 @@ "decomposition": { "type": "array", "description": "Invividual components of a compound word in the `compounds` dictionary.", - "example": ["kopf", "schmerz", "tablette"], + "example": [ + "kopf", + "schmerz", + "tablette" + ], "items": { "type": "string" } @@ -7098,7 +8014,12 @@ "$ref": "#/components/schemas/nbPages" } }, - "required": ["hits", "page", "nbHits", "nbPages"] + "required": [ + "hits", + "page", + "nbHits", + "nbPages" + ] }, "standardEntry": { "oneOf": [ @@ -7156,7 +8077,11 @@ "type": "object", "description": "Dictionary language.", "additionalProperties": false, - "required": ["plurals", "stopwords", "compounds"], + "required": [ + "plurals", + "stopwords", + "compounds" + ], "properties": { "plurals": { "$ref": "#/components/schemas/dictionaryLanguage" @@ -7199,7 +8124,12 @@ "example": 0 } }, - "required": ["userID", "clusterName", "nbRecords", "dataSize"] + "required": [ + "userID", + "clusterName", + "nbRecords", + "dataSize" + ] }, "clusterName": { "type": "string", @@ -7219,7 +8149,9 @@ "source": { "type": "object", "description": "Source.", - "required": ["source"], + "required": [ + "source" + ], "properties": { "source": { "description": "IP address range of the source.", @@ -7242,12 +8174,20 @@ }, "logType": { "type": "string", - "enum": ["all", "query", "build", "error"], + "enum": [ + "all", + "query", + "build", + "error" + ], "default": "all" }, "taskStatus": { "type": "string", - "enum": ["published", "notPublished"], + "enum": [ + "published", + "notPublished" + ], "description": "Task status, `published` if the task is completed, `notPublished` otherwise." }, "GetTaskResponse": { @@ -7259,17 +8199,26 @@ "$ref": "#/components/schemas/taskStatus" } }, - "required": ["status"] + "required": [ + "status" + ] }, "operationType": { "type": "string", - "enum": ["move", "copy"], + "enum": [ + "move", + "copy" + ], "example": "copy", "description": "Operation to perform on the index." }, "scopeType": { "type": "string", - "enum": ["settings", "synonyms", "rules"] + "enum": [ + "settings", + "synonyms", + "rules" + ] }, "fetchedIndex": { "type": "object", @@ -7329,12 +8278,17 @@ "type": "string" }, "description": "Only present if the index is a primary index with replicas. Contains the names of all linked replicas.", - "example": ["T02_push", "T2replica"] + "example": [ + "T02_push", + "T2replica" + ] }, "virtual": { "type": "boolean", "description": "Only present if the index is a [virtual replica](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-an-index-alphabetically/#virtual-replicas).", - "x-categories": ["Ranking"] + "x-categories": [ + "Ranking" + ] } }, "required": [ @@ -7366,11 +8320,17 @@ "example": 100 } }, - "required": ["items"] + "required": [ + "items" + ] }, "apiKeyOperation": { "type": "string", - "enum": ["add", "delete", "update"] + "enum": [ + "add", + "delete", + "update" + ] }, "securedApiKeyRestrictions": { "type": "object", @@ -7426,7 +8386,11 @@ "$ref": "#/components/schemas/updatedAtResponse" } }, - "required": ["copyOperationResponse", "batchResponses", "moveOperationResponse"] + "required": [ + "copyOperationResponse", + "batchResponses", + "moveOperationResponse" + ] }, "builtInOperationType": { "type": "string", @@ -7465,7 +8429,10 @@ "$ref": "#/components/schemas/builtInOperationValue" } }, - "required": ["_operation", "value"] + "required": [ + "_operation", + "value" + ] } }, "parameters": { @@ -7577,7 +8544,16 @@ "description": "Requested page of the API response.\nIf `null`, the API response is not paginated.\n", "required": false, "schema": { - "type": "integer" + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ], + "default": null } }, "HitsPerPage": { @@ -7659,7 +8635,10 @@ "description": "Response, taskID, and deletion timestamp.", "additionalProperties": false, "type": "object", - "required": ["taskID", "deletedAt"], + "required": [ + "taskID", + "deletedAt" + ], "properties": { "taskID": { "$ref": "#/components/schemas/taskID" @@ -7715,7 +8694,9 @@ "description": "Response and creation timestamp.", "additionalProperties": false, "type": "object", - "required": ["createdAt"], + "required": [ + "createdAt" + ], "properties": { "createdAt": { "$ref": "#/components/schemas/createdAt" @@ -7724,25 +8705,60 @@ } } } + }, + "IndexInSameApp": { + "description": "Indices are in the same application. Use operationIndex instead.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBase" + } + } + } + }, + "IndexAlreadyExists": { + "description": "Destination index already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorBase" + } + } + } } } }, "x-tagGroups": [ { "name": "Search and indexing", - "tags": ["Indices", "Records", "Search"] + "tags": [ + "Indices", + "Records", + "Search" + ] }, { "name": "Relevance", - "tags": ["Rules", "Synonyms", "Dictionaries"] + "tags": [ + "Rules", + "Synonyms", + "Dictionaries" + ] }, { "name": "Others", - "tags": ["Api Keys", "Clusters", "Vaults", "Advanced"] + "tags": [ + "Api Keys", + "Clusters", + "Vaults", + "Advanced" + ] }, { "name": "Models", - "tags": ["_model_index_settings"] + "tags": [ + "_model_index_settings" + ] } ] -} +} \ No newline at end of file