Tool Methods

HTTP Endpoints

POST /tools

Creates a new tool (NOTE ARGS ARE NOT IMPLEMENTED YET)

Request Headers:
  • Authorization – API key or Bearer token for user authentication

Request Syntax:

{
   "name": "string",
   "description": "string",
   "requiresFilesystem": "true" | "false",
   "args": [
     {
       "name": "string",
       "config": {
         "type": "string",
         "required": "true" | "false",
         "description": "string",
         "default": value
       }
     } 
   ]
}

** Argument Types **

Type

Renders As

string

text box

int

text box

float

text box

bool

check box

file

file dialog

json

multi-line text box

Raises:

May raise exceptions related to database operations or service availability.

GET /tools

Lists available tools for the user

Request Headers:
  • Authorization – API key or Bearer token for user authentication

Response Syntax: NOTE: the JSON below is actually returned as a 2D list not a list of maps

[
  {
    "name": "string",
    "toolId": "string",
    "isOwned": "true" | "false"
  }
]
Raises:

May raise exceptions related to database operations or service availability.

DELETE /tools/(tool_id)
GET /tools/(tool_id)

Describes the tool

Request Headers:
  • Authorization – API key or Bearer token for user authentication

Status Codes:

Request Syntax:

{
  "ready": "true" | "false",
  "buildStatus": "string",
  "requiresFilesystem": "true" | "false",
  "args": [
    {
      "name": "string",
      "config": {
          "type": "string",
          "required": "true" | "false",
          "description": "string",
          "default": value
      }
    }
  ]
}

** NOTE ** Arguments are not yet implemented

POST /tools/(tool_id)

Submits a job or batch of jobs to the tool execution service

Request Headers:
  • Authorization – API key or Bearer token for user authentication

Status Codes:

Request Syntax:

{
   "fixed_args": {
     "name": {
       "value": <ANY>,
       "type" "string"
     }
   },
   "variable_args: [
     {
       "name": {
         "value": <ANY>,
         "type" "string"
       }
     }
   ],
   "hardware": {
     "filesystems": [
       {
         "id": "string",
         "name": "string"
       }
     ],
     "memory": 123,
     "cpu": 123
   }
}

Response Syntax:

[
  {
    "job_id": "string"
  }
]
Raises:

May raise exceptions related to database operations or service availability.

PUT /tools/(tool_id)

Updates the tool code

Request Headers:
  • Authorization – API key or Bearer token for user authentication

Status Codes:

Request Syntax:

{
  "num_parts": 123,
  "complete": "true" | "false",
  "parts": [
     *from presigned urls*
  ],
  "UploadId": "string"
}

Response Syntax:

{
  "UploadId": "string"
  "urls": [
    "string"
  ]
}
Raises:

May raise exceptions related to database operations or service availability.

PATCH /tools/(tool_id)

Updates the tool arguments (NOT YET IMPLEMENTED)

Request Headers:
  • Authorization – API key or Bearer token for user authentication

Status Codes:

Request Syntax:

[
  {
    "name": "string",
    "config": {
      "type": "string",
      "required": "true" | "false",
      "description": "string",
      "default": value
    }
  } 
]
Raises:

May raise exceptions related to database operations or service availability.

POST /tools/(tool_id)/share