Alias Operations (Preview REST API)

API Version: 2021-04-30-Preview


The entire API is a preview feature.

In Azure Cognitive Search, an index alias is a secondary name that can be used to refer to an index for querying, indexing, and other operations. You can create an alias that maps to a search index and substitute the alias name in places where you would otherwise reference an index name. This gives you added flexibility if you ever need to change which index your application is pointing to. Instead of updating the references to the index name in your application, you can just update the mapping for your alias.

You can create and manage aliases in Azure Cognitive Search service via simple HTTP requests (POST, GET, PUT, DELETE) against a given alias resource. Aliases are service level resources and maintained independently from search indexes. Once a search index is created, you can create an alias that maps to that search index.


You can only use an alias with document operations or to get and update an index definition. Aliases can't be used to delete an index, can't be used with the Analyze Text API, and can't be used as the targetIndexName on an indexer.


The following example shows how to create an alias that maps to an existing search index.

POST /aliases?api-version=2021-04-30-preview
  "name" : "my-alias",  
  "indexes" : ["my-index"]

Operations on Aliases

An admin API key is required for all Alias operations.

See also