Optional | Аутентификация |
---|---|
Рукопожатие | Аутентификация |
POST address:8080/api/auth/login (public)
body:
{
"username": "test",
"password": "test"
}
example response: 200 "{jwtToken}"
POST address:8080/api/user (public)
body:
{
"username": "test",
"email": "[email protected]",
"password": "1234",
"firstName": "test",
"lastName": "test"
}
example response: 204 ""
POST address:8080/api/user/batch (private)
body:
example response: 204 ""
GET address:8080/api/user (private)
example response:
GET address:8080/api/user/{id} (private)
example response:
GET address:8080/api/user/username/{username} (private)
example response:
{
"username": "test",
"firstName": "",
"lastName": "",
"email": "[email protected]",
"gender": null,
"birthday": null,
"description": "",
"form": {
"man": false,
"woman": false,
"friendship": false,
"love": false,
"sex": false,
"flirt": false
}
}
PUT address:8080/api/user (private)
body:
{
"username": "test",
"firstName": "test",
"lastName": "test",
"email": "test",
"gender": "m/w",
"birthday": date,
"description": "test"
}
example response: "User with username: test updated"
DELETE address:8080/api/user/{id} (private)
example response:
DELETE address:8080/api/user/username/{username} (private)
example response:
POST address:8080/api/forms/ (private)
body:
{
"man": true/false,
"woman": true/false,
"friendship": true/false,
"love": true/false,
"sex": true/false,
"flirt": true/false
}
example response: 200 "1"
GET address:8080/api/forms/all (private)
example response:
GET address:8080/api/forms/{id} (private)
example response:
PUT address:8080/api/forms/ (private)
body:
{
"man": true/false,
"woman": true/false,
"friendship": true/false,
"love": true/false,
"sex": true/false,
"flirt": true/false
}
example response: 204 ""
DELETE address:8080/api/forms/{id} (private)
example response: 204 ""
GET address:8080/api/user/{id}/likes (optional param = ?outgoing=true/false) (private)
example response:
GET address:8080/api/user/{id}/likesDislikes (optional param = ?outgoing=true/false) (private)
example response:
POST address:8080/api/user/like/from/{from}/to/{to} (private)
example response: `204 ""
DELETE address:8080/api/user/like/from/{from}/to/{to} (private)
example response: 204 ""
GET address:8080/api/user/{id}/dislikes (optional param = ?outgoing=true/false) (private)
example response:
POST address:8080/api/user/dislike/from/{from}/to/{to} (private) -
example response: 204 ""
DELETE address:8080/api/user/dislike/from/{from}/to/{to} (private) -
example response: 204 ""
OPTIONS address:8080 (public)