REST (Endpoints) - Forest23557/aLevel_Java GitHub Wiki

Table of Contents
- Create a car
- Show a certain car
- Update some information of a user
- Delete a certain car from a certain order
- Show all cars with an error
- User wants to change his profile nevertheless he has no rights
Create a car
- Method: POST,
- URL: https://www.car-shops.com/1.0/shop-1/cars,
- Parameters: none,
- Body:
{ "manufacturer":"Audi", "color":"Black", "price":"25000" },
- Response:
{ "id":"201aa6f6-7779-4819-abc3-496410f2a2cd", "manufacturer":"Audi", "color":"Black", "price":"25000" },
- Response status: 200 OK
Show a certain car
- Method: GET,
- URL: https://www.car-shops.com/1.0/shop-1/cars,
- Parameters: ?id=201aa6f6-7779-4819-abc3-496410f2a2cd,
- Body: none,
- Response:
{ "id":"201aa6f6-7779-4819-abc3-496410f2a2cd", "manufacturer":"Audi", "color":"Black", "price":"25000" },
- Response status: 200 OK
Update some information of a user
- Method: PUT,
- URL: https://www.car-shops.com/1.0/shop-1/user/profile,
- Parameters: ?id=7b981eb2-aac1-4087-a847-b645c9571d5c,
- Body:
{ "email":"[email protected]", "age":"27", "birth date":"25.06.1995" },
- Response:
{ "id":"7b981eb2-aac1-4087-a847-b645c9571d5c", "name":"Isaac", "surname":"Rodriguez", "email":"[email protected]", "age":"27", "birth date":"25.06.1995" },
- Response status: 200 OK
Delete a certain car from a certain order
- Method: DELETE,
- URL: https://www.car-shops.com/1.0/shop-1/cars,
- Parameters: ?id=201aa6f6-7779-4819-abc3-496410f2a2cd,
- Body: none,
- Response:
{ "id":"201aa6f6-7779-4819-abc3-496410f2a2cd", "manufacturer":"Audi", "color":"Black", "price":"25000" },
- Response status: 200 OK
Show all cars with an error
- Method: GET,
- URL: https://www.car-shops.com/1.0/shop-1/cars,
- Parameters: none,
- Body: none,
- Response:
{},
- Response status: 502 Bad Gateway
User wants to change his profile nevertheless he has no rights
- Method: PUT,
- URL: https://www.car-shops.com/1.0/shop-1/user/profile,
- Parameters: ?id=7b981eb2-aac1-4087-a847-b645c9571d5c,
- Body:
{ "email":"[email protected]", "age":"27", "birth date":"25.06.1995" },
- Response:
{},
- Response status: 401 Unauthorized