Batches API

Batch Methods

Batches are groups of compute jobs that share a common hardware configuration and run in parallel.

GET /batches

List all the available batches for the user

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

Status Codes:

Response Syntax:

A list of Batch objects.

[
  {
    "batch_id": "string",
    "batch_tool": {
      "tool_id": "string",
      "tool_name": "string",
      "tool_description": "string"
    },
    "n_jobs": 123,
    "hardware": {
      "filesystem_list": [
        {
          "filesystem_id": "string",
          "filesystem_name": "string"
        }
      ],
      "cpu": 123,
      "memory": 123
    }
  }
]
Raises:

May raise exceptions related to database operations or service availability.

DELETE /batches

Deletes all the available batches and jobs for the user

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

Status Codes:
Raises:

May raise exceptions related to database operations or service availability.

GET /batches/<batch_id>

Returns attributes for batch

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

Status Codes:

Response Syntax:

A BatchStatus object.

{
  "submitted": 123,
  "pending": 123,
  "runnable": 123,
  "starting": 123,
  "running": 123,
  "succeeded": 123,
  "failed": 123
}
Raises:

May raise exceptions related to database operations or service availability.

GET /batches/<batch_id>

Deletes the specified batch.

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

Status Codes:
Raises:

May raise exceptions related to database operations or service availability.

Job Methods

Jobs are individual compute tasks. They are child resources of batches.

GET /batches/<batch_id>/jobs

List all the available jobs in the batch.

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

Status Codes:

Response Syntax:

A list of Job objects.

[
  {
    "job_id": "string",
    "job_tool": {
      "tool_id": "string",
      "tool_name": "string",
      "tool_description": "string"
    },
    "job_log_id": "string",
    "job_argument_list": [
      {
        "argument_key": "string",
        "argument_value": "string"
      }
    ]
  }
]
Raises:

May raise exceptions related to database operations or service availability.

GET /batches/<batch_id>/jobs/<job_id>

Returns attributes for the specific job

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

Status Codes:

Response Syntax:

[
  {
    "job_id": "string",
    "log_id": "string",
    "hardware": {
      "filesystems": [
        "id"
      ],
      "memory": 123,
      "cpu": 123
    },
    "args": {
      "name": "value"
    },
    "status": "string",
    "reason": "string",
    "create_time": "string",
    "start_time": "string",
    "stop_time": "string",
  }
]
Raises:

May raise exceptions related to database operations or service availability.