Skip to content

Latest commit

 

History

History
78 lines (42 loc) · 1.94 KB

rest_api.md

File metadata and controls

78 lines (42 loc) · 1.94 KB

Rest Api

Table operations

GET /tables

Returns a list of tables

PUT /<table name>

Creates the table

DELETE /<table name>

Deletes the table

GET /<table name>

Returns the complete table as a json object if the table exists

GET /<table name>/columns

Returns a list of columns, with column counts in the table if the table exists

GET /<table name>/row

Returns the column name / value pairs for the first record in every column in the table (row 0) and removes these records from the table

GET /<table name>/<id>

Returns the column name / value pairs for every column in the table for the nominated row id (starting from 0) and removes these records from the table

POST /<table name>/row

With post body containing the column name / value pairs, will append values to last row in each column, creating columns that don't exist.

Example post data:

{
	"<column name>": "<value>",
	"<column name>": "<value>",
	"<column name>": "<value>"
}

if you need to keep the column data together for a row, then it's advised that you do not use api features that manipulate individual columns.

Column operations

GET /<table name>/columns

Returns a list of columns, with column counts in the table if the table exists

PUT /<table name>/<column name>

Creates the column

DELETE /<table name>/<column name>

Deletes the column

GET /<table name>/<column name>

Retrieves the value from the first row in the column and removes it from the table

GET /<table name>/<column name>/<id>

Retrieves a specific row's value in the column based on it's id and removes it from the table

GET /<table name>/<column name>/all

Retrieves all the values in the column, does not remove any values

PUT /<table name>/<column name>/<value>

Appends the value to the last row in the column