kuzzleio / kuzzle

Open-source Back-end, self-hostable & ready to use - Real-time, storage, advanced search - Web, Apps, Mobile, IoT -
https://kuzzle.io
Apache License 2.0
1.44k stars 124 forks source link

Http route for security:createApiKey does not work #1707

Closed benoitvidis closed 4 years ago

benoitvidis commented 4 years ago

Most likely, a conflict with

  {verb: 'post', url: '/:index/:collection/:_id/_create', controller: 'document', action: 'create'},
Aschen commented 4 years ago

Thanks for reporting this issue!

I tried to reproduce on Kuzzle 2.3.1 but without success:

Creates an user:

$ kourou sdk:query security:createUser -a _id=aschen --body '{ content: { profileIds: ["default"] } }'

Creates an API key for the user:

# using kourou in http
$ kourou sdk:query security:createApiKey -a userId=aschen --body '{description: "test"}'

# using curl
$ curl -X POST -H "Content-Type: application/json" localhost:7512/users/aschen/api-keys/_create --data '{"description": "test"}'
benoitvidis commented 4 years ago

OK, sorry for the inconvenience. According to the user, it works now.