From 8f6dab9cae01e1268994d4100e73f5a383928b4c Mon Sep 17 00:00:00 2001 From: rui hildt Date: Mon, 23 Mar 2020 18:02:50 +0100 Subject: [PATCH] Add status code to responses --- research/API Documentation.md | 53 ++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/research/API Documentation.md b/research/API Documentation.md index 97c35e7..7e5f55a 100644 --- a/research/API Documentation.md +++ b/research/API Documentation.md @@ -36,12 +36,15 @@ A json object for the registered user with `id`, `username`, `email`, `timezone` ``` { - "id": 1, - "username": "jean", - "email": "jean@example.com", - "timezone": "Europe/Brussels", - "earliest_time":"09:30 AM", - "latest_time":"10:00 PM" + "status": 201, + "data": { + "id": 1, + "username": "jean", + "email": "jean@example.com", + "timezone": "Europe/Brussels", + "earliest_time":"09:30 AM", + "latest_time":"10:00 PM"l + } } ``` @@ -64,12 +67,15 @@ A json object for the registered user with `id`, `username`, `email`, `timezone` ``` { - "id": 1, - "username": "jean", - "email": "jean@example.com", - "timezone": "Europe/Brussels", - "earliest_time":"09:30 AM", - "latest_time":"10:00 PM" + "status": 200, + "data": { + "id": 1, + "username": "jean", + "email": "jean@example.com", + "timezone": "Europe/Brussels", + "earliest_time":"09:30 AM", + "latest_time":"10:00 PM" + } } ``` @@ -90,8 +96,12 @@ A json object for the deleted user with `username` and `email`. ``` { - "username": "jean", - "email": "jean@example.com" + "status": 200, + "data": { + "id": 15, + "username": "jean", + "email": "jean@example.com" + } } ``` @@ -113,11 +123,14 @@ A json object for the registered user with `id`, `username`, `email`, `timezone` ``` { - "id": 1, - "username": "jean", - "email": "jean@example.com", - "timezone": "Europe/Brussels", - "earliest_time":"09:30 AM", - "latest_time":"10:00 PM" + "status": 201, + "data": { + "id": 1, + "username": "jean", + "email": "jean@example.com", + "timezone": "Europe/Brussels", + "earliest_time":"09:30 AM", + "latest_time":"10:00 PM"l + } } ``` \ No newline at end of file