Skip to content

Rest Schnittstelle

Paul-Johne edited this page Feb 24, 2021 · 9 revisions

Cocktail&Musik Kombi Preference

URI Methode Semantik Content-Type (req) Content-Type (res) Statuscode
/combination/track/:userId?limit={int}&market={}&mood={} GET Kombination Anfragen JSON 200
/combination/playlist/:userId?limit={int}&market={}&mood={} GET Kombination Anfragen JSON 200

##User Ressource

URI Methode Semantik Content-Type (req) Content-Type (res) Statuscode
/users/:id?limit={int}&page={int} GET User Anfrage JSON 200
/users POST User anlegen JSON JSON 201
/users/:id DELETE User löschen 204, 404

HTTP-Statuscodes

100er (informative Response)

Code Bedeutung Beschreibung

200er (erfolgreiche Antwort)

Code Bedeutung Beschreibung
200 OK Die Anfrage war erfolgreich
204 No Content Die Anfrage war erfolgreich, gibt jedoch keine Daten zurück

300er (Umleitung der verlangten URI)

Code Bedeutung Beschreibung

400er (Client-Fehler)

Code Bedeutung Beschreibung
400 Bad Request Parameter der Anfrage sind ungültig
403 Forbidden Der Zugriff ist mit der aktuellen Anfrage nicht gestattet
404 Not Found Die Ressource ist nicht vorhanden

500er (Server-Fehler)

Code Bedeutung Beschreibung
500 Internal Server Error Server hat Schwierigkeiten mit der Anfrage
502 Bad Gateway Server erreicht weitere externe Softwarekomponente nicht

Clone this wiki locally