1. Read File
  2. Upload File
  3. Delete File

/storage

The user can read and write to the cloud storage

Read File

URL:  /storage/fs/{path_to_a_file} 

Method: GET

Protocol: HTTPS

Returns:

  • 200 (OK) + file content

Example:

$ curl -X GET https://api.giscloud.com/1/storage/fs/world/admin/countries.shp

Upload File

The request body must be formatted according to the multipart post method i.e. standard HTTP file upload method.

  • If file being uploaded is in ZIP format it will be automatically decompressed in the destination directory.

URL:  /storage/fs/{path_to_a_directory} 

Method: POST

Protocol: HTTPS

Returns one of:

  • 201 (Created)

Example:

$ curl -X POST https://api.giscloud.com/1/storage/fs/world/admin/

$ curl -i -F filedata=@test.csv "https://editor.giscloud.com/rest/1/storage/fs/a?api_key=<API_KEY>" -v

$ curl -i -F filedata=@<FILENAME> "https://api.giscloud.com/1/storage/fs/?api_key=<API_KEY>" -v

Delete File

URL:  /storage/fs/{path_to_a_file} 

Method: DELETE

Protocol: HTTPS

Returns one of:

  • 204 (No Content) if successful
  • 404 (Not Found) if the resource wasn’t found