Indexes - Delete
Deletes a search index and all the documents it contains. This operation is permanent, with no recovery option. Make sure you have a master copy of your index definition, data ingestion code, and a backup of the primary data source in case you need to re-build the index.
DELETE {endpoint}/indexes('{indexName}')?api-version=2024-07-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
The endpoint URL of the search service. |
index
|
path | True |
string |
The name of the index to delete. |
api-version
|
query | True |
string |
Client Api Version. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
x-ms-client-request-id |
string uuid |
The tracking ID sent with the request to help with debugging. |
|
If-Match |
string |
Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. |
|
If-None-Match |
string |
Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |
Responses
Name | Type | Description |
---|---|---|
204 No Content | ||
404 Not Found | ||
Other Status Codes |
Error response. |
Examples
SearchServiceDeleteIndex
Sample request
DELETE https://myservice.search.windows.net/indexes('myindex')?api-version=2024-07-01
Sample response
Definitions
Name | Description |
---|---|
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |