I am trying to create new user using gitlab API v3.
Gitlab API docs: https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/users.md#user-creation
I am sending POST request to mygitlabhost/api/v3/users/ with all required data: [email protected]&password=33wrwsdfsf3&username=testone&name=fuuu and it returns me 404. Acutally I can list all users via GET request to mygitlabhost/api/v3/users/ so API seems to be running.
Request details: http://imm.io/120o6
what am I wrong?
Note that the issue 3411 "unable to add users to team" has some workaround in place for:
/etc/apache2/sites-available/defaultProxyPass http://127.0.0.1:8085/gitlab/api ProxyPassReverse http://127.0.0.1:8085/gitlab/api
location /api {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://gitlab-sock/gitlab/api;
proxy_redirect default;
}
To fix this problem you can modify the file:
app/assets/javascripts/api.js.coffeeto match your setup.In our case the path has gitlab as prefix:
users_path: "/gitlab/api/:version/users.json"
user_path: "/gitlab/api/:version/users/:id.json"
notes_path: "/gitlab/api/:version/projects/:id/notes.json"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With