-
Notifications
You must be signed in to change notification settings - Fork 13
Rodan Server API Overview
Ling-Xiao Yang edited this page Mar 24, 2016
·
9 revisions
Rodan provides a set of RESTful API built upon Django REST framework. Most endpoints accept JSON as HTTP request body, and return JSON as HTTP response body. In debug mode (DEBUG=True
in settings), a browsable API is available. The browsable API, powered by Django REST framework, loads the response JSON into the HTML page, wraps HTTP requests (GET, POST, etc.) using forms and buttons, and provides detailed documentation for each view, for example:
The endpoints are defined in urls.py
, and are categorized into:
- API root
- Authentication
- List API
- Detail API
- Task queue API
- Interactive RunJob API
- Admin
- Websocket API
- Errors are returned to the user in the form of HTTP Status Codes. DO NOT return an error message with a non-error code. (i.e., do not return an error with a status code of HTTP 200 OK.)
- For non-validation errors, the error message will be put in a JSON object formatted as
{"detail": error_message}
. (The status code is 4XX.) Validation errors are returned as a JSON object containing all erroneous fields (see here). - Content type and return type are negotiated via HTTP Headers (
Accept: application/json
) or query parameters (appending?format=json
to the URL).
- Repository Structure
- Working on Rodan
- Testing Production Locally
- Working on Interactive Classifier
- Job Queues
- Testing New Docker Images
- Set up Environment Variables
- Set up SSL with Certbot
- Set up SSH with GitHub
- Deploying on Staging
- Deploying on Production
- Import Previous Data