From 3d2245f416df3f0317b84e138fe9c5b197b9f12e Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Thu, 9 Oct 2014 19:23:19 -0500 Subject: [PATCH] More readme docs --- README.md | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2c217fc..32c12d1 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,44 @@ Get current database tables: GET /tables ``` +Get table details: + +``` +GET /tables/:name +``` + Execute select query: ``` -POST /query?query=SQL -GET /query?query=SQL -``` \ No newline at end of file +POST /select?query=SQL + GET /select?query=SQL +``` + +### Response formats + +Successful response: + +```json +{ + "columns": [ + "column_name1", + "column_name2", + "column_name3" + ], + "rows": [ + [ + "column 1 value", + "column 2 value", + "column 3 value" + ] + ] +} +``` + +Error response: + +```json +{ + "error": "Error message" +} +```