【发布时间】:2019-11-14 00:40:34
【问题描述】:
我正在尝试使用 HTTP API 导入现有的 json 文件,但“curl”命令抛出错误。
我正在使用下面的命令来导入现有的 json 文件,
curl --user admin:admin "http://localhost:3000/api/dashboards/db" -X POST -H "Content-Type:application/json;charset=UTF-8" --data-binary @/u04/sys_monitor/my_Metrics.json
如果我运行上面的命令,它会抛出类似 "[{"fieldNames":["Dashboard"],"classification":"RequiredError","message":"Required"}]" 的错误
我尝试运行以下命令,
curl --fail --insecure --user admin:admin --request "POST" "http://localhost:3000/api/dashboards/db" --header "Content-Type: application/json" --data-binary @/u04/sys_monitor/my_Metrics.json
对于上面的命令执行,我得到了这样的错误,
curl: (22) The requested URL returned error: 422 Unprocessable Entity
我哪里做错了,请帮助我,
【问题讨论】:
标签: grafana grafana-api