Update Data Source (Azure Search Service REST API)

You can update an existing data source using an HTTP PUT request. You specify the name of the data source to update on the request URI:

PUT https://[service name].search.windows.net/datasources/[datasource name]?api-version=[api-version]  
    Content-Type: application/json  
    api-key: [admin key]  

The api-version is required. The current version is 2019-05-06. See API versions in Azure Search for details.

The api-key must be an admin key (as opposed to a query key). Refer to the authentication section in Azure Search Service REST to learn more about keys. Create an Azure Search service in the portal explains how to get the service URL and key properties used in the request.

Request

The request body syntax is the same as for Create Data Source (Azure Search Service REST API).

Response

For a successful request: 201 Created if a new data source was created, and 204 No Content if an existing data source was updated

Note

Some properties cannot be updated on an existing data source. For example, you cannot change the type of an existing data source.

See also

Azure Search Service REST
HTTP status codes (Azure Search)
Indexer operations (Azure Search Service REST API)
Naming rules (Azure Search)