从 teamcity rest 创建用户 API
Create user from teamcity rest API
rest api 将此命令声明为创建用户
curl -uadmin:admin -X POST 172.31.68.145:8111/app/rest/users
但是它给用户列表任何关于如何创建用户的建议?
这是因为您没有为请求指定任何post数据。
举个例子:
curl -H "Content-Type: application/json" -X POST -d '{"username":"xyz","password":"xyz"}' http://localhost:9090/api/login
这将使用 POST
数据对 http://localhost:9090/api/login
执行 POST
请求:{"username":"xyz","password":"xyz"}
并且 header 此数据设置为:Content-Type: application/json
.
rest api 将此命令声明为创建用户
curl -uadmin:admin -X POST 172.31.68.145:8111/app/rest/users
但是它给用户列表任何关于如何创建用户的建议?
这是因为您没有为请求指定任何post数据。
举个例子:
curl -H "Content-Type: application/json" -X POST -d '{"username":"xyz","password":"xyz"}' http://localhost:9090/api/login
这将使用 POST
数据对 http://localhost:9090/api/login
执行 POST
请求:{"username":"xyz","password":"xyz"}
并且 header 此数据设置为:Content-Type: application/json
.