You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

45 lines
1.2 KiB

@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhc3RyaWEiLCJpYXQiOjE3NTI3ODUwNTR9.yOEsanvke0yejwbizkA33SwJMzohfn-xymetVJwSFSs
### CREATE USER
POST http://localhost:8000/api/users/
Content-Type: application/json
{
"email": "sacha@gmail.com",
"username": "astria",
"password": "Test_974",
"picture": "null"
}
### LOGIN USER
POST http://localhost:8000/api/users/login
Content-Type: application/json
{
"username": "astria",
"password": "Test1234!"
}
### GET USER BY ID
GET http://localhost:8000/api/users/astria
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJhc3RyaWEiLCJpYXQiOjE3NTE3NDYxMzJ9.i0MPfB7IJbMGNnaktV0OlxoCRs6ujKtVmSmlxLa2eNY
### GET USER BY USERNAME
GET http://localhost:8000/api/users/username/astria
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJhc3RyaWEiLCJpYXQiOjE3NTE3NDYxMzJ9.i0MPfB7IJbMGNnaktV0OlxoCRs6ujKtVmSmlxLa2eNY
### UPDATE USER
PUT http://localhost:8000/api/users/5
Authorization: Bearer {{token}}
Content-Type: application/json
{
"email": "test@test.com",
"username": "test",
"password": "Rwqfsfasxc_974",
"picture": "null"
}
### DELETE USER
DELETE http://localhost:8000/api/users/4
Authorization: Bearer {{token}}