Skip to content

Latest commit

 

History

History
107 lines (92 loc) · 4.62 KB

APIs.md

File metadata and controls

107 lines (92 loc) · 4.62 KB

Table Of Contents


# APIs ## Main | API | Methods | Usage | Parameters | Description | |-----|:-------------:|-----|-----|:-----:|-----| | / | GET | ... | ... | ... | ## Authentication

| API | Methods | Usage | Parameters | Description | |-----|:-------------:|-----|-----|:-----:|-----| | /auth/providers | GET | ... | ... | ... | | /auth/providers/google_apis | GET, POST, PUT | ... | ... | Proxies to https://www.googleapis.com, signing headers with OAUTH access_token | | /auth/providers/google_spreadsheets | GET, POST, PUT | ... | ... | Proxies to https://spreadsheets.google.com, signing headers with OAUTH access_token |

### Google+ OAUTH2 | API | Methods | Usage | Parameters | Description | |-----|:-------------:|-----|-----|:-----:|-----| | /auth/signin/google | POST | ... | ... | ... | | /auth/signout/google | POST | ... | ... | ... | | /auth/signin/google/oauth2_callback | POST | ... | ... | ... | | /auth/signin/google/refresh | POST | ... | ... | ... | ## Data Management ### Data Files | API | Methods | Usage | Parameters | Description | |-----|:-------------:|-----|-----|:-----:|-----| | /data | GET | ... | ... | ... | ### Data Stores | API | Methods | Usage | Parameters | Description | |-----|:-------------:|-----|-----|:-----:|-----| | /datastores | GET | ... | ... | ... | | /datastores/${datastore-id} | GET | ... | ... | ... | | /datastores/${datastore-id}/${database-id} | GET | ... | ... | ... | | /datastores/${datastore-id}/${database-id}/${collection-id} | GET | ... | "output", "output_filename", "sort_by", "sort_direction" | ... | ### Database Query Parameters | Parameter | Required | Usage | Description | |-----|:-------------:|---------|-----|-----| | output | false | ```?output=tsv``` | Provides tab-delimited file output for query result | | output_filename | false | ```?output_filename=example.tsv``` | Changes the default download filename | | sort_by | false | ```?sort_by=field_name``` | Appends sort operation to standard query | | sort_direction | false | ```?sort_direction=1``` or ```?sort_direction=-1``` | Indicates direction of sort. Positive value equals ASCENDING, Negative value equals DESCENDING | ### User Specific Object Storage (must have auth cookies) | API | Methods | Usage | Parameters | Description | |-----|:-------------:|-----|-----|:-----:|-----| | /storage | GET | ... | ... | ... | | /storage/${storage-type} | GET | ... | ... | ... | | /storage/${storage-type}/${arbitrary-uri} | GET | ... | ... | ... | | /storage/${storage-type}/${arbitrary-uri} | POST | ... | ... | ... | | /storage/${storage-type}/${arbitrary-uri}/${db-assigned-id} | GET | ... | ... | ... | | /storage/${storage-type}/${arbitrary-uri}/${db-assigned-id} | PUT | ... | ... | ... | ## Github Web Hook | API | Methods | Usage | Parameters | Description | |-----|:-------------:|-----|-----|:-----:|-----| | /gitWebHook | POST | ... | ... | ... | ## HTTP Response Codes
Code Status Description
200 OK Everything completed as expected, even if queries return zero results
301 REDIRECT Go here instead
400 BAD REQUEST User or developer did something wrong, the server expresses its disappointment in users
404 NOT FOUND Requested resource does not exist in databases or files, check address
401 UNAUTHORIZED User is not authenticated, must sign in to access requested resource
401 FORBIDDEN User is authenticated, but unauthorized to access requested resource (domain access may be limited)
500 SERVER ERROR Bad things happened, try again, email somebody, check logs

| API | Methods | Usage | Parameters | Description | |-----|:-------------:|-----|-----|:-----:|-----| | /storage/storage-type/query | GET | ... | ... | ... | | /datastores/datastore-id/database-id/mapreduce?specification={} | POST | ... | ... | ... | | /datastores/datastore-id/database-id/mapreduce/job-id | GET | ... | ... | ... | | /websockets | GET | ... | ... | ... | | /websockets/${topic-type}/ | GET | ... | ... | ... |