List Synonym Maps (Azure Cognitive Search REST API)

Request

The List Synonym Maps operation returns a list of the synonym maps in your Azure Cognitive Search service.

GET https://[service name].search.windows.net/synonymmaps?api-version=[api-version]  
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.

Request Headers

The following list describes the required and optional request headers.

Request Header Description
Content-Type: Required. Set this to application/json
api-key: Required. The api-key is used to authenticate the request to your Search service. It is a string value, unique to your service. The List Synonym Maps request must include an api-key header set to your admin key (as opposed to a query key).

You will also need the service name to construct the request URL. You can get both 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.

Response

For a successful request: 200 OK. Here is an example response body:

    {  
      "value" : [  
        {  
          "name": "synonymmap1",  
          "format": "solr",  
          ... other synonym map properties  
        }]  
    }  

You can filter the response down to just the properties you're interested in. For example, if you want only a list of synonym map names, use the OData select query option:

GET https://[service name].search.windows.net/synonymmaps?api-version=[api-version]&$select=name
api-key: [admin key]  

In this case, the response from the above example would appear as follows:

    {  
      "value" : [ { "name": "synonymmap1" }, ... ]  
    }  

See also

Azure Cognitive Search REST APIs
HTTP status codes (Azure Cognitive Search)
Synonym map operations (Azure Cognitive Search REST API)
Naming rules (Azure Cognitive Search)
OData Expression Syntax for Azure Cognitive Search
Support for OData (Azure Cognitive Search)