Skip to main content
DELETE
https://sandbox.getcollate.io/api
/
v1
/
searchIndexes
/
{id}
DELETE /v1/searchIndexes/{id}
from metadata.sdk import configure
from metadata.sdk.entities import SearchIndexes

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# Soft delete by ID
SearchIndexes.delete("f5b0fa81-f241-4508-9219-dae31dcced18")

# Hard delete
SearchIndexes.delete(
    "f5b0fa81-f241-4508-9219-dae31dcced18",
    hard_delete=True
)

# Delete by name
SearchIndexes.delete_by_name("elasticsearch_sample.table_search_index")

# Delete by name with options
SearchIndexes.delete_by_name(
    "elasticsearch_sample.table_search_index",
    hard_delete=True
)

# Restore a soft-deleted search index
SearchIndexes.restore("f5b0fa81-f241-4508-9219-dae31dcced18")
{
  "id": "f5b0fa81-f241-4508-9219-dae31dcced18",
  "name": "table_search_index",
  "fullyQualifiedName": "elasticsearch_sample.table_search_index",
  "displayName": "TableSearchIndex",
  "version": 0.2,
  "updatedAt": 1769982670810,
  "updatedBy": "admin",
  "service": {
    "id": "search-service-id",
    "type": "searchService",
    "name": "elasticsearch_sample",
    "fullyQualifiedName": "elasticsearch_sample"
  },
  "serviceType": "ElasticSearch",
  "deleted": true,
  "owners": [],
  "tags": [],
  "domains": []
}

Delete a Search Index

Delete a search index by ID or fully qualified name. Supports soft delete (default), hard delete, and restore operations.

Delete by ID

id
string
required
UUID of the search index to delete.
recursive
boolean
default:"false"
Recursively delete child entities.
hardDelete
boolean
default:"false"
Permanently delete the search index. If false, the search index is soft-deleted and can be restored.

Delete by Name

Use DELETE /v1/searchIndexes/name/{fqn} to delete by fully qualified name.
fqn
string
required
Fully qualified name of the search index (e.g., elasticsearch_sample.table_search_index).
recursive
boolean
default:"false"
Recursively delete child entities.
hardDelete
boolean
default:"false"
Permanently delete the search index.

Restore a Soft-Deleted Search Index

Use PUT /v1/searchIndexes/restore to restore a soft-deleted search index.
id
string
required
UUID of the soft-deleted search index to restore.
DELETE /v1/searchIndexes/{id}
from metadata.sdk import configure
from metadata.sdk.entities import SearchIndexes

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# Soft delete by ID
SearchIndexes.delete("f5b0fa81-f241-4508-9219-dae31dcced18")

# Hard delete
SearchIndexes.delete(
    "f5b0fa81-f241-4508-9219-dae31dcced18",
    hard_delete=True
)

# Delete by name
SearchIndexes.delete_by_name("elasticsearch_sample.table_search_index")

# Delete by name with options
SearchIndexes.delete_by_name(
    "elasticsearch_sample.table_search_index",
    hard_delete=True
)

# Restore a soft-deleted search index
SearchIndexes.restore("f5b0fa81-f241-4508-9219-dae31dcced18")
{
  "id": "f5b0fa81-f241-4508-9219-dae31dcced18",
  "name": "table_search_index",
  "fullyQualifiedName": "elasticsearch_sample.table_search_index",
  "displayName": "TableSearchIndex",
  "version": 0.2,
  "updatedAt": 1769982670810,
  "updatedBy": "admin",
  "service": {
    "id": "search-service-id",
    "type": "searchService",
    "name": "elasticsearch_sample",
    "fullyQualifiedName": "elasticsearch_sample"
  },
  "serviceType": "ElasticSearch",
  "deleted": true,
  "owners": [],
  "tags": [],
  "domains": []
}

Returns

Soft delete returns the search index object with deleted: true. Hard delete returns no content (204). Restore returns the restored search index object.

Error Handling

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to delete this search index
404NOT_FOUNDSearch index with given ID or FQN does not exist