Aliases - Get

Retrieves an alias definition.

GET {endpoint}/aliases('{aliasName}')?api-version=2023-10-01-Preview

URI Parameters

Name In Required Type Description
aliasName
path True

string

The name of the alias to retrieve.

endpoint
path True

string

The endpoint URL of the search service.

api-version
query True

string

Client Api Version.

Request Header

Name Required Type Description
x-ms-client-request-id

string

uuid

The tracking ID sent with the request to help with debugging.

Responses

Name Type Description
200 OK

SearchAlias

Other Status Codes

SearchError

Error response.

Examples

SearchServiceGetAlias

Sample request

GET https://myservice.search.windows.net/aliases('production')?api-version=2023-10-01-Preview

Sample response

{
  "name": "production",
  "indexes": [
    "hotels"
  ]
}

Definitions

Name Description
SearchAlias

Represents an index alias, which describes a mapping from the alias name to an index. The alias name can be used in place of the index name for supported operations.

SearchError

Describes an error condition for the API.

SearchAlias

Represents an index alias, which describes a mapping from the alias name to an index. The alias name can be used in place of the index name for supported operations.

Name Type Description
@odata.etag

string

The ETag of the alias.

indexes

string[]

The name of the index this alias maps to. Only one index name may be specified.

name

string

The name of the alias.

SearchError

Describes an error condition for the API.

Name Type Description
code

string

One of a server-defined set of error codes.

details

SearchError[]

An array of details about specific errors that led to this reported error.

message

string

A human-readable representation of the error.