From 99e4bdf2ca49518ba0993fc839b8848fcf879e85 Mon Sep 17 00:00:00 2001 From: Kai Welke Date: Wed, 17 Jan 2024 11:36:35 +0100 Subject: [PATCH] feat(specs): add acl permissions to operations (#2555) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément Vannicatte --- specs/abtesting/paths/abtest.yml | 4 ++++ specs/abtesting/paths/abtests.yml | 4 ++++ specs/abtesting/paths/stopABTest.yml | 4 +++- .../paths/click/getAverageClickPosition.yml | 2 ++ specs/analytics/paths/click/getClickPositions.yml | 4 +++- specs/analytics/paths/click/getClickThroughRate.yml | 2 ++ specs/analytics/paths/click/getConversionRate.yml | 2 ++ specs/analytics/paths/search/getNoClickRate.yml | 2 ++ specs/analytics/paths/search/getNoResultsRate.yml | 4 +++- specs/analytics/paths/search/getSearchesCount.yml | 2 ++ specs/analytics/paths/search/getSearchesNoClicks.yml | 2 ++ .../analytics/paths/search/getSearchesNoResults.yml | 2 ++ specs/analytics/paths/search/getTopCountries.yml | 2 ++ .../paths/search/getTopFilterAttributes.yml | 2 ++ .../paths/search/getTopFilterForAttribute.yml | 2 ++ .../paths/search/getTopFiltersNoResults.yml | 2 ++ specs/analytics/paths/search/getTopHits.yml | 2 ++ specs/analytics/paths/search/getTopSearches.yml | 2 ++ specs/analytics/paths/search/getUsersCount.yml | 2 ++ specs/analytics/paths/status/getStatus.yml | 2 ++ .../paths/authentications/authenticationID.yml | 12 ++++++++++++ .../paths/authentications/authentications.yml | 8 ++++++++ .../paths/authentications/searchAuthentications.yml | 4 ++++ specs/ingestion/paths/destinations/destinationID.yml | 12 ++++++++++++ specs/ingestion/paths/destinations/destinations.yml | 8 ++++++++ .../paths/destinations/searchDestinations.yml | 4 ++++ specs/ingestion/paths/runs/events/eventID.yml | 4 ++++ specs/ingestion/paths/runs/events/events.yml | 4 ++++ specs/ingestion/paths/runs/runID.yml | 4 ++++ specs/ingestion/paths/runs/runs.yml | 4 ++++ specs/ingestion/paths/sources/discover.yml | 8 ++++++++ specs/ingestion/paths/sources/searchSources.yml | 4 ++++ specs/ingestion/paths/sources/sourceID.yml | 12 ++++++++++++ specs/ingestion/paths/sources/sources.yml | 8 ++++++++ specs/ingestion/paths/tasks/disableTask.yml | 4 ++++ specs/ingestion/paths/tasks/enableTask.yml | 4 ++++ specs/ingestion/paths/tasks/runTask.yml | 4 ++++ specs/ingestion/paths/tasks/searchTasks.yml | 4 ++++ specs/ingestion/paths/tasks/taskID.yml | 4 ++++ specs/ingestion/paths/tasks/tasks.yml | 4 ++++ specs/personalization/paths/deleteUserProfile.yml | 2 ++ specs/personalization/paths/getUserTokenProfile.yml | 2 ++ .../paths/personalizationStrategy.yml | 4 ++++ specs/recommend/paths/getRecommendStatus.yml | 2 ++ specs/recommend/paths/getRecommendations.yml | 2 ++ specs/recommend/paths/recommendRule.yml | 4 ++++ specs/recommend/paths/searchRecommendRules.yml | 2 ++ specs/search/paths/advanced/getLogs.yml | 2 ++ specs/search/paths/advanced/getTask.yml | 2 ++ .../paths/dictionaries/batchDictionaryEntries.yml | 2 ++ .../search/paths/dictionaries/dictionarySettings.yml | 4 ++++ .../paths/dictionaries/getDictionaryLanguages.yml | 2 ++ .../paths/dictionaries/searchDictionaryEntries.yml | 2 ++ specs/search/paths/keys/key.yml | 4 ++++ specs/search/paths/keys/keys.yml | 4 ++++ specs/search/paths/keys/restoreApiKey.yml | 2 ++ specs/search/paths/manage_indices/listIndices.yml | 2 ++ specs/search/paths/manage_indices/operationIndex.yml | 6 ++++-- .../paths/multiclusters/batchAssignUserIds.yml | 4 +++- specs/search/paths/multiclusters/getTopUserIds.yml | 2 ++ .../paths/multiclusters/hasPendingMappings.yml | 2 ++ specs/search/paths/multiclusters/listClusters.yml | 2 ++ specs/search/paths/multiclusters/searchUserIds.yml | 6 ++++-- specs/search/paths/multiclusters/userId.yml | 4 ++++ specs/search/paths/multiclusters/userIds.yml | 4 ++++ specs/search/paths/objects/clearObjects.yml | 2 ++ specs/search/paths/objects/deleteBy.yml | 2 ++ specs/search/paths/objects/getObjects.yml | 4 +++- specs/search/paths/objects/multipleBatch.yml | 2 +- specs/search/paths/objects/object.yml | 8 +++++++- specs/search/paths/objects/objects.yml | 4 ++++ specs/search/paths/objects/partialUpdate.yml | 2 ++ specs/search/paths/rules/clearRules.yml | 2 ++ specs/search/paths/rules/rule.yml | 6 ++++++ specs/search/paths/rules/saveRules.yml | 2 ++ specs/search/paths/rules/searchRules.yml | 2 ++ specs/search/paths/search/browse.yml | 4 +++- specs/search/paths/search/search.yml | 2 ++ specs/search/paths/search/searchForFacetValues.yml | 2 ++ specs/search/paths/search/searchSingleIndex.yml | 2 ++ specs/search/paths/settings/settings.yml | 4 ++++ specs/search/paths/synonyms/clearSynonyms.yml | 2 ++ specs/search/paths/synonyms/saveSynonyms.yml | 2 ++ specs/search/paths/synonyms/searchSynonyms.yml | 2 ++ specs/search/paths/synonyms/synonym.yml | 10 ++++++++-- specs/search/paths/vault/appendSource.yml | 2 ++ specs/search/paths/vault/deleteSource.yml | 2 ++ specs/search/paths/vault/vaultSources.yml | 4 ++++ 88 files changed, 304 insertions(+), 14 deletions(-) diff --git a/specs/abtesting/paths/abtest.yml b/specs/abtesting/paths/abtest.yml index f0b29afae3..e3d8a62887 100644 --- a/specs/abtesting/paths/abtest.yml +++ b/specs/abtesting/paths/abtest.yml @@ -2,6 +2,8 @@ get: tags: - abtest operationId: getABTest + x-acl: + - analytics summary: Get A/B test details. description: > Get specific details for an A/B test. @@ -29,6 +31,8 @@ delete: tags: - abtest operationId: deleteABTest + x-acl: + - editSettings summary: Delete an A/B test. description: > Delete an A/B test. diff --git a/specs/abtesting/paths/abtests.yml b/specs/abtesting/paths/abtests.yml index 5526782a91..8bd6dddd92 100644 --- a/specs/abtesting/paths/abtests.yml +++ b/specs/abtesting/paths/abtests.yml @@ -2,6 +2,8 @@ post: tags: - abtest operationId: addABTests + x-acl: + - editSettings summary: Create an A/B test. description: Creates an A/B test. requestBody: @@ -48,6 +50,8 @@ get: tags: - abtest operationId: listABTests + x-acl: + - analytics summary: List all A/B tests. description: List all A/B tests. parameters: diff --git a/specs/abtesting/paths/stopABTest.yml b/specs/abtesting/paths/stopABTest.yml index d9ebe72152..bbc66f814c 100644 --- a/specs/abtesting/paths/stopABTest.yml +++ b/specs/abtesting/paths/stopABTest.yml @@ -2,11 +2,13 @@ post: tags: - abtest operationId: stopABTest + x-acl: + - editSettings summary: Stop an A/B test. description: > If stopped, the test is over and can't be restarted. There is now only one index, receiving 100% of all search requests. - + The data gathered for stopped A/B tests is retained. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests). diff --git a/specs/analytics/paths/click/getAverageClickPosition.yml b/specs/analytics/paths/click/getAverageClickPosition.yml index 6d0ea7e459..574782ed8b 100644 --- a/specs/analytics/paths/click/getAverageClickPosition.yml +++ b/specs/analytics/paths/click/getAverageClickPosition.yml @@ -2,6 +2,8 @@ get: tags: - click operationId: getAverageClickPosition + x-acl: + - analytics summary: Get average click position. description: > Return the average click position for the complete time range and for individual days. diff --git a/specs/analytics/paths/click/getClickPositions.yml b/specs/analytics/paths/click/getClickPositions.yml index af901bfecf..39f826d9ca 100644 --- a/specs/analytics/paths/click/getClickPositions.yml +++ b/specs/analytics/paths/click/getClickPositions.yml @@ -2,6 +2,8 @@ get: tags: - click operationId: getClickPositions + x-acl: + - analytics summary: Get click positions. description: | Show the number of clicks events and their associated position in the search results. @@ -46,7 +48,7 @@ get: - For positions 11 to 20, all click events are grouped - For positions 21 and up, all click events are grouped. type: array - example: [10,10] + example: [10, 10] items: type: integer clickCount: diff --git a/specs/analytics/paths/click/getClickThroughRate.yml b/specs/analytics/paths/click/getClickThroughRate.yml index 3f750e0111..bb0f9be891 100644 --- a/specs/analytics/paths/click/getClickThroughRate.yml +++ b/specs/analytics/paths/click/getClickThroughRate.yml @@ -2,6 +2,8 @@ get: tags: - click operationId: getClickThroughRate + x-acl: + - analytics summary: Get click-through rate (CTR). description: Returns a [click-through rate (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate). parameters: diff --git a/specs/analytics/paths/click/getConversionRate.yml b/specs/analytics/paths/click/getConversionRate.yml index 525c32f11f..7bbc4b4902 100644 --- a/specs/analytics/paths/click/getConversionRate.yml +++ b/specs/analytics/paths/click/getConversionRate.yml @@ -2,6 +2,8 @@ get: tags: - click operationId: getConversationRate + x-acl: + - analytics summary: Get conversion rate (CR). description: Return a [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate). parameters: diff --git a/specs/analytics/paths/search/getNoClickRate.yml b/specs/analytics/paths/search/getNoClickRate.yml index 32f6ea4ad7..a4cde56644 100644 --- a/specs/analytics/paths/search/getNoClickRate.yml +++ b/specs/analytics/paths/search/getNoClickRate.yml @@ -2,6 +2,8 @@ get: tags: - search operationId: getNoClickRate + x-acl: + - analytics summary: Get no click rate. description: Returns the rate at which searches don't lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks. parameters: diff --git a/specs/analytics/paths/search/getNoResultsRate.yml b/specs/analytics/paths/search/getNoResultsRate.yml index 98b6f92387..6b1d51df45 100644 --- a/specs/analytics/paths/search/getNoResultsRate.yml +++ b/specs/analytics/paths/search/getNoResultsRate.yml @@ -2,8 +2,10 @@ get: tags: - search operationId: getNoResultsRate + x-acl: + - analytics summary: Get no results rate. - description: Returns the rate at which searches didn't return any results. + description: Returns the rate at which searches didn't return any results. parameters: - $ref: '../../../common/parameters.yml#/Index' - $ref: '../../../common/parameters.yml#/StartDate' diff --git a/specs/analytics/paths/search/getSearchesCount.yml b/specs/analytics/paths/search/getSearchesCount.yml index 1cad7e1905..b3ad9d1f67 100644 --- a/specs/analytics/paths/search/getSearchesCount.yml +++ b/specs/analytics/paths/search/getSearchesCount.yml @@ -2,6 +2,8 @@ get: tags: - search operationId: getSearchesCount + x-acl: + - analytics summary: Get number of searches. description: Returns the number of searches within a time range. parameters: diff --git a/specs/analytics/paths/search/getSearchesNoClicks.yml b/specs/analytics/paths/search/getSearchesNoClicks.yml index e4dbcecacd..5d032aa35c 100644 --- a/specs/analytics/paths/search/getSearchesNoClicks.yml +++ b/specs/analytics/paths/search/getSearchesNoClicks.yml @@ -2,6 +2,8 @@ get: tags: - search operationId: getSearchesNoClicks + x-acl: + - analytics summary: Get top searches with no clicks. description: Return the most popular of the last 1,000 searches that didn't lead to any clicks. parameters: diff --git a/specs/analytics/paths/search/getSearchesNoResults.yml b/specs/analytics/paths/search/getSearchesNoResults.yml index 8caefee69d..180ba21607 100644 --- a/specs/analytics/paths/search/getSearchesNoResults.yml +++ b/specs/analytics/paths/search/getSearchesNoResults.yml @@ -2,6 +2,8 @@ get: tags: - search operationId: getSearchesNoResults + x-acl: + - analytics summary: Get top searches with no results. description: Returns the most popular of the latest 1,000 searches that didn't return any results. parameters: diff --git a/specs/analytics/paths/search/getTopCountries.yml b/specs/analytics/paths/search/getTopCountries.yml index f89f72d157..33a8039ac7 100644 --- a/specs/analytics/paths/search/getTopCountries.yml +++ b/specs/analytics/paths/search/getTopCountries.yml @@ -2,6 +2,8 @@ get: tags: - search operationId: getTopCountries + x-acl: + - analytics summary: Get top countries. description: Returns top countries. Limited to the 1,000 most frequent ones. parameters: diff --git a/specs/analytics/paths/search/getTopFilterAttributes.yml b/specs/analytics/paths/search/getTopFilterAttributes.yml index e093947bd6..a349d0c601 100644 --- a/specs/analytics/paths/search/getTopFilterAttributes.yml +++ b/specs/analytics/paths/search/getTopFilterAttributes.yml @@ -2,6 +2,8 @@ get: tags: - search operationId: getTopFilterAttributes + x-acl: + - analytics summary: Get top filterable attributes. description: Return the most popular [filterable attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in the 1,000 most recently used filters. parameters: diff --git a/specs/analytics/paths/search/getTopFilterForAttribute.yml b/specs/analytics/paths/search/getTopFilterForAttribute.yml index 8bfc463e85..42f370f96c 100644 --- a/specs/analytics/paths/search/getTopFilterForAttribute.yml +++ b/specs/analytics/paths/search/getTopFilterForAttribute.yml @@ -2,6 +2,8 @@ get: tags: - search operationId: getTopFilterForAttribute + x-acl: + - analytics summary: Get top filter values for an attribute. description: Returns the most popular filter values for an attribute in the 1,000 most recently used filters. parameters: diff --git a/specs/analytics/paths/search/getTopFiltersNoResults.yml b/specs/analytics/paths/search/getTopFiltersNoResults.yml index c88372d389..e54aaed15d 100644 --- a/specs/analytics/paths/search/getTopFiltersNoResults.yml +++ b/specs/analytics/paths/search/getTopFiltersNoResults.yml @@ -2,6 +2,8 @@ get: tags: - search operationId: getTopFiltersNoResults + x-acl: + - analytics summary: Get top filters for a no result search. description: Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 most recently used filters. parameters: diff --git a/specs/analytics/paths/search/getTopHits.yml b/specs/analytics/paths/search/getTopHits.yml index 78a5b9fea0..aad8feb0c6 100644 --- a/specs/analytics/paths/search/getTopHits.yml +++ b/specs/analytics/paths/search/getTopHits.yml @@ -2,6 +2,8 @@ get: tags: - search operationId: getTopHits + x-acl: + - analytics summary: Get top hits. description: Return the most popular clicked results in the last 1,000 searches. parameters: diff --git a/specs/analytics/paths/search/getTopSearches.yml b/specs/analytics/paths/search/getTopSearches.yml index ca7cfcac06..33a7a160f9 100644 --- a/specs/analytics/paths/search/getTopSearches.yml +++ b/specs/analytics/paths/search/getTopSearches.yml @@ -2,6 +2,8 @@ get: tags: - search operationId: getTopSearches + x-acl: + - analytics summary: Get top searches. description: Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits. parameters: diff --git a/specs/analytics/paths/search/getUsersCount.yml b/specs/analytics/paths/search/getUsersCount.yml index d20c70f376..af1ed076d9 100644 --- a/specs/analytics/paths/search/getUsersCount.yml +++ b/specs/analytics/paths/search/getUsersCount.yml @@ -2,6 +2,8 @@ get: tags: - search operationId: getUsersCount + x-acl: + - analytics summary: Get user count. description: Return the count of unique users. parameters: diff --git a/specs/analytics/paths/status/getStatus.yml b/specs/analytics/paths/status/getStatus.yml index 74ba2fa704..e99655d12d 100644 --- a/specs/analytics/paths/status/getStatus.yml +++ b/specs/analytics/paths/status/getStatus.yml @@ -2,6 +2,8 @@ get: tags: - advanced operationId: getStatus + x-acl: + - analytics summary: Get Analytics API status. description: > Return the latest update time of the Analytics API for an index. If the index has been recently created or no search has been performed yet, `updatedAt` will be `null`. diff --git a/specs/ingestion/paths/authentications/authenticationID.yml b/specs/ingestion/paths/authentications/authenticationID.yml index 67c58ef8d0..2827e5da37 100644 --- a/specs/ingestion/paths/authentications/authenticationID.yml +++ b/specs/ingestion/paths/authentications/authenticationID.yml @@ -4,6 +4,10 @@ get: summary: Get a authentication. description: Get the authentication of the given authenticationID. operationId: getAuthentication + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathAuthenticationID' responses: @@ -22,6 +26,10 @@ patch: summary: Update a authentication. description: Update the authentication of the given authenticationID. operationId: updateAuthentication + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathAuthenticationID' requestBody: @@ -46,6 +54,10 @@ delete: summary: Delete a authentication. description: Soft delete the authentication of the given authenticationID. operationId: deleteAuthentication + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathAuthenticationID' responses: diff --git a/specs/ingestion/paths/authentications/authentications.yml b/specs/ingestion/paths/authentications/authentications.yml index 42d6c1deac..7a998bb01d 100644 --- a/specs/ingestion/paths/authentications/authentications.yml +++ b/specs/ingestion/paths/authentications/authentications.yml @@ -4,6 +4,10 @@ get: summary: Get a list of authentications. description: Get a list of authentications for the given query parameters, with pagination details. operationId: getAuthentications + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/itemsPerPage' - $ref: '../../common/parameters.yml#/page' @@ -39,6 +43,10 @@ post: summary: Create a authentication. description: Create a authentication. operationId: createAuthentication + x-acl: + - addObject + - deleteIndex + - editSettings requestBody: description: '' content: diff --git a/specs/ingestion/paths/authentications/searchAuthentications.yml b/specs/ingestion/paths/authentications/searchAuthentications.yml index 9792e6a0ea..5f9bd588e2 100644 --- a/specs/ingestion/paths/authentications/searchAuthentications.yml +++ b/specs/ingestion/paths/authentications/searchAuthentications.yml @@ -4,6 +4,10 @@ post: summary: Search among authentications. description: Search among authentications with a defined set of parameters. operationId: searchAuthentications + x-acl: + - addObject + - deleteIndex + - editSettings requestBody: content: application/json: diff --git a/specs/ingestion/paths/destinations/destinationID.yml b/specs/ingestion/paths/destinations/destinationID.yml index d850239d2b..a1eb95a95d 100644 --- a/specs/ingestion/paths/destinations/destinationID.yml +++ b/specs/ingestion/paths/destinations/destinationID.yml @@ -4,6 +4,10 @@ get: summary: Get a destination. description: Get the destination of the given destinationID. operationId: getDestination + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathDestinationID' responses: @@ -22,6 +26,10 @@ patch: summary: Update a destination. description: Update the destination of the given destinationID. operationId: updateDestination + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathDestinationID' requestBody: @@ -46,6 +54,10 @@ delete: summary: Delete a destination. description: Soft delete the destination of the given destinationID. operationId: deleteDestination + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathDestinationID' responses: diff --git a/specs/ingestion/paths/destinations/destinations.yml b/specs/ingestion/paths/destinations/destinations.yml index 4608eeac8a..6dea60efdc 100644 --- a/specs/ingestion/paths/destinations/destinations.yml +++ b/specs/ingestion/paths/destinations/destinations.yml @@ -4,6 +4,10 @@ get: summary: Get a list of destinations. description: Get a list of destinations for the given query parameters, with pagination details. operationId: getDestinations + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/itemsPerPage' - $ref: '../../common/parameters.yml#/page' @@ -39,6 +43,10 @@ post: summary: Create a destination. description: Create a destination. operationId: createDestination + x-acl: + - addObject + - deleteIndex + - editSettings requestBody: description: '' content: diff --git a/specs/ingestion/paths/destinations/searchDestinations.yml b/specs/ingestion/paths/destinations/searchDestinations.yml index c047732024..2702bd45a0 100644 --- a/specs/ingestion/paths/destinations/searchDestinations.yml +++ b/specs/ingestion/paths/destinations/searchDestinations.yml @@ -4,6 +4,10 @@ post: summary: Search among destinations. description: Search among destinations with a defined set of parameters. operationId: searchDestinations + x-acl: + - addObject + - deleteIndex + - editSettings requestBody: content: application/json: diff --git a/specs/ingestion/paths/runs/events/eventID.yml b/specs/ingestion/paths/runs/events/eventID.yml index b807989c2a..257854c8a9 100644 --- a/specs/ingestion/paths/runs/events/eventID.yml +++ b/specs/ingestion/paths/runs/events/eventID.yml @@ -4,6 +4,10 @@ get: summary: Get an event. description: Get a single event for a specific runID. operationId: getEvent + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../../common/parameters.yml#/pathRunID' - $ref: '../../../common/parameters.yml#/pathEventID' diff --git a/specs/ingestion/paths/runs/events/events.yml b/specs/ingestion/paths/runs/events/events.yml index 25459be0e0..b8f70513d3 100644 --- a/specs/ingestion/paths/runs/events/events.yml +++ b/specs/ingestion/paths/runs/events/events.yml @@ -4,6 +4,10 @@ get: summary: Get a list of events. description: Get a list of events associated to the given runID, for the given query parameters. operationId: getEvents + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../../common/parameters.yml#/pathRunID' - $ref: '../../../common/parameters.yml#/itemsPerPage' diff --git a/specs/ingestion/paths/runs/runID.yml b/specs/ingestion/paths/runs/runID.yml index 8b0d4e570a..6a1fe8dcb6 100644 --- a/specs/ingestion/paths/runs/runID.yml +++ b/specs/ingestion/paths/runs/runID.yml @@ -4,6 +4,10 @@ get: summary: Get a run. description: Get a single run for the given ID. operationId: getRun + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathRunID' responses: diff --git a/specs/ingestion/paths/runs/runs.yml b/specs/ingestion/paths/runs/runs.yml index 8e3d309f1d..5fca9a09df 100644 --- a/specs/ingestion/paths/runs/runs.yml +++ b/specs/ingestion/paths/runs/runs.yml @@ -4,6 +4,10 @@ get: summary: Get a list of runs. description: Get a list of runs for the given query parameters, with pagination details. operationId: getRuns + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/itemsPerPage' - $ref: '../../common/parameters.yml#/page' diff --git a/specs/ingestion/paths/sources/discover.yml b/specs/ingestion/paths/sources/discover.yml index 376867e003..33fae7f4d5 100644 --- a/specs/ingestion/paths/sources/discover.yml +++ b/specs/ingestion/paths/sources/discover.yml @@ -4,6 +4,10 @@ get: summary: Retrieve a stream listing. description: Retrieve a stream listing for a given Singer specification compatible docker type source ID. operationId: getDockerSourceStreams + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathSourceID' responses: @@ -31,6 +35,10 @@ post: summary: Trigger a stream listing request. description: Trigger a stream listing request for a Singer specification compatible docker type source. operationId: triggerDockerSourceDiscover + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathSourceID' responses: diff --git a/specs/ingestion/paths/sources/searchSources.yml b/specs/ingestion/paths/sources/searchSources.yml index bb7c19e264..a02be00fb8 100644 --- a/specs/ingestion/paths/sources/searchSources.yml +++ b/specs/ingestion/paths/sources/searchSources.yml @@ -4,6 +4,10 @@ post: summary: Search among sources. description: Search among sources with a defined set of parameters. operationId: searchSources + x-acl: + - addObject + - deleteIndex + - editSettings requestBody: content: application/json: diff --git a/specs/ingestion/paths/sources/sourceID.yml b/specs/ingestion/paths/sources/sourceID.yml index a8640f9f0c..a8d200d91b 100644 --- a/specs/ingestion/paths/sources/sourceID.yml +++ b/specs/ingestion/paths/sources/sourceID.yml @@ -4,6 +4,10 @@ get: summary: Get a source. description: Get the source of the given sourceID. operationId: getSource + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathSourceID' responses: @@ -22,6 +26,10 @@ patch: summary: Update a source. description: Update the source of the given sourceID. operationId: updateSource + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathSourceID' requestBody: @@ -46,6 +54,10 @@ delete: summary: Delete a source. description: Soft delete the source of the given sourceID. operationId: deleteSource + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathSourceID' responses: diff --git a/specs/ingestion/paths/sources/sources.yml b/specs/ingestion/paths/sources/sources.yml index 41bad2b8e7..7cf432d487 100644 --- a/specs/ingestion/paths/sources/sources.yml +++ b/specs/ingestion/paths/sources/sources.yml @@ -4,6 +4,10 @@ get: summary: Get a list of sources. description: Get a list of sources for the given query parameters, with pagination details. operationId: getSources + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/itemsPerPage' - $ref: '../../common/parameters.yml#/page' @@ -39,6 +43,10 @@ post: summary: Create a source. description: Create a source. operationId: createSource + x-acl: + - addObject + - deleteIndex + - editSettings requestBody: description: '' content: diff --git a/specs/ingestion/paths/tasks/disableTask.yml b/specs/ingestion/paths/tasks/disableTask.yml index e29901954b..9c8759ffe0 100644 --- a/specs/ingestion/paths/tasks/disableTask.yml +++ b/specs/ingestion/paths/tasks/disableTask.yml @@ -4,6 +4,10 @@ put: summary: Disable a task. description: Disable the task of the given taskID. operationId: disableTask + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathTaskID' responses: diff --git a/specs/ingestion/paths/tasks/enableTask.yml b/specs/ingestion/paths/tasks/enableTask.yml index 72274b605c..0e6d7a7e79 100644 --- a/specs/ingestion/paths/tasks/enableTask.yml +++ b/specs/ingestion/paths/tasks/enableTask.yml @@ -4,6 +4,10 @@ put: summary: Enable a task. description: Enable the task of the given taskID. operationId: enableTask + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathTaskID' responses: diff --git a/specs/ingestion/paths/tasks/runTask.yml b/specs/ingestion/paths/tasks/runTask.yml index 4d6ab264c9..c8186979b4 100644 --- a/specs/ingestion/paths/tasks/runTask.yml +++ b/specs/ingestion/paths/tasks/runTask.yml @@ -4,6 +4,10 @@ post: summary: Run a task. description: Run the task of the given taskID. operationId: runTask + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathTaskID' responses: diff --git a/specs/ingestion/paths/tasks/searchTasks.yml b/specs/ingestion/paths/tasks/searchTasks.yml index c7dd8e2e06..b70b786c4e 100644 --- a/specs/ingestion/paths/tasks/searchTasks.yml +++ b/specs/ingestion/paths/tasks/searchTasks.yml @@ -4,6 +4,10 @@ post: summary: Search among tasks. description: Search among tasks with a defined set of parameters. operationId: searchTasks + x-acl: + - addObject + - deleteIndex + - editSettings requestBody: content: application/json: diff --git a/specs/ingestion/paths/tasks/taskID.yml b/specs/ingestion/paths/tasks/taskID.yml index 3335779e2b..ca8ea8e6b9 100644 --- a/specs/ingestion/paths/tasks/taskID.yml +++ b/specs/ingestion/paths/tasks/taskID.yml @@ -4,6 +4,10 @@ get: summary: Get a task. description: Get the task of the given taskID. operationId: getTask + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/pathTaskID' responses: diff --git a/specs/ingestion/paths/tasks/tasks.yml b/specs/ingestion/paths/tasks/tasks.yml index a6eaa34615..2456834f3c 100644 --- a/specs/ingestion/paths/tasks/tasks.yml +++ b/specs/ingestion/paths/tasks/tasks.yml @@ -4,6 +4,10 @@ get: summary: Get a list of tasks. description: Get a list of tasks for the given query parameters, with pagination details. operationId: getTasks + x-acl: + - addObject + - deleteIndex + - editSettings parameters: - $ref: '../../common/parameters.yml#/itemsPerPage' - $ref: '../../common/parameters.yml#/page' diff --git a/specs/personalization/paths/deleteUserProfile.yml b/specs/personalization/paths/deleteUserProfile.yml index 679da7403d..16e2ecaf34 100644 --- a/specs/personalization/paths/deleteUserProfile.yml +++ b/specs/personalization/paths/deleteUserProfile.yml @@ -2,6 +2,8 @@ delete: tags: - profiles operationId: deleteUserProfile + x-acl: + - recommendation summary: Delete a user profile. description: | Delete the user profile and all its associated data. diff --git a/specs/personalization/paths/getUserTokenProfile.yml b/specs/personalization/paths/getUserTokenProfile.yml index 3dac4a4caf..509f797d0b 100644 --- a/specs/personalization/paths/getUserTokenProfile.yml +++ b/specs/personalization/paths/getUserTokenProfile.yml @@ -2,6 +2,8 @@ get: tags: - profiles operationId: getUserTokenProfile + x-acl: + - recommendation summary: Get a user profile. description: | Get the user profile built from Personalization strategy. diff --git a/specs/personalization/paths/personalizationStrategy.yml b/specs/personalization/paths/personalizationStrategy.yml index eda1d7a293..55c51bbb2d 100644 --- a/specs/personalization/paths/personalizationStrategy.yml +++ b/specs/personalization/paths/personalizationStrategy.yml @@ -2,6 +2,8 @@ get: tags: - strategies operationId: getPersonalizationStrategy + x-acl: + - recommendation summary: Get the current strategy. description: The strategy contains information on the events and facets that impact user profiles and personalized search results. responses: @@ -24,6 +26,8 @@ post: tags: - strategies operationId: setPersonalizationStrategy + x-acl: + - recommendation summary: Set a new strategy. description: A strategy defines the events and facets that impact user profiles and personalized search results. requestBody: diff --git a/specs/recommend/paths/getRecommendStatus.yml b/specs/recommend/paths/getRecommendStatus.yml index 62cd9e4079..99d8b96905 100644 --- a/specs/recommend/paths/getRecommendStatus.yml +++ b/specs/recommend/paths/getRecommendStatus.yml @@ -2,6 +2,8 @@ get: tags: - recommendations operationId: getRecommendStatus + x-acl: + - editSettings summary: Get a Recommend task's status. description: Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use this value here to check the status of that task. parameters: diff --git a/specs/recommend/paths/getRecommendations.yml b/specs/recommend/paths/getRecommendations.yml index e4c6440505..e2bf40dee6 100644 --- a/specs/recommend/paths/getRecommendations.yml +++ b/specs/recommend/paths/getRecommendations.yml @@ -4,6 +4,8 @@ post: operationId: getRecommendations x-use-read-transporter: true x-cacheable: true + x-acl: + - search summary: Get recommendations and trending items. description: > Returns results from either recommendation or trending models: diff --git a/specs/recommend/paths/recommendRule.yml b/specs/recommend/paths/recommendRule.yml index a4888aa66f..b5d41f9208 100644 --- a/specs/recommend/paths/recommendRule.yml +++ b/specs/recommend/paths/recommendRule.yml @@ -2,6 +2,8 @@ get: tags: - recommendations operationId: getRecommendRule + x-acl: + - settings summary: Get a Recommend rule. description: Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). parameters: @@ -28,6 +30,8 @@ delete: tags: - recommendations operationId: deleteRecommendRule + x-acl: + - editSettings summary: Delete a Recommend rule. description: Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). parameters: diff --git a/specs/recommend/paths/searchRecommendRules.yml b/specs/recommend/paths/searchRecommendRules.yml index 61c1afb44f..17e4a943d8 100644 --- a/specs/recommend/paths/searchRecommendRules.yml +++ b/specs/recommend/paths/searchRecommendRules.yml @@ -4,6 +4,8 @@ post: operationId: searchRecommendRules x-use-read-transporter: true x-cacheable: true + x-acl: + - settings summary: List Recommend rules. description: List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/). parameters: diff --git a/specs/search/paths/advanced/getLogs.yml b/specs/search/paths/advanced/getLogs.yml index 09be353aca..323ee304af 100644 --- a/specs/search/paths/advanced/getLogs.yml +++ b/specs/search/paths/advanced/getLogs.yml @@ -2,6 +2,8 @@ get: tags: - Advanced operationId: getLogs + x-acl: + - logs description: > The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). diff --git a/specs/search/paths/advanced/getTask.yml b/specs/search/paths/advanced/getTask.yml index 800d4cce0d..8451854770 100644 --- a/specs/search/paths/advanced/getTask.yml +++ b/specs/search/paths/advanced/getTask.yml @@ -2,6 +2,8 @@ get: tags: - Indices operationId: getTask + x-acl: + - addObject description: Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task. summary: Check a task's status. parameters: diff --git a/specs/search/paths/dictionaries/batchDictionaryEntries.yml b/specs/search/paths/dictionaries/batchDictionaryEntries.yml index 0e9eca9d72..e0cd7c3cc0 100644 --- a/specs/search/paths/dictionaries/batchDictionaryEntries.yml +++ b/specs/search/paths/dictionaries/batchDictionaryEntries.yml @@ -2,6 +2,8 @@ post: tags: - Dictionaries operationId: batchDictionaryEntries + x-acl: + - editSettings description: Add or remove a batch of dictionary entries. summary: Batch dictionary entries. parameters: diff --git a/specs/search/paths/dictionaries/dictionarySettings.yml b/specs/search/paths/dictionaries/dictionarySettings.yml index 3b383575fb..e9b2ab4bc8 100644 --- a/specs/search/paths/dictionaries/dictionarySettings.yml +++ b/specs/search/paths/dictionaries/dictionarySettings.yml @@ -2,6 +2,8 @@ get: tags: - Dictionaries operationId: getDictionarySettings + x-acl: + - settings description: Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings). summary: Get stop word settings. responses: @@ -31,6 +33,8 @@ put: tags: - Dictionaries operationId: setDictionarySettings + x-acl: + - editSettings description: Set stop word settings for a specific language. summary: Set stop word settings. requestBody: diff --git a/specs/search/paths/dictionaries/getDictionaryLanguages.yml b/specs/search/paths/dictionaries/getDictionaryLanguages.yml index 1152bccd5d..a9c67d24f8 100644 --- a/specs/search/paths/dictionaries/getDictionaryLanguages.yml +++ b/specs/search/paths/dictionaries/getDictionaryLanguages.yml @@ -2,6 +2,8 @@ get: tags: - Dictionaries operationId: getDictionaryLanguages + x-acl: + - settings description: Lists Algolia's [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language's [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features. summary: List available languages. responses: diff --git a/specs/search/paths/dictionaries/searchDictionaryEntries.yml b/specs/search/paths/dictionaries/searchDictionaryEntries.yml index 604635f8d4..162020631b 100644 --- a/specs/search/paths/dictionaries/searchDictionaryEntries.yml +++ b/specs/search/paths/dictionaries/searchDictionaryEntries.yml @@ -4,6 +4,8 @@ post: operationId: searchDictionaryEntries x-use-read-transporter: true x-cacheable: true + x-acl: + - settings description: Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries. summary: Search dictionary entries. parameters: diff --git a/specs/search/paths/keys/key.yml b/specs/search/paths/keys/key.yml index a2aaa679a5..b6154df556 100644 --- a/specs/search/paths/keys/key.yml +++ b/specs/search/paths/keys/key.yml @@ -30,6 +30,8 @@ put: tags: - Api Keys operationId: updateApiKey + x-acl: + - admin summary: Update an API key. description: > Replace the permissions of an existing API key. @@ -75,6 +77,8 @@ delete: tags: - Api Keys operationId: deleteApiKey + x-acl: + - admin summary: Delete API key. description: > Delete an existing API key. diff --git a/specs/search/paths/keys/keys.yml b/specs/search/paths/keys/keys.yml index 556084c028..b9de346c5d 100644 --- a/specs/search/paths/keys/keys.yml +++ b/specs/search/paths/keys/keys.yml @@ -2,6 +2,8 @@ get: tags: - Api Keys operationId: listApiKeys + x-acl: + - admin summary: List API keys. description: List all API keys associated with your Algolia application, including their permissions and restrictions. responses: @@ -34,6 +36,8 @@ post: tags: - Api Keys operationId: addApiKey + x-acl: + - admin summary: Add API key. description: > Add a new API key with specific permissions and restrictions. diff --git a/specs/search/paths/keys/restoreApiKey.yml b/specs/search/paths/keys/restoreApiKey.yml index c3ebe64396..ecb23f2b05 100644 --- a/specs/search/paths/keys/restoreApiKey.yml +++ b/specs/search/paths/keys/restoreApiKey.yml @@ -2,6 +2,8 @@ post: tags: - Api Keys operationId: restoreApiKey + x-acl: + - admin summary: Restore API key. description: > Restore a deleted API key, along with its associated permissions. diff --git a/specs/search/paths/manage_indices/listIndices.yml b/specs/search/paths/manage_indices/listIndices.yml index 186197b43f..dcfe9cd2a8 100644 --- a/specs/search/paths/manage_indices/listIndices.yml +++ b/specs/search/paths/manage_indices/listIndices.yml @@ -2,6 +2,8 @@ get: tags: - Indices operationId: listIndices + x-acl: + - listIndexes summary: List indices. description: List indices in an Algolia application. parameters: diff --git a/specs/search/paths/manage_indices/operationIndex.yml b/specs/search/paths/manage_indices/operationIndex.yml index 5bcb4218f7..9e37685fc3 100644 --- a/specs/search/paths/manage_indices/operationIndex.yml +++ b/specs/search/paths/manage_indices/operationIndex.yml @@ -2,6 +2,8 @@ post: tags: - Indices operationId: operationIndex + x-acl: + - addObject summary: Copy, move, or rename an index. description: |- This `operation`, _copy_ or _move_, will copy or move a source index's (`IndexName`) records, settings, synonyms, and rules to a `destination` index. @@ -35,9 +37,9 @@ post: $ref: '../../common/enums.yml#/scopeType' description: |- **This only applies to the _copy_ operation.** - + If you omit `scope`, the copy command copies all records, settings, synonyms, and rules. - + If you specify `scope`, only the specified scopes are copied. required: - operation diff --git a/specs/search/paths/multiclusters/batchAssignUserIds.yml b/specs/search/paths/multiclusters/batchAssignUserIds.yml index eeaf5104da..acc0c1e6e9 100644 --- a/specs/search/paths/multiclusters/batchAssignUserIds.yml +++ b/specs/search/paths/multiclusters/batchAssignUserIds.yml @@ -2,6 +2,8 @@ post: tags: - Clusters operationId: batchAssignUserIds + x-acl: + - admin summary: Batch assign userIDs. description: > Assign multiple user IDs to a cluster. @@ -24,7 +26,7 @@ post: users: type: array description: User IDs to assign. - example: ['einstein','bohr','feynman'] + example: ['einstein', 'bohr', 'feynman'] items: type: string required: diff --git a/specs/search/paths/multiclusters/getTopUserIds.yml b/specs/search/paths/multiclusters/getTopUserIds.yml index 6f9215f790..6f5976da0d 100644 --- a/specs/search/paths/multiclusters/getTopUserIds.yml +++ b/specs/search/paths/multiclusters/getTopUserIds.yml @@ -2,6 +2,8 @@ get: tags: - Clusters operationId: getTopUserIds + x-acl: + - admin summary: Get top userID. description: > Get the IDs of the 10 users with the highest number of records per cluster. diff --git a/specs/search/paths/multiclusters/hasPendingMappings.yml b/specs/search/paths/multiclusters/hasPendingMappings.yml index 1dfabb1d81..75cd6a9eb1 100644 --- a/specs/search/paths/multiclusters/hasPendingMappings.yml +++ b/specs/search/paths/multiclusters/hasPendingMappings.yml @@ -2,6 +2,8 @@ get: tags: - Clusters operationId: hasPendingMappings + x-acl: + - admin summary: Get migration and user mapping status. description: > To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process. diff --git a/specs/search/paths/multiclusters/listClusters.yml b/specs/search/paths/multiclusters/listClusters.yml index 3e8512681c..3e940518e5 100644 --- a/specs/search/paths/multiclusters/listClusters.yml +++ b/specs/search/paths/multiclusters/listClusters.yml @@ -2,6 +2,8 @@ get: tags: - Clusters operationId: listClusters + x-acl: + - admin summary: List clusters. description: List the available clusters in a multi-cluster setup. responses: diff --git a/specs/search/paths/multiclusters/searchUserIds.yml b/specs/search/paths/multiclusters/searchUserIds.yml index b0bdb66a1c..668ab0370f 100644 --- a/specs/search/paths/multiclusters/searchUserIds.yml +++ b/specs/search/paths/multiclusters/searchUserIds.yml @@ -4,12 +4,14 @@ post: operationId: searchUserIds x-use-read-transporter: true x-cacheable: true + x-acl: + - admin summary: Search for a user ID. description: > Since it can take up to a few seconds to get the data from the different clusters, the response isn't real-time. - - To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). + + To ensure rapid updates, the user IDs index isn't built at the same time as the mapping. Instead, it's built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours). requestBody: required: true content: diff --git a/specs/search/paths/multiclusters/userId.yml b/specs/search/paths/multiclusters/userId.yml index 881d9a0e38..9ceb754c53 100644 --- a/specs/search/paths/multiclusters/userId.yml +++ b/specs/search/paths/multiclusters/userId.yml @@ -2,6 +2,8 @@ get: tags: - Clusters operationId: getUserId + x-acl: + - admin summary: Get userID. description: > Returns the userID data stored in the mapping. @@ -30,6 +32,8 @@ delete: tags: - Clusters operationId: removeUserId + x-acl: + - admin summary: Remove userID. description: Remove a userID and its associated data from the multi-clusters. parameters: diff --git a/specs/search/paths/multiclusters/userIds.yml b/specs/search/paths/multiclusters/userIds.yml index ce77d7350f..c737480c97 100644 --- a/specs/search/paths/multiclusters/userIds.yml +++ b/specs/search/paths/multiclusters/userIds.yml @@ -2,6 +2,8 @@ post: tags: - Clusters operationId: assignUserId + x-acl: + - admin summary: Assign or move a user ID. description: > Assign or move a user ID to a cluster. @@ -39,6 +41,8 @@ get: tags: - Clusters operationId: listUserIds + x-acl: + - admin summary: List userIDs. description: > List the userIDs assigned to a multi-cluster application. diff --git a/specs/search/paths/objects/clearObjects.yml b/specs/search/paths/objects/clearObjects.yml index 5213b0b335..9ff050f6b5 100644 --- a/specs/search/paths/objects/clearObjects.yml +++ b/specs/search/paths/objects/clearObjects.yml @@ -2,6 +2,8 @@ post: tags: - Records operationId: clearObjects + x-acl: + - deleteIndex summary: Delete all records from an index. description: Delete the records but leave settings and index-specific API keys untouched. parameters: diff --git a/specs/search/paths/objects/deleteBy.yml b/specs/search/paths/objects/deleteBy.yml index e925c976f0..92ad831d1b 100644 --- a/specs/search/paths/objects/deleteBy.yml +++ b/specs/search/paths/objects/deleteBy.yml @@ -2,6 +2,8 @@ post: tags: - Records operationId: deleteBy + x-acl: + - deleteIndex summary: Delete all records matching a query. description: > This operation doesn't support all the query options, only its filters (numeric, facet, or tag) and geo queries. diff --git a/specs/search/paths/objects/getObjects.yml b/specs/search/paths/objects/getObjects.yml index fcdd8ca8d6..4bcdb4b7fe 100644 --- a/specs/search/paths/objects/getObjects.yml +++ b/specs/search/paths/objects/getObjects.yml @@ -4,6 +4,8 @@ post: operationId: getObjects x-use-read-transporter: true x-cacheable: true + x-acl: + - search summary: Get multiple records. description: > Retrieve one or more records, potentially from different indices, in a single API operation. @@ -35,7 +37,7 @@ post: items: type: string description: Attributes to retrieve. If not specified, all retrievable attributes are returned. - example: ['author','title','content'] + example: ['author', 'title', 'content'] objectID: type: string description: Record's objectID. diff --git a/specs/search/paths/objects/multipleBatch.yml b/specs/search/paths/objects/multipleBatch.yml index 9bdf3e9270..c9ac23b303 100644 --- a/specs/search/paths/objects/multipleBatch.yml +++ b/specs/search/paths/objects/multipleBatch.yml @@ -6,7 +6,7 @@ post: To reduce the time spent on network round trips, you can perform several write actions in a single request. It's a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. - + The supported actions are equivalent to the individual operations of the same name. summary: Batch write operations on multiple indices. requestBody: diff --git a/specs/search/paths/objects/object.yml b/specs/search/paths/objects/object.yml index f91d9f0748..326f2d2618 100644 --- a/specs/search/paths/objects/object.yml +++ b/specs/search/paths/objects/object.yml @@ -2,6 +2,8 @@ get: tags: - Records operationId: getObject + x-acl: + - search summary: Get a record. description: To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects). parameters: @@ -45,10 +47,12 @@ put: tags: - Records operationId: addOrUpdateObject + x-acl: + - addObject summary: Add or update a record (using objectID). description: | If you use an existing `objectID`, the existing record will be replaced with the new one. - + To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch). @@ -78,6 +82,8 @@ delete: tags: - Records operationId: deleteObject + x-acl: + - deleteObject summary: Delete a record. description: To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead. parameters: diff --git a/specs/search/paths/objects/objects.yml b/specs/search/paths/objects/objects.yml index 86ef677522..980b6c9d8b 100644 --- a/specs/search/paths/objects/objects.yml +++ b/specs/search/paths/objects/objects.yml @@ -2,6 +2,8 @@ post: tags: - Records operationId: saveObject + x-acl: + - addObject description: > Add a record (object) to an index or replace it. @@ -54,6 +56,8 @@ delete: tags: - Indices operationId: deleteIndex + x-acl: + - deleteIndex summary: Delete index. description: Delete an existing index. parameters: diff --git a/specs/search/paths/objects/partialUpdate.yml b/specs/search/paths/objects/partialUpdate.yml index 9cae5ae264..b424187f2c 100644 --- a/specs/search/paths/objects/partialUpdate.yml +++ b/specs/search/paths/objects/partialUpdate.yml @@ -2,6 +2,8 @@ post: tags: - Records operationId: partialUpdateObject + x-acl: + - addObject summary: Update record attributes. x-codegen-request-body-name: attributesToUpdate description: > diff --git a/specs/search/paths/rules/clearRules.yml b/specs/search/paths/rules/clearRules.yml index 9f50068f9b..9fc9f61cc5 100644 --- a/specs/search/paths/rules/clearRules.yml +++ b/specs/search/paths/rules/clearRules.yml @@ -2,6 +2,8 @@ post: tags: - Rules operationId: clearRules + x-acl: + - editSettings summary: Delete all rules. description: Delete all rules in the index. parameters: diff --git a/specs/search/paths/rules/rule.yml b/specs/search/paths/rules/rule.yml index f263825f44..17577ad435 100644 --- a/specs/search/paths/rules/rule.yml +++ b/specs/search/paths/rules/rule.yml @@ -2,6 +2,8 @@ get: tags: - Rules operationId: getRule + x-acl: + - settings summary: Get a rule. description: Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). parameters: @@ -27,6 +29,8 @@ put: tags: - Rules operationId: saveRule + x-acl: + - editSettings summary: Create or update a rule. description: To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). parameters: @@ -59,6 +63,8 @@ delete: tags: - Rules operationId: deleteRule + x-acl: + - editSettings summary: Delete a rule. description: Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules). parameters: diff --git a/specs/search/paths/rules/saveRules.yml b/specs/search/paths/rules/saveRules.yml index 0d08a8a4cb..805a3c362f 100644 --- a/specs/search/paths/rules/saveRules.yml +++ b/specs/search/paths/rules/saveRules.yml @@ -2,6 +2,8 @@ post: tags: - Rules operationId: saveRules + x-acl: + - editSettings summary: Save a batch of rules. description: Create or update multiple rules. x-codegen-request-body-name: rules diff --git a/specs/search/paths/rules/searchRules.yml b/specs/search/paths/rules/searchRules.yml index 23e95b2169..42637f414b 100644 --- a/specs/search/paths/rules/searchRules.yml +++ b/specs/search/paths/rules/searchRules.yml @@ -4,6 +4,8 @@ post: operationId: searchRules x-use-read-transporter: true x-cacheable: true + x-acl: + - settings summary: Search for rules. description: Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body. parameters: diff --git a/specs/search/paths/search/browse.yml b/specs/search/paths/search/browse.yml index 973380c241..ce4b2a01dc 100644 --- a/specs/search/paths/search/browse.yml +++ b/specs/search/paths/search/browse.yml @@ -2,12 +2,14 @@ post: tags: - Search operationId: browse + x-acl: + - browse summary: Get all records from an index. description: > Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn't support: - + - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance. parameters: diff --git a/specs/search/paths/search/search.yml b/specs/search/paths/search/search.yml index 5ac48a3820..6c07796328 100644 --- a/specs/search/paths/search/search.yml +++ b/specs/search/paths/search/search.yml @@ -5,6 +5,8 @@ post: x-use-read-transporter: true x-cacheable: true x-legacy-signature: true + x-acl: + - search summary: Search multiple indices. description: Send multiple search queries to one or more indices. requestBody: diff --git a/specs/search/paths/search/searchForFacetValues.yml b/specs/search/paths/search/searchForFacetValues.yml index f84aec4336..790134da0e 100644 --- a/specs/search/paths/search/searchForFacetValues.yml +++ b/specs/search/paths/search/searchForFacetValues.yml @@ -4,6 +4,8 @@ post: operationId: searchForFacetValues x-use-read-transporter: true x-cacheable: true + x-acl: + - search summary: Search for facet values. description: > [Search for a facet's values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. diff --git a/specs/search/paths/search/searchSingleIndex.yml b/specs/search/paths/search/searchSingleIndex.yml index 33a0ecb77d..1cd4a2d2d2 100644 --- a/specs/search/paths/search/searchSingleIndex.yml +++ b/specs/search/paths/search/searchSingleIndex.yml @@ -4,6 +4,8 @@ post: operationId: searchSingleIndex x-use-read-transporter: true x-cacheable: true + x-acl: + - search summary: Search an index. description: Return records that match the query. parameters: diff --git a/specs/search/paths/settings/settings.yml b/specs/search/paths/settings/settings.yml index b64525ebb1..16d5b3de67 100644 --- a/specs/search/paths/settings/settings.yml +++ b/specs/search/paths/settings/settings.yml @@ -2,6 +2,8 @@ get: tags: - Indices operationId: getSettings + x-acl: + - search description: Return an object containing an index's [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). summary: Get index settings. parameters: @@ -26,6 +28,8 @@ put: tags: - Indices operationId: setSettings + x-acl: + - editSettings description: Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value. summary: Update index settings. parameters: diff --git a/specs/search/paths/synonyms/clearSynonyms.yml b/specs/search/paths/synonyms/clearSynonyms.yml index 0fe70af4a4..884a9069c8 100644 --- a/specs/search/paths/synonyms/clearSynonyms.yml +++ b/specs/search/paths/synonyms/clearSynonyms.yml @@ -2,6 +2,8 @@ post: tags: - Synonyms operationId: clearSynonyms + x-acl: + - editSettings summary: Delete all synonyms. description: Delete all synonyms in the index. parameters: diff --git a/specs/search/paths/synonyms/saveSynonyms.yml b/specs/search/paths/synonyms/saveSynonyms.yml index 650ed0a00d..320ca0405c 100644 --- a/specs/search/paths/synonyms/saveSynonyms.yml +++ b/specs/search/paths/synonyms/saveSynonyms.yml @@ -2,6 +2,8 @@ post: tags: - Synonyms operationId: saveSynonyms + x-acl: + - editSettings summary: Save a batch of synonyms. description: Create or update multiple synonyms. parameters: diff --git a/specs/search/paths/synonyms/searchSynonyms.yml b/specs/search/paths/synonyms/searchSynonyms.yml index f544e63cd5..dab65babd8 100644 --- a/specs/search/paths/synonyms/searchSynonyms.yml +++ b/specs/search/paths/synonyms/searchSynonyms.yml @@ -4,6 +4,8 @@ post: operationId: searchSynonyms x-use-read-transporter: true x-cacheable: true + x-acl: + - settings summary: Search for synonyms. description: Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body. parameters: diff --git a/specs/search/paths/synonyms/synonym.yml b/specs/search/paths/synonyms/synonym.yml index 31c3831ed7..b3be94ba1a 100644 --- a/specs/search/paths/synonyms/synonym.yml +++ b/specs/search/paths/synonyms/synonym.yml @@ -2,6 +2,8 @@ get: tags: - Synonyms operationId: getSynonym + x-acl: + - settings summary: Get a synonym object. description: Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). parameters: @@ -27,14 +29,16 @@ put: tags: - Synonyms operationId: saveSynonym + x-acl: + - editSettings summary: Save a synonym. description: > Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn't exist, Algolia adds a new one. - + If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. - + To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms). parameters: - $ref: '../../../common/parameters.yml#/IndexName' @@ -79,6 +83,8 @@ delete: tags: - Synonyms operationId: deleteSynonym + x-acl: + - editSettings summary: Delete a synonym. description: Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms). parameters: diff --git a/specs/search/paths/vault/appendSource.yml b/specs/search/paths/vault/appendSource.yml index c6ac4a3894..84bfe39bfe 100644 --- a/specs/search/paths/vault/appendSource.yml +++ b/specs/search/paths/vault/appendSource.yml @@ -2,6 +2,8 @@ post: tags: - Vaults operationId: appendSource + x-acl: + - admin description: Add a source to the list of allowed sources. summary: Add a source. requestBody: diff --git a/specs/search/paths/vault/deleteSource.yml b/specs/search/paths/vault/deleteSource.yml index 4039de36da..a59bdc6a9a 100644 --- a/specs/search/paths/vault/deleteSource.yml +++ b/specs/search/paths/vault/deleteSource.yml @@ -2,6 +2,8 @@ delete: tags: - Vaults operationId: deleteSource + x-acl: + - admin description: Remove a source from the list of allowed sources. summary: Remove a source. parameters: diff --git a/specs/search/paths/vault/vaultSources.yml b/specs/search/paths/vault/vaultSources.yml index aa8af836ce..c36452dca2 100644 --- a/specs/search/paths/vault/vaultSources.yml +++ b/specs/search/paths/vault/vaultSources.yml @@ -2,6 +2,8 @@ get: tags: - Vaults operationId: getSources + x-acl: + - admin description: Get all allowed sources (IP addresses). summary: Get all allowed IP addresses. responses: @@ -24,6 +26,8 @@ put: tags: - Vaults operationId: replaceSources + x-acl: + - admin description: Replace all allowed sources. summary: Replace all sources. requestBody: