grafana HTTP API无法正确更新仪表板

时间:2019-07-03 12:28:37

标签: grafana grafana-api

  

我正在尝试使用HTTP grafana API更新现有的json文件,但是在grafana中没有成功更新仪表板,我使用了以下命令,

curl --user admin:admin -vvv "http://local:3000/api/dashboards/db" -X POST -d @My_Metrics.json -H 'Content-Type: application/json'
  

我收到上述命令的响应消息是

     
      
  • 关于将connect()连接到本地主机端口3000(#0)
  •   
  • 尝试10.x.x.x ...
  •   
  • 已连接到localhost(10.x.x.x)端口3000(#0)

  •   
  • 使用Basic与用户'admin'进行服务器身份验证

  •   
     

POST / api / dashboards / db HTTP / 1.1

     

授权:基本YWRtaW46YWRtaW4 =

     

User-Agent:curl / 7.29.0

     

主机:localhost:3000

     

接受: /

     

内容类型:application / json

     

内容长度:39380

     

期望:100-继续

     

HTTP / 1.1 100继续

     

HTTP / 1.1 422无法处理的实体

     

缓存控制:无缓存

     

Content-Type:application / json; charset = utf-8

     

到期:-1

     

编译指示:无缓存

     

X-Frame-Options:拒绝

     

X-Xss-Protection:1;模式=阻止

     

日期:2019年7月3日星期三格林尼治标准时间

     

内容长度:84

     
      
  • 发送结束之前HTTP错误,请停止发送

  •   
  • 关闭连接0

  •   
     

[{“ fieldNames”:[“ Dashboard”],“ classification”:“ RequiredError”,“ message”:“ Required”}]

     

请协助解决问题所在以及如何解决

0 个答案:

没有答案
相关问题