admin管理员组文章数量:1410717
I am trying to add a new domain in Jenkins Dashboard >Manage Jenkins>Credentials>System hitting the api using curl command
curl --verbose --location --connect-timeout 20 --max-time 60 --insecure --request POST /credentials/store/system/createDomain --user admin:admin --header 'Jenkins-Crumb:bddb81286103c6928c300daca54f302471799700b22009510366053ece7185dd' --header 'Cookie:JSESSIONID.108078a4=node01w6og5vjmmlg0e5lji5uz3fh544.node0' --header 'Content-Type: application/json' --data '{"name": "ndo", "description": "Domain for storing credentials"}'
But each time it throws the error
html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 400 Nothing is submitted</title>
</head>
<body><h2>HTTP ERROR 400 Nothing is submitted</h2>
<table>
<tr><th>URI:</th><td>/credentials/store/system/createDomain</td></tr>
<tr><th>STATUS:</th><td>400</td></tr>
<tr><th>MESSAGE:</th><td>Nothing is submitted</td></tr>
<tr><th>SERVLET:</th><td>Stapler</td></tr>
</table>
<hr/><a href=";>Powered by Jetty:// 10.0.18</a><hr/>
</body>
</html>
How to fix the error ? I have tried other options like
--data-urlencode json='{"parameter": [{"name":"test", "description":"Domain for storing credentials"}]}'
and --data-raw but got the same error
本文标签:
版权声明:本文标题:How to fix HTTP ERROR 400 Nothing is submitted when running Jenkins API for credential domain? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744790854a2625279.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论