Deila með


HTTP status codes (Azure AI Search)

This page describes the HTTP status codes that are frequently returned when using the Azure AI Search API.

Common HTTP status codes

Code Description
200 OK Success on GET, PUT, or POST. Returned for a successful response.
201 Created Success on PUT or POST. Object created successfully.
202 Accepted Success on PUT or POST. This status code is returned for run indexer requests.
204 No Content Success on PUT or POST. An update succeeded but there's no information to return in the response.
207 Multi-Status Partial success for PUT or POST. Some documents succeeded, but at least one failed.
400 Bad Request Returned when there's an error in the request URI, headers, or body. The response body contains an error message explaining what the specific problem is.
401 Unauthorized Returned when credentials are missing. If you're using role-based access control, you or the search service are missing a role assignment. For problems accessing Azure AI Search, see Connect to Azure AI Search using roles. For more information about search connections to other resources, see Configure a search service to connect using a managed identity.
403 Forbidden Returned when authorization fails.
404 Not Found Returned when a resource doesn't exist on the server.
405 Method Not Supported Returned when the service recognizes an unsupported method. If you're querying an index, the formulation of that request includes the endpoint, indexes collection and index, and the docs collection and the search method (for example, https://mydemosvc.search.windows.net/indexes/mydemoidx/docs/search?api-version=2024-07-01).
409 Conflict Returned when write operations conflict. This status code is returned for resource updates, or during indexing when two processes try to update the same document simultaneously. Azure AI Search provides concurrency management for resource updates. For more information, see How to manage concurrency in Azure AI Search.
412 Precondition Failed Returned when an If-Match or If-None-Match header's condition evaluates to false. Associated with using optimistic concurrency control when sending HTTP requests for index definitions, indexers, skillsets, or data sources.
429 Too Many Requests If you get this status code during object creation, it means you have the maximum number of objects allowed for your service tier. For more information, see Service limits.
499 Client Closed Request This status code is never returned in a response, but you might see it in log entries recorded by search traffic analytics and Azure Monitor. It indicates that a client closed the connection before a response was returned by the service. When Azure AI Search detects a cancellation that wasn't requested by service-side code, or that the client no longer exists, a 499 is logged.
502 Bad Gateway This status code occurs when you enter HTTP instead of HTTPS in the connection.
503 Service Unavailable This status code means that the system is under heavy load and your request can't be processed. Mitigations include adding wait times to any retry logic or increasing capacity. Newer services come with more storage and computing power automatically. For more information about performance tuning, see Analyze performance in Azure AI Search.
504: Gateway Timeout Azure AI Search listens on HTTPS port 443. If your search service URL contains HTTP instead of HTTPS, a 504 status code is returned.

See also