java-backend/rest.http

35 lines
No EOL
881 B
HTTP

### Get user by id (replace {{id}} or use a concrete id like 1)
GET http://175.15.15.91:8080/api/users/692cca264e957945b99f731a
Accept: application/json
# Authorization: Bearer {{token}}
### Find all users
GET http://175.15.15.91:8080/api/users
Accept: application/json
# Authorization: Bearer {{token}}
### Create a new user
POST http://175.15.15.91:8080/api/users
Content-Type: application/json
Accept: application/json
# Authorization: Bearer {{token}}
{
"name": "John Doe",
"email": "john.doe@olymp.com",
"password": "123456",
"profiles": [
"ROLE_CUSTOMER"
]
}
#### Update an existing user (replace {{id}} or use a concrete id like 1)
PUT http://175.15.15.91:8080/api/users/69311094e258303f40941a52
Content-Type: application/json
Accept: application/json
# Authorization: Bearer {{token}}
{
"email": "edinhoadm@gmail.com",
"password": "7654321"
}