First pass review of the REST API implemented by the nds-django project. Work in progress and subject to updating.
Activities | Parameters | HTTP verb mapping | Return elements |
---|---|---|---|
Create a docker job. | "script" : String - The actual script to execute OR "file" : String - Name of file to attach that contains the script to execute "scriptname" : String - If "script" is defined, the name to assign to that script. "image_name" : String "image_tag" : String "data" : String | POST /upload | The ID of the docker job that was created
|
Get the staus of a docker job | "job_id" : String | GET /upload | container id - The identifier for the docker container worker - The name of the worker that is handling the job create task state - The current state of the job, can be UNKNOWN, RUNNING, FAILED, or COMPLETED |
Get the logs for a docker job | "cont_id" : String | GET /stdout | stdout - The logs associated with container that is running the job that was specified |
List the data stored in iRODS | GET /list_data | List of items, with each element containing "name" and "url" information | |
List the docker images that are available | GET /list_images | Currently returns a hardcoded list of docker images that can be used for jobs | |
List the docker containers | GET /list_container | List of docker containers that are currently available | |
Stop a specific container | "cont_id" : String - The id of the container to stop | GET /stop | "state" - Either UNKNOWN, success, or failed "error" or "msg" - Text describing the current state that was returned |
Obtain information about a container | "cont_id" : String - The id of the container to query (optional??) | GET /info | Information about the specified container, if "cont_id" was provided. Otherwise, a list of containers and the information about their last usage? |
Get the diff of the container running a specific job | "cont_id" : String | GET /diff | A list of the changed files and directories within the container's filesystem |
Retrieve all information for a job's container | "cont_id" : String | GET /metric | Data regarding the specified container |
Download the results from a job |