From e3b1996245517f27c5a376871ac2abb257daa28c Mon Sep 17 00:00:00 2001 From: Nico Kroll Date: Wed, 15 May 2024 08:31:30 +0200 Subject: [PATCH] After some internal discussions It's not straight, but most of the people of this world use a not-straight-"best practice". Yeah :-/ --- src/v2/README.md | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/src/v2/README.md b/src/v2/README.md index fd85dcf..1c176fa 100644 --- a/src/v2/README.md +++ b/src/v2/README.md @@ -25,13 +25,17 @@ Each trader has it's own domain or a generated one by us. The base-URI could be: # Methods -With each call you'll interact with ressources. The verb you do will be the HTTP method. -- GET /api/core/users -> Retrieve all customers -- GET /api/core/users/1 -> Retrieve data of customer 1 -- GET /api/core/users/1/permissions -> Retrieve all permissions of customer 1 -- DELETE /api/core/users/1 -> Delete customer 1 -- BAN /api/core/users/1 -> Ban customer 1 -- NOTIFY-GTC-VIOLANCE /api/core/users/1 -> Notifies customer 1 for a violation of the terms and conditions +With each call you'll interact with ressources. We follow typical best practices in HTTP method and URI namings. +- GET /api/tyrepro/users -> Retrieve all customers +- GET /api/tyrepro/users/1 -> Retrieve data of customer 1 +- GET /api/tyrepro/users/1/permissions -> Retrieve all permissions of customer 1 +- POST /api/tyrepro/users -> Create a customer +- PATCH /api/tyrepro/users/1 -> Modify some data of customer 1 +- DELETE /api/tyrepro/users/1 -> Delete customer 1 + +To apply non-CRUD-methods to a ressource, we allways use HTTP-POST-methods. +- POST /api/tyrepro/users/1/ban -> Ban customer 1 +- POST /api/tyrepro/users/1/notify-gtc-violance -> Notifies customer 1 for a violation of the terms and conditions # Authentication @@ -46,18 +50,3 @@ With each call you'll interact with ressources. The verb you do will be the HTTP # Response Resolution # Caching - - - - - -## TODO - -GET /api/shop/vehicles -GET /api/tyrepro/vehicles -GET /api/tiretask/vehicles -GET /api/openitem/vehicles -GET /api/rdks/vehicles - -GET /api/vehicles/shopview -GET /api/vehicles/tyreproview