运行GET命令时找不到azure -command

时间:2019-03-26 21:24:36

标签: azure curl get

curl -X GET -H "Authorization: Bearer<token>" -H "Content-Type: application/json" https://management.azure.com/subscriptions/xxxx-xxx-xxxxxx-xxxxxxxxx/providers/microsoft.insights/eventtypes/management/values?api-version=2015-04-01&$filter=eventTimestamp ge '2019-03-21T00:00:00Z' and eventTimestamp le '2019-03-24T20:40:00Z' and resourceGroupName eq 'name'&$select=operationName,status,level

此命令用于收集天蓝色活动日志,我在CLI中运行此命令,它给出错误 bash:=,状态,级别:找不到命令... bash:= eventTimestamp:找不到命令...

1 个答案:

答案 0 :(得分:0)

嗨,我自己找到了解决方法

您正在使用的POST请求复制并粘贴到Postman(软件)。然后点击“代码”。 https://management.azure.com/subscriptions/xxxx-xxxxx-xxxxx-xxx/providers/microsoft.insights/eventtypes/management/values?api-version=2015-04-01&$filter=eventTimestamp%20ge%20%272019-03-21T00:00:00Z%27%20and%20eventTimestamp%20le%20%272019-03-24T20:40:00Z%27%20and%20resourceGroupName%20eq%20%27Ajay%27&$select=operationName,status,level'