From c64b2120b0e39331b0d3968049b9558d27c38f00 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 26 Oct 2018 19:50:56 +0200 Subject: [PATCH] Begin to introduce status --- README.md | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index ff95852..0d43a89 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,12 @@ OR ``` + +## Usage: REST + +- Use an existing token to connect to the service +- All REST based messages: JSON + ### POST: /verify Not sure if this one will be publicly available. @@ -75,11 +81,6 @@ OR } ``` -## Usage: REST - -- Use an existing token to connect to the service -- All REST based messages: JSON - ### POST /app/register Register a new app. Returns an app ID. @@ -96,10 +97,21 @@ Request JSON object: Response JSON object: +``` { + status: "OK", appid: "UUID of your app", } +``` +OR + +``` +{ + status: "FAIL", + error: "Reason for failure" +} +``` ### GET /app @@ -115,17 +127,19 @@ Request JSON object: Response JSON object: -[ - { - name: "name of your web app" - appid: "UUID of your app", - }, - { - name: "name of your second web app" - appid: "UUID of your second app", - } -] - +{ + status: "OK", + apps: [ + { + name: "name of your web app" + appid: "UUID of your app", + }, + { + name: "name of your second web app" + appid: "UUID of your second app", + } + ] +} ### GET /app/UUID