Get Alias (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 Get Alias operation gets the alias definition from Azure AI Search.

GET https://[service name].search.windows.net/aliases/[alias name]?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.
alias name Required. The request URI specifies the name of the alias to update.
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

Status Code: 200 OK is returned for a successful response.

The response body will look similar to the example below.

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

See also