How to use the Management REST API (Azure Search)
The Management REST API of Azure Search provides programmatic access to much of the functionality available through the portal, allowing administrators to automate the following operations:
- Create or delete an Azure Search service
- Create, regenerate, or retrieve
api-keysfor routine changes to the administrative keys used for authenticating data operations
- Adjust the scale of an Azure Search service in response to changes in query volume or storage requirements
To fully administer your service programmatically, you will need two APIs: the Management REST API of Azure Search, 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. To create and manage Azure Search services in your subscription, make sure your HTTP request includes the Resource Manager endpoint, subscription ID, provider (in this case, Azure Search), and the Search service-specific operation.
The endpoint for service administration operations is the URL of Azure Resource Manager:
Note that all management API calls must include the subscription ID.
The current version of the Management REST API is
Authentication and Access Control
The Azure Search Management REST API is an extension of the Azure Resource Manager and shares its dependencies. As such, Active Directory is a prerequisite to service administration of Azure Search. All administrative requests from client code must be authenticated using Azure Active Directory before the request reaches the Resource Manager.
Note that if your application code handles service administration operations as well as data operations on search indexes or documents, you'll be using two authentication approaches for each of the Azure Search service APIs:
Service and key administration, due to the dependency on Resource Manager, relies on Active Directory for authentication.
Data requests against the Azure Search service endpoint, such as Create Index (Azure Search Service REST API) or Search Documents (Azure Search Service REST API), use an
api-keyin the request header. See Azure Search Service REST for information about authenticating a data request.
Authentication documentation for Resource Manager can be found at Use Resource Manager authentication API to access subscriptions.
Access control for Azure Resource Manager uses the built-in Owner, Contributor, and Reader roles. By default, all service administrators are members of the Owner role. For details, see Role-based access control in the Azure portal.
Visit these links for more information about service and index administration: