API

GET /script

List Scripts

Return a list of the available scripts

Query Parameters:
  • page (integer) – A page number within the paginated result set

  • page_size (integer) – Number of results to return per page

Status Codes:
  • 200 OK – (Ok) given script exists, parameters are returned

  • 404 Not Found – (Not found) given script does not exist

Response JSON Object:
  • count (integer) – Number of found scripts

  • next (string) – URI to the next page

  • previous (string) – URI to the previous page

  • results[].command (string) – Command to be executed

  • results[].groups[] (any) –

  • results[].is_array (boolean) – If is an array of jobs

  • results[].is_output_visible (boolean) – If the output files are visible

  • results[].job (string) – DRM job template assigned

  • results[].max_clock_time (string) – Timeout for its running time

  • results[].name (string) – Unique name of the script to submit

  • results[].param[] (any) –

GET /script/{name}

Get Script

Return parameters, type and validation for given script

Parameters:
  • name (string) – Unique name of the script

  • name – Unique name of the script

Status Codes:
  • 200 OK – (Ok) given script exists, parameters are returned

  • 404 Not Found – (Not found) given script does not exist

Response JSON Object:
  • command (string) – Command to be executed

  • groups[] (any) –

  • is_array (boolean) – If is an array of jobs

  • is_output_visible (boolean) – If the output files are visible

  • job (string) – DRM job template assigned

  • max_clock_time (string) – Timeout for its running time

  • name (string) – Unique name of the script to submit

  • param[] (any) –

POST /task

Create Task

Submit a new task to the DRM

Status Codes:
Response JSON Object:
  • creation_date (string) – Timestamp of the creation

  • deleted (boolean) – If the task is deleted

  • dependency_type (string) – Type of dependency

  • depends_on[] (string) –

  • drm_job_id (string) – Internal id of the job in the DRM

  • files_name (object) – Mapping of the provided files in the current task

  • param[] (any) –

  • sender_ip_addr (string) – IP address of the sender

  • status (string) – Current status of the task

  • task_name (string) – Name of the script used in this task

  • update_date (string) – Timestamp of the last update

  • uuid (string) – Unique ID of the current task

DELETE /task/{uuid}

Delete Task

Delete given task, if any

Parameters:
  • uuid (string) – Unique ID of the task

Status Codes:
Response JSON Object:
  • creation_date (string) – Timestamp of the creation

  • deleted (boolean) – If the task is deleted

  • dependency_type (string) – Type of dependency

  • depends_on[] (string) –

  • drm_job_id (string) – Internal id of the job in the DRM

  • files_name (object) – Mapping of the provided files in the current task

  • param[] (any) –

  • sender_ip_addr (string) – IP address of the sender

  • status (string) – Current status of the task

  • task_name (string) – Name of the script used in this task

  • update_date (string) – Timestamp of the last update

  • uuid (string) – Unique ID of the current task

GET /task/{uuid}

Get Task

Retrieve details of the given task

Parameters:
  • uuid (string) – Unique ID of the task

Status Codes:
Response JSON Object:
  • creation_date (string) – Timestamp of the creation

  • deleted (boolean) – If the task is deleted

  • dependency_type (string) – Type of dependency

  • depends_on[] (string) –

  • drm_job_id (string) – Internal id of the job in the DRM

  • files_name (object) – Mapping of the provided files in the current task

  • param[] (any) –

  • sender_ip_addr (string) – IP address of the sender

  • status (string) – Current status of the task

  • task_name (string) – Name of the script used in this task

  • update_date (string) – Timestamp of the last update

  • uuid (string) – Unique ID of the current task

GET /task/{uuid}/download

Download Task

Download current working dir as zip of the given task

Parameters:
  • uuid (string) – Unique ID of the task

Status Codes:
GET /task/{uuid}/file

List Task Files

Get the content of the working directory as a list of files

Parameters:
  • uuid (string) – Unique ID of the task

Status Codes:
Response JSON Object:
  • [] (string) –

GET /token/{username}

Get User Token

Exchanges external/OAuth2 access token with an internal one. It uses email for granting access to authenticated users. Therefore, requesting application is responsible for providing an access token with enough information (for now, email address is required).

Parameters:
  • username (string) – unique ID of the user trying to authenticate

Status Codes:
  • 200 OK – (Ok) you have been authenticated by external service

  • 403 Forbidden – (Forbidden) your request has been refused by external authentication service