Curl 从teamcity rest API创建用户

Curl 从teamcity rest API创建用户,curl,teamcity,command-line-interface,teamcity-rest-api,Curl,Teamcity,Command Line Interface,Teamcity Rest Api,RESTAPI将此命令声明为创建用户 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/

RESTAPI将此命令声明为创建用户

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

这将对
http://localhost:9090/api/login
使用
POST
数据:
{“用户名”:“xyz”,“密码”:“xyz”}
此数据的标题设置为:
内容类型:application/json

这是因为您没有为请求指定任何POST数据

让我们举一个例子:

curl -H "Content-Type: application/json" -X POST -d '{"username":"xyz","password":"xyz"}' http://localhost:9090/api/login
这将对
http://localhost:9090/api/login
使用
POST
数据:
{“用户名”:“xyz”,“密码”:“xyz”}
此数据的标题设置为:
内容类型:application/json