ADR: Delete API endpoint to delete index for all kinds.
Status
-
Proposed - [] Under review
- [] Approved
- [] Retired
Context & Scope
The ADR is centered around the adding the capability of performing the deletion of elastic search index for all kinds per call in existing Delete index API in indexer service.
Decision
Currently the delete API introduce as the part of this ADR -#54 (closed) supports only the deletion of the single index for given kind. As part of Replay Design,ADR - storage#186 , user will may require deleting all the indices in use case of the reindex instead of overwriting the indices. As mentioned in this flow -
API Level Permission - users.datalake.ops
Service – Indexer
delete API in indexer service. Sample request:
curl --request DELETE \
--url '/api/indexer/v2/index' \
--header 'authorization: Bearer <JWT>' \
--header 'content-type: application/json' \
--header 'data-partition-id: opendes'
Current Scenario vs New Scenario of Delete Index API in Indexer Service
Existing Scenario | New Scenario | |
API Method | Delete | Delete |
Endpoint supported |
indexer/v2/index? kind=”tenant1:public:well:1.0.2“
|
- indexer/v2/index? kind=” tenant1:public:well:1.0.2“ -it will delete single kind
- indexer/v2/index – It will delete all kinds. (new endpoint) |
Backward Compatible | NA | Yes |
New Functionality | NA | It will allow you to delete all the indices. |
API level change | Currently kind should be non-blank parameter | Will remove nonblank parameter from kind. |
Code change required? | NA | Yes, backend code change is required to support the deletion of all kinds of indices. |
API Response | Same | Same |
Consequences
- This will provide user with the capability to delete index for all kinds.