List Aliases (Preview REST API)

Applies to: 2023-07-01-Preview, 2021-04-30-Preview

Important

2023-07-01-Preview (no changes).

2021-04-30-Preview adds the API.

The List Aliases operation returns a list of the aliases in your Azure AI Search service.

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

URI Parameters

Parameter Description
service name Required. Set this to the unique, user-defined name of your search service.
api-version Required. The current preview version is 2023-07-01-Preview. See API versions for more versions.

Request Headers

The following table describes the required and optional request headers.

Fields Description
Content-Type Required. Set this to application/json
api-key Optional if you're using Azure roles and a bearer token is provided on the request, otherwise a key is required. An api-key is a unique, system-generated string that authenticates the request to your search service. Get requests against the search service must include an api-key header set to your admin key (as opposed to a query key). See Connect to Azure AI Search using key authentication for details.

Request Body

None.

Response

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

    {  
      "value" : [  
        {  
          "name": "my-alias",  
          "indexes": [
                "my-index"
            ]
        }]  
    }  

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

GET https://[service name].search.windows.net/aliases?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": "my-alias" }, ... ]  
    }  

See also