【发布时间】:2017-03-06 05:14:18
【问题描述】:
我正在关注 Sonarqube Web api 上的 documentation 以获取/设置属性。我想在项目 pi_core 上设置一个属性,其属性名称为“appName”,值为“UCFE”。最终我想通过 PowerShell 完全自动化这个,但现在我只是想像文档一样使用 curl 来验证概念。我的命令是:
curl -u myID:myPassword -X POST http://myServer.ad1.prod:9000/api/properties?id=appName&value=UCFE&resource=pi_core
我已通过执行其他需要管理员授权的通用 Web api 调用来验证我的 ID 和密码是否有效。当我尝试运行上述内容时,我得到:
{"err_code":200,"err_msg":"property created"}'value' is not recognized as an internal or external command, operable program or batch file.
'resource' is not recognized as an internal or external command, operable program or batch file.
知道为什么这个命令(在我看来除了值之外与文档相同)会出现上述错误吗?
【问题讨论】:
标签: api curl web sonarqube sonarqube-web