java-backend/rest.http

47 lines
1.1 KiB
Text
Raw Normal View History

2025-12-03 19:11:09 +00:00
### Get user by id (replace {{id}} or use a concrete id like 1)
GET http://175.15.15.91:8080/api/users/6927c8c75efcfda14c3ea570
2025-12-03 19:11:09 +00:00
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)
2025-12-17 00:56:16 +00:00
PUT http://175.15.15.91:8080/api/users/6927c8c75efcfda14c3ea570
Content-Type: application/json
Accept: application/json
# Authorization: Bearer {{token}}
{
2025-12-17 00:56:16 +00:00
"email": "rayanvix@gmail.com",
"password": "123456"
}
### Module of authorization
POST http://175.15.15.91:8080/auth/login
Content-Type: application/json
Accept: application/json
# Authorization: Bearer {{token}}
{
"email": "rayanvix@gmail.com",
"password": "123456"
}