0
votes

I can't create a user in Artifactory via REST API.

Doc I'm using: https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-CreateorReplaceUser

my rest call:

curl -k -u user:pass -X PUT -H "Content-Type: application/json" "$API_URL/security/user/$USERNAME" -t $BUILD_ID.json

content of $BUILD_ID.json:

{"name" : "test","password" : "password","groups" : ["test","Test_AJU_group"]}

but unfortunately still getting http error 400 - bad request.

14:57:12 {
14:57:12 "errors" : [ {
14:57:12 "status" : 400,
14:57:12 "message" : "Bad Request"
14:57:12 } ]
14:57:12 }Finished: SUCCESS

I tried to send data in URL instead of file with same results.

1
after Jason's help, same command just repaired typo, i'm getting: 09:44:45 "message" : "No content to map to Object due to end of input" as i understand it, client do not end http connection after data send. Can someone help me to solve this one, please?Jakub S

1 Answers

2
votes

Perhaps /security/user => /security/users?