Endpoints that do not require authentication
Getting a token for a user with the right to edit.
URL : /login
METHOD : POST
Example Request :
{
"login": "login",
"hash": "hash"
}
Example Responce:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzkxOTQ0MDZ9.SStozlh8nuZQLa8ek5f4wpnO4s7snBp1jI8g219fVZM"
}
Getting info for all vacancy
URL : /vacancy
METHOD : GET
Example Responce:
[
{
"id": 1,
"name": "best vacancy",
"salary": 120000,
"experience": "3-5",
"place": "msc"
}
]
Get vacancy info by id
URL : /vacancy/:id
METHOD : GET
Example Request : /vacancy/1
Example Responce:
{
"id": 1,
"name": "best vacancy",
"salary": 120000,
"experience": "3-5",
"place": "msc"
}
Endpoints that require authentication.
Required Header:
Authorization: Bearer <token from login>
Deletes vacancy with id
URL : /vacancy/:id
METHOD : DELETE
Example Request : /vacancy/1
Example Responce:
Creates new vacancy with given info
URL : /vacancy
METHOD : PUT
Example Request :
{
"name": "best vacancy",
"salary": 120000,
"experience": "3-5",
"place": "msc"
}
Example Responce:
{
"id": 1,
"name": "best vacancy",
"salary": 120000,
"experience": "3-5",
"place": "msc"
}