how to call azure REST API endpoint

The followings are steps you need to do to call Azure REST API endpoint. We need to obtain the token and then hit this endpoint using bearer token authorizations


TOKEN=$(az account get-access-token --query accessToken --output tsv) 

curl -X GET \ "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.Sql/servers/$SERVER_NAME?api-version=2024-02-01" \ -H "Authorization: Bearer $TOKEN"


 

Comments

Popular posts from this blog

mongosh install properly

gemini cli getting file not defined error

vllm : Failed to infer device type