Users
You must be authenticated to use this resource.
Create a new user
POST /users/
Request
| curl -X "POST" "http://0.0.0.0:8000/users/" \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...' \
-H 'Content-Type: application/json; charset=utf-8' \
-d '{
"username": "user-1",
"password": "secret"
}'
|
Response
Get all users
GET /users/
Request
| curl "http://0.0.0.0:8000/users/" \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...'
|
Response
Get user by id
GET /users/{id}
Request
| curl "http://0.0.0.0:8000/users/1" \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...'
|
Response
Update user
PUT /users/{id}
Request
| curl -X "PUT" "http://0.0.0.0:8000/users/1" \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...' \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"username": "user",
"password": "secret"
}'
|
Response
Delete user
DELETE /users/{id}
Request
| curl "http://0.0.0.0:8000/users/1" \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...'
|
Response
User data
name |
String |
Username. |
password |
String |
Password. |