1. List Tables
  2. Get Table
  3. Create Table
  4. Delete Table
  5. Export Table

/tables

List Tables

URL:  /tables 

Method: GET

Protocol: HTTP, HTTPS

Parameters:

  • type – private, public or shared (default: all accessible tables)

Returns one of:

  • 200 (OK) + collection of tables
  • 404 (Not Found)

Example:

$ curl -X GET http://api.giscloud.com/1/tables

Get Table

URL:  /tables/{name} 

Method: GET

Protocol: HTTP, HTTPS

Parameters: name – table to be retrieved

Example:

$ curl -X GET http://api.giscloud.com/1/tables/mytable

<table>
    <script id="tinyhippos-injected"/>
    <name>mytable</name>
    <geometry>POINT</geometry>
    <columns>
        <name>
            <type>text</type>
            <not_null/>
        </name>
    </columns>
    <primary_key>ogc_fid</primary_key>
</table>

Create Table

URL:  /tables 

Method: POST

Protocol: HTTPS

Returns:

  • 201

Example:

curl -X POST https://api.giscloud.com/1/tables

curl -H "Content-Type: application/json" -X POST -d '{"geometry":"POINT","name":"<TABLE_NAME>","columns":{"a":{"type":"text"},"b":{"type":"number"}}}' "https://api.giscloud.com/1/tables.json?api_key=<API_KEY>" -v

Delete Table

URL:  /tables/{name} 

Method: DELETE

Protocol: HTTPS

Parameters:

  • name – table to be deleted

Example:

curl -X DELETE https://api.giscloud.com/1/tables/mytable

Returns one of:

  • 204 if successful
  • 404 if the resource wasn’t found

Export Table

URL:  /tables/{name}/rows.csv 

Method: GET

Protocol: HTTP, HTTPS

Parameters:

  • name – table to be exported

Example:

curl -X GET https://api.giscloud.com/1/tables/mytable/rows.csv

Returns one of:

  • 200 (OK)
  • 404 (Not Found)