Using the Azure portal:
Go to the Azure portal (portal.azure.com) and navigate to your Cognitive Search resource.
In the left-hand menu, under the "Settings" section, click on "Usage + quotas."
On the "Usage + quotas" page, you will see the usage information for your Cognitive Search service, including the number of queries made in the current billing period.
Using the Azure Management API:
You can use the Azure Management API to programmatically retrieve the usage and quota information for your Cognitive Search service. Specifically, you can use the "ServiceStats" API to get this information. Here's an example using the Azure CLI:
Install the Azure CLI and log in to your Azure account.
- Open a command prompt or terminal and run the following command to retrieve the service stats for your Cognitive Search resource:
az rest --method GET --url "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/serviceStats?api-version=2020-08-01-Preview"
Replace {subscriptionId}
, {resourceGroupName}
, and {searchServiceName}
with the appropriate values for your Cognitive Search resource.
The response will contain information about the usage and quota of your Cognitive Search service, including the number of queries made.
Please note that the exact API endpoint and version may vary depending on your Azure Cognitive Search resource. You can refer to the Azure Management API documentation for more details on how to retrieve the service stats: Service - Get Stats
I hope this helps! Let me know if you have any further questions.