The Management REST API of Azure Cognitive Search provides programmatic access to administrative operations:
- Create or delete a search service
- Create, regenerate, or retrieve
api-keys(query or admin keys)
- Add or remove replicas and partitions (adjust capacity)
- Configure a search service to use a private endpoint
For all other tasks, such as creating and querying an index, use the Search Service REST API instead.
To fully administer your service programmatically, you will need two APIs: the Management REST API of Azure Cognitive Search documented here, plus the common Azure Resource Manager REST API. The Resource Manager API is used for general-purpose operations that are not service specific, such as querying subscription data, listing geo-locations, and so forth.
Connect to the management endpoint
When setting up the connection, start with the Resource Manager endpoint
https://management.azure.com. An HTTP request includes the Resource Manager endpoint, subscription ID, provider (
Microsoft.Search), and the API version. Operations are specified in the body of the request.
A fully specified endpoint has the following components:
The following clients are commonly used to call the management REST APIs:
- Azure PowerShell using the Az.Search PowerShell module (updated on a separate schedule and is not guaranteed to have the enhancements)
- Azure Command-Line Interface (CLI)
- Postman or other web API testing tools
You can also use the Azure portal.
Authentication and access control
Administration rights are conveyed through roles in Azure Active Directory (AD). A best practice is to assign roles to groups rather than individual users. The subscription owner or global administrator manages these assignments. For more information, see Assign Azure AD roles to groups.
For search service management, supported roles include Owner, Contributor, and Reader. For the full list, see Role-based authorization.
Management APIs in other SDKs
The REST APIs are foundational to Azure Cognitive Search, and any changes to the programming model are reflected in the REST APIs first.
Alternatives include the following Azure SDKs, which are independently updated on separate release schedules: