REST (Endpoints) - Forest23557/aLevel_Java GitHub Wiki

Untitled-1

Table of Contents

  1. Create a car
  2. Show a certain car
  3. Update some information of a user
  4. Delete a certain car from a certain order
  5. Show all cars with an error
  6. User wants to change his profile nevertheless he has no rights

Create a car

{ "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

{ "id":"201aa6f6-7779-4819-abc3-496410f2a2cd", "manufacturer":"Audi", "color":"Black", "price":"25000" },

  • Response status: 200 OK

Update some information of a user

{ "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

{ "id":"201aa6f6-7779-4819-abc3-496410f2a2cd", "manufacturer":"Audi", "color":"Black", "price":"25000" },

  • Response status: 200 OK

Show all cars with an error

{},

  • Response status: 502 Bad Gateway

User wants to change his profile nevertheless he has no rights

{ "email":"[email protected]", "age":"27", "birth date":"25.06.1995" },

  • Response:

{},

  • Response status: 401 Unauthorized