Update synonym map (Azure Cognitive Search REST API)
You can update an existing synonym map using an HTTP PUT request. You specify the name of the synonym map to update on the request URI:
PUT https://[service name].search.windows.net/synonymmaps/[synonymmap 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 Cognitive Search for details.
The following table describes the required and optional request headers.
|Content-Type:||Required. Set this to
You will also need the service name to construct the request URL. You can get the service name and
api-key from your service dashboard in the Azure portal. See Create an Azure Cognitive Search service in the portal for page navigation help.
The request body syntax is the same as for Create Synonym Map (Azure Cognitive Search REST API).
For a successful request, "201 Created" if a new synonym map was created, and "204 No Content" if an existing synonym map was updated
By default the response body will be empty. However, if the
Prefer request header is set to
return=representation, the response body will contain the JSON for the synonym map that was updated or created. In this case, the success status code will be "201 Created" if a new synonym map was created and "200 OK" if an existing synonym map was updated.