1.6. API Endpoints - Workflows, Automation & Jobs

1.6.1. Workflows

Workflows are thoroughly covered under Custom Workflows, but here’s a quick overview of the essential fields required to POST a workflow using Swagger:

Concept

Description

Workflow

A workflow is a set of rules and steps designed to automatically process files based on their current state or condition. It functions like a recipe, guiding the system on which files to examine, what conditions to check, and which actions to perform.

Define a Workflow

A workflow is defined by specifying a few key elements: a Name, which is a unique identifier with no spaces (e.g., send_files); a Label, which is a user-friendly display name that can include spaces; visual Icons for UI representation; Filter Rules to determine which files should be acted upon; and Fields, which are inputs or parameters required when the workflow is executed. You can also optionally include discovery tasks that help locate files dynamically.

Filter Rules

Filter rules are conditions within a workflow that determine which files should be included for processing. These rules can match file states (such as new or modified) and file types (like files, directories, symlinks, or all). Filters can include or exclude files based on path patterns (for example, only processing .txt files). Special filter states include default, which catches unmatched files, and all, which applies the rule to all files regardless of state or type.

Actions

Actions are the specific tasks performed on files that match the filter rules. Each action has a task name, such as “migrate file” or “delete file”, and can optionally include parameters like the target site or processing queue. These define what happens to each selected file.

Runtime Fields

Runtime fields are additional pieces of information requested from the user when a workflow is executed. They allow the workflow to be dynamic and customizable at runtime instead of relying solely on hardcoded values. Examples include entering a target site, choosing from dropdowns, or checking boxes. Supported field types include free text, numbers, checkboxes, and dropdowns.

Running Workflows

Workflows can be executed in multiple ways. Users can select files or folders through a user interface and apply the desired workflow. Alternatively, workflows can be triggered through an API call by providing a JSON input that includes file paths, site, queue, workflow name, and any required fields. Additionally, discovery tasks can be used to automatically search for files inside selected folders, enabling recursive or change-based file detection.

Discovery Tasks

Discovery tasks are processes used to scan input paths and find files within them. For example, the recursive task identifies all files inside folders, while snapdiff detects files that have changed since the last scan, including created, updated, moved, or deleted files. These tasks help automate and refine the file selection process.

Includes & Excludes

Include and exclude filters help refine which files a workflow will consider. “Include” patterns limit processing to only those files that match certain criteria, such as *.txt files. “Exclude” patterns prevent files from being processed, like ignoring *.tmp files. These filters can be applied globally, per individual filter rule, or for a specific workflow run.

1.6.1.1. GET /workflows

Description

This endpoint retrieves a list of workflows configured in the system. It supports pagination through query parameters and returns detailed information about each workflow, including their names, labels, discovery methods, filter rules, fields, and operational status.

Request Parameters

Name

Type

Required

Description

page

integer

No

Page number of the result set. Defaults to 1 if not specified.

page_size

integer

No

Number of results to return per page. Must be between 20 and 100. Use 0 to return all results without pagination. Defaults to 20 if not specified or below the minimum.

Example Request

curl -X GET "http://your-hub-address:8000/api/workflows/?page=1" \
     -H "accept: application/json" \
     -H "Authorization: Api-Key <your-api-key>"

Successful Response

HTTP Status Code: 200 OK

Content-Type: application/json

Example Response

{
  "count": 16,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 1,
      "name": "migrate",
      "label": "Dehydrate",
      "icon_classes": [
        "hurricane-01"
      ],
      "discovery": "recursive",
      "enabled": true,
      "visible": true,
      "schedule_only": false,
      "external_only": false,
      "fields": [
        {
          "name": "lock_level",
          "type": "choices",
          "label": "Locking mode",
          "choices": [
            {
              "label": "Per block (Implicit)",
              "value": "implicit"
            }
          ],
          "default": "implicit"
        }
      ],
      "filter_rules": [
        {
          "type": "all",
          "state": "all",
          "action": [
            {
              "name": "dynamo.tasks.migrate",
              "lock_level": "*lock_level"
            }
          ],
          "description": "Migrates a file off from a given path"
        }
      ],
      "discovery_options": {
        "allow_missing_paths": false
      },
      "preferred_queue": null
    },
    {
      "id": 2,
      "name": "premigrate",
      "label": "Pre-Stage",
      "icon_classes": [
        "check-done-01"
      ],
      "discovery": "recursive",
      "enabled": true,
      "visible": true,
      "schedule_only": false,
      "external_only": false,
      "fields": [
        {
          "name": "lock_level",
          "type": "choices",
          "label": "Locking mode",
          "choices": [
            {
              "label": "Per block (Implicit)",
              "value": "implicit"
            }
          ],
          "default": "implicit"
        }
      ],
      "filter_rules": [
        {
          "type": "all",
          "state": "all",
          "action": [
            {
              "name": "dynamo.tasks.migrate",
              "lock_level": "*lock_level",
              "premigrate": true
            }
          ],
          "description": "Premigrates a file on a given site"
        }
      ///////// - more workflows
      ],
      "discovery_options": {
        "allow_missing_paths": false
      },
      "preferred_queue": null
    }
      "discovery_options": {
        "allow_missing_paths": false
      },
      "preferred_queue": null
  ]
    }

Response Fields

Field

Description

id

Unique workflow identifier (e.g., 1).

name

Short, unique workflow name (e.g., "migrate").

label

User-friendly name shown in the UI (e.g., "Dehydrate").

icon_classes

List of CSS icon classes for UI display (e.g., ["hurricane-01"]).

discovery

Discovery method used to find files (e.g., "recursive").

enabled

Boolean indicating if the workflow is active (true or false).

visible

Boolean indicating if the workflow is visible in the UI (true or false).

fields

List of input fields required when running the workflow (e.g., lock_level choice field).

filter_rules

Rules defining file types, states, and actions performed (e.g., migrate task on all files).

discovery_options

Additional settings for discovery (e.g., allow_missing_paths).

preferred_queue

Optional preferred queue name for running tasks (null if not set).

1.6.1.2. POST /workflows

Description

This API endpoint creates a new workflow in the system. It allows you to define a workflow by specifying various parameters such as the name, label, discovery type, schedule, and other custom fields related to the workflow. This is useful for automating tasks across sites.

Request Body Fields

Name

Description

Type

Required

Default Value

name

The internal name for the workflow.

string

Yes

N/A

label

The display label for the workflow.

string

Yes

N/A

icon_classes

List of FontAwesome icon classes associated with the workflow.

array

No

[]

discovery

The discovery method to be used for the workflow (e.g., "snapdiff").

string

Yes

N/A

enabled

Whether the workflow is enabled.

boolean

Yes

true

visible

Whether the workflow is visible in the system.

boolean

Yes

true

schedule_only

Whether the workflow can only be scheduled.

boolean

Yes

false

external_only

Whether the workflow is only applicable to external targets.

boolean

Yes

false

fields

A list of custom fields to include in the workflow (e.g., target site, etc.).

array

No

[]

filter_rules

Filter rules that define the actions for the workflow.

array

No

[]

discovery_options

Additional options for discovery (currently empty by default).

object

No

{}

preferred_queue

The preferred queue to which the workflow should be assigned.

string

No

N/A

Example Request

{
  "name": "transfer_files",
  "label": "Transfer files between sites",
  "icon_classes": [
    "fa fa-cloud",
    "fa fa-arrow-right"
  ],
  "discovery": "snapdiff",
  "enabled": true,
  "visible": true,
  "schedule_only": false,
  "external_only": false,
  "fields": [
    {
      "name": "target_site",
      "type": "enum[site]",
      "label": "Destination Site",
      "default": "london"
    }
  ],
  "filter_rules": [
    {
      "type": "all",
      "state": "all",
      "action": [
        {
          "name": "dynamo.tasks.migrate",
          "site": "*target_site"
        }
      ]
    }
  ],
  "discovery_options": {},
  "preferred_queue": "highpriority"
}

Successful Response

HTTP Status Code: 201 Created

Content-Type: application/json

Example Response

{
  "id": 19,
  "name": "transfer_files",
  "label": "Transfer files between sites",
  "icon_classes": [
    "fa fa-cloud",
    "fa fa-arrow-right"
  ],
  "discovery": "snapdiff",
  "enabled": true,
  "visible": true,
  "schedule_only": false,
  "external_only": false,
  "fields": [
    {
      "name": "target_site",
      "type": "enum[site]",
      "label": "Destination Site",
      "default": "london"
    }
  ],
  "filter_rules": [
    {
      "type": "all",
      "state": "all",
      "action": [
        {
          "name": "dynamo.tasks.migrate",
          "site": "*target_site"
        }
      ]
    }
  ],
  "discovery_options": {},
  "preferred_queue": "highpriority"
}

Response Fields

Please refer to the response fields under GET/workflows.

1.6.1.3. GET /workflows/{id}/

Description

This API endpoint retrieves detailed information about a specific workflow using its unique ID. It provides details such as the workflow’s name, label, fields, filter rules, and more. This is useful for viewing or reviewing the configurations of existing workflows.

Request Parameters

Name

Description

Type

Required

Default Value

id

The unique ID of the workflow to be viewed.

string

Yes

N/A

Example Request

curl -X 'GET' \
  'http://your-hub-address:8000/api/workflows/7/' \
  -H 'accept: application/json' \
  -H 'Authorization: Api-Key <your-api-key>'

Successful Response

HTTP Status Code: 200 OK

Content-Type: application/json

Example Response

{
  "id": 7,
  "name": "reverse_stub",
  "label": "Reverse Stub",
  "icon_classes": [],
  "discovery": null,
  "enabled": true,
  "visible": false,
  "schedule_only": false,
  "external_only": false,
  "fields": [
    {
      "name": "hydrate",
      "type": "bool",
      "label": "Hydrate files on site"
    },
    {
      "name": "overwrite",
      "type": "bool",
      "label": "Overwrite files on site"
    }
  ],
  "filter_rules": [
    {
      "type": "all",
      "state": "all",
      "action": [
        {
          "name": "dynamo.tasks.reverse_stub",
          "hydrate": "*hydrate",
          "overwrite": "*overwrite"
        }
      ]
    }
  ],
  "discovery_options": {},
  "preferred_queue": null
}

Response Fields

Please refer to the response fields under GET/workflows.

1.6.1.4. PATCH /workflows/{id}/

Description

This endpoint allows partial updates to an existing workflow by its ID. It is used to modify editable fields of the workflow such as label, visibility, discovery method, schedule settings, and other workflow-specific configuration details.

Request Parameters

Parameter

Location

Type

Required

Description

id

path

string

Yes

The unique ID of the workflow to update.

data

body

object

Yes

JSON object containing updatable fields.

Example Request

curl -X 'PATCH' \
  'http://your-hub-address:8000/api/workflows/1/' \
  -H 'accept: application/json' \
  -H 'Authorization: Api-Key <your-api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "label": "Dehydrate_updated",
  "icon_classes": [],
  "discovery": "recursive",
  "enabled": true,
  "visible": true,
  "schedule_only": false
}'

Request Body Fields

Only the following fields are allowed for updates:

Field

Type

Description

label

string

User-friendly label for the workflow.

icon_classes

array

List of CSS icon classes associated with the workflow.

discovery

string

Discovery mode (e.g., "recursive").

enabled

boolean

Whether the workflow is enabled.

visible

boolean

Controls if the workflow is visible in the UI.

schedule_only

boolean

Whether this workflow is only used for scheduling.

fields

array

List of field definitions (e.g., user inputs).

filter_rules

array

Rules that define workflow behavior and actions.

discovery_options

object

Options related to discovery behavior.

preferred_queue

string/null

Optional field to set the preferred task queue.

Successful Response

HTTP Status Code: 200 OK

Content-Type: application/json

Example Response

{
  "id": 1,
  "name": "migrate",
  "label": "Dehydrate_updated",
  "icon_classes": [],
  "discovery": "recursive",
  "enabled": true,
  "visible": true,
  "schedule_only": false,
  "fields": [
    {
      "name": "lock_level",
      "type": "choices",
      "label": "Locking mode",
      "choices": [
        {
          "label": "Per block (Implicit)",
          "value": "implicit"
        }
      ],
      "default": "implicit"
    }
  ],
  "filter_rules": [
    {
      "type": "all",
      "state": "all",
      "action": [
        {
          "name": "dynamo.tasks.migrate",
          "lock_level": "*lock_level"
        }
      ],
      "description": "Migrates a file off from a given path"
    }
  ],
  "discovery_options": {
    "allow_missing_paths": false
  },
  "preferred_queue": null
}

Response Fields

Please refer to the response fields under GET/workflows.

1.6.1.5. DELETE /workflows/{id}/

Description

This API endpoint deletes a workflow identified by its unique ID. The workflow will be permanently removed from the system, and the operation is irreversible. Use this endpoint to clean up workflows that are no longer needed.

Request Parameters

Name

Description

Type

Required

Default Value

id

The unique ID of the workflow to be deleted.

string

Yes

N/A

Successful Response

HTTP Status Code: 204 No Content

Content-Type: application/json

Response Body: No content is returned in the response body.

There are no fields returned in the body when the deletion is successful.

1.6.2. Automated Schedules

1.6.2.1. GET /api/automatedschedules/

Description

This API endpoint retrieves a list of automated schedules that are configured in the system. Each schedule defines when and where a specific policy or workflow job should automatically run.

Users can view schedules and policies under Automated Schedules.

Request Parameters

Name

Type

Required

Description

page

integer

No

Page number of the result set. Defaults to 1 if not specified.

page_size

integer

No

Number of results to return per page. Must be between 20 and 100. Use 0 to return all results without pagination. Defaults to 20 if not specified or below the minimum.

Example Request

curl -X GET \
  'http://your-hub-address:8000/api/automatedschedules/?page=1&page_size=1' \
  -H 'accept: application/json' \
  -H 'Authorization: Api-Key <your-api-key>'

Successful Response

HTTP Status Code: 200 OK

Content-Type: application/json

Example Response

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "name": "Test1",
      "schedule_type": "workflow",
      "enabled": true,
      "site_name": "siteB",
      "spaces": [
        {
          "id": 1,
          "name": "mmfs1"
        }
      ],
      "discovery_name": "Test1",
      "discovery_id": 1,
      "discovery_managed_paths": [
        "/mmfs1"
      ],
      "discovery_workflow": "Dehydrate",
      "minute": "0",
      "hour": "0",
      "day_of_week": "*",
      "day_of_month": "*",
      "month_of_year": "*"
    }
  ]
}

Response Fields

Top-Level Pagination Fields

Field

Type

Description

count

integer

Total number of schedules available.

next

string

URL for the next page of results, or null.

previous

string

URL for the previous page of results, or null.

results

array

List of schedule objects for the current page.

Inside results[ ]

Field

Description

name

Name of the schedule

schedule_type

Type of schedule (e.g., workflow)

enabled

Indicates if the schedule is active (true) or not (false)

site_name

Name of the site where the schedule is applied

spaces

List of space objects with id and name

discovery_name

Name of the discovery job associated with the schedule

discovery_id

ID of the associated discovery job

discovery_managed_paths

List of paths being managed by the discovery job

discovery_workflow

Name of the workflow triggered by the schedule

minute

Minute value in cron format

hour

Hour value in cron format

day_of_week

Day of the week in cron format (* means every day)

day_of_month

Day of the month in cron format (* means every day)

month_of_year

Month of the year in cron format (* means every month)

1.6.3. Tasks

Custom tasks in Ngenea Worker plugins allow users to define their own task logic to be used in custom workflows, alongside predefined tasks. These tasks must follow a specific structure, starting with accepting standard keyword arguments such as jobid, which identifies the job the task belongs to, and paths, which is a list of file or folder paths to be processed. Additional parameters can be included as needed, and tasks should also support arbitrary keyword arguments via **kwargs.

Tasks are required to return a structured payload containing at least the job ID, the list of resulting paths, and a status dictionary that includes metadata about the task execution, such as the task name, the original input paths, the number of input files, a summary of file statuses (e.g., processed, skipped, failed), detailed results for each file, and a timestamp of when the task started. To simplify this, developers can use helper classes like FileActionStatus to build the payload, or StreamTaskResults for streaming scenarios.

Read More ..

1.6.3.1. GET/ tasks/

Description

This endpoint retrieves information about tasks in the system. You can filter the results based on various parameters, such as task state, job ID, task type, or task ID. If no state is specified, the API returns tasks in all states by default. This endpoint is useful for monitoring and managing tasks based on their execution status, such as SUCCESS, FAILURE, STARTED and more.

Request Parameters

Name

Type

Description

page

integer

Page number within the paginated results. Defaults to the first page if not specified.

page_size

integer

Number of tasks per page (20–100). Use 0 to disable pagination and retrieve all results.

tasktype

string

Filter by task type. Max length: 50 characters.

task_id

string

Filter by specific task ID. Max length: 100 characters.

state

array[string]

Filter by one or more task states (SUCCESS, FAILURE, STARTED, etc.).

job_id

integer

Filter by the job ID associated with the task. Minimum value: 1.

internal

string

Set to “false” to exclude internal system tasks.

Example Request

curl -X 'GET' \
  'http://your-hub-address:8000/api/tasks/?state=SUCCESS&internal=false' \
  -H 'accept: application/json' \
  -H 'Authorization: Api-Key your-api-key'

This example fetches all tasks with the SUCCESS state and excludes internal system tasks.

Successful Response

HTTP Status Code: 200 OK

Content-Type: application/json

Example Response

{
  "count": 242,
  "next": "http://your-hub-address:8000/api/tasks/?internal=false&page=2&state=SUCCESS",
  "previous": null,
  "results": [
    {
      "url": "http://your-hub-address:8000/api/tasks/2164/",
      "id": 2164,
      "task_id": "f856aada-8d80-412d-af1d-38163937c2a7",
      "tasktype": "dynamo.tasks.recursive_navigate",
      "state": "SUCCESS",
      "job": 191,
      "site": "siteB",
      "started": "2025-08-21T00:00:01.702996Z"
    },
  ],
  "stats": {
    "state": {},
    "tasktype": {}
  }
}

Note: Only a single result is shown above for example purposes.

Response Fields

Field

Type

Description

count

integer

Total number of matching tasks.

next

string or null

URL to the next page of results, if any.

previous

string or null

URL to the previous page of results, if any.

results

array[object]

List of task objects. Each task includes:

Task Object Fields (inside results):

Field

Type

Description

→ url

string

API endpoint for the specific task.

→ id

integer

Internal task ID.

→ task_id

string

UUID of the task (Celery task ID).

→ tasktype

string

Type of the task (e.g., dynamo.tasks.recursive_navigate).

→ state

string

Current state of the task (SUCCESS, FAILURE, etc.).

→ job

integer

Associated job ID.

→ site

string

Site where the task ran.

→ started

datetime

When the task started (ISO 8601 format).

stats

object

Aggregated stats (empty in the example).

1.6.3.2. GET /tasks/{id}/

Description

This endpoint retrieves detailed information about a specific task by its unique ID. It returns task metadata such as the task type, state, start and completion timestamps, associated job, site, runtime, and a comprehensive result breakdown. This endpoint is useful for analyzing individual task execution, including its input/output paths, file and directory counts, and any errors or skipped operations.

Request Parameters

Name

Type

Location

Required

Description

id

string

path

Yes

The unique identifier of the node you want to retrieve.

Example Request

curl -X 'GET' \
  'http://your-hub-address:8000/api/tasks/2164/' \
  -H 'accept: application/json' \
  -H 'Authorization: Api-Key your-api-key'

Successful Response

HTTP Status Code: 200 OK

Content-Type: application/json

Example Response

{
  "url": "http://your-hub-address:8000/api/tasks/2164/",
  "id": 2164,
  "task_id": "f856aada-8d80-412d-af1d-38163937c2a7",
  "tasktype": "dynamo.tasks.recursive_navigate",
  "state": "SUCCESS",
  "started": "2025-08-21T00:00:01.702996Z",
  "completed": "2025-08-21T00:00:02.487565Z",
  "runtime": 0.784569,
  "job": 191,
  "site": "siteB",
  "paths": "http://your-hub-address:8000/api/tasks/2164/files/",
  "result": {
    "log": [],
    "skip": false,
    "jobid": 191,
    "paths": ["examples will be shown"],
    "queue": "siteB",
    "status": {
      "task": "dynamo.tasks.recursive_navigate",
      "details": {
        "dirs": [ "examples will be shown" ],
        "files": [ "examples will be shown" ],
        "aborted": [],
        "failures": [],
        "symlinks": [],
        "empty_dirs": [ "examples will be shown" ]
      },
      "started": "2025-08-21T00:00:01.231687+00:00",
      "summary": {
        "dirs": 84,
        "files": 26,
        "aborted": 0,
        "failures": 0,
        "symlinks": 0,
        "empty_dirs": 260
      },
      "input_paths": [ "examples will be shown" ],
      "input_total": 12,
      "has_dynamic_children": true
    }
  },
  "friendly_name": null
}

Response Fields

Field

Type

Description

url

string

API URL for the task object.

id

integer

Internal task ID.

task_id

string

UUID representing the Celery task.

tasktype

string

Type of task executed.

state

string

Status of the task (e.g., SUCCESS, FAILURE, etc.).

started

string

ISO timestamp for when the task started.

completed

string

ISO timestamp for when the task completed.

runtime

float

Execution duration in seconds.

job

integer

Associated job ID.

site

string

Site or environment where the task was executed.

paths

string

Link to fetch associated file paths.

result

object

Detailed output of the task including logs, paths, summary statistics, and directory/file breakdowns.

friendly_name

string or null

Optional user-defined name for the task.

1.6.3.3. GET /tasks/{id}/files/

Description

Retrieves the list of files and directories associated with a specific task. Supports optional query parameters to filter results by status, type, and site. If no filters are provided, all available entries are returned (subject to pagination).

Request Parameters

Name

Type

Location

Required

Description

id

string

path

Yes

The unique identifier of the node you want to retrieve.

Query Parameters

Name

Type

Required

Description

page

integer

No

Page number for pagination (default: 1).

page_size

integer

No

Number of results per page. Range: 20–1000. Use 0 to disable pagination and return all.

state

string

No

Filter entries by their processing state (e.g., processed, skipped).

type

string

No

Filter by file type (if applicable).

site

string

No

Filter by site (if multiple sites are in use).

Example Request

curl -X 'GET' \
  'http://your-hub-address:8000/api/tasks/2164/files/' \
  -H 'accept: application/json' \
  -H 'Authorization: Api-Key your-api-key'

Successful Response

HTTP Status Code: 200 OK

Content-Type: application/json

Example Response

{
  "count": 3,
  "next": null,
  "previous": null,
  "results": [
    {
      "path": "/mmfs1/data/Project1/goodbye",
      "state": "processed",
      "type": null,
      "size": null
    },
    {
      "path": "/mmfs1/data/Project1/foo",
      "state": "processed",
      "type": null,
      "size": null
    },
    {
      "path": "/mmfs1/data/Project1",
      "state": "skipped",
      "type": null,
      "size": null
    }
  ]
}

Response Fields

Field

Type

Description

count

integer

Total number of matching entries.

next

string or null

URL to next page (if paginated).

previous

string or null

URL to previous page (if paginated).

results

array

List of file/directory entries.

Each item in results contains:

Field

Type

Description

path

string

Absolute path of the file or directory.

state

string

Processing status (e.g., processed, skipped).

type

string or null

Type of the entry (e.g., file, directory).

size

integer or null

Size in bytes (if applicable).

1.6.4. Queues

Ngenea hub uses job queues to organize and manage task execution efficiently. Each queue acts as a processing line where jobs wait for available worker threads to run them.

Why Use Custom Queues ?

  • Prioritize important tasks (e.g., high-priority jobs).

  • Isolate specific types of jobs (e.g., Transparent Recall).

  • Control how many jobs run simultaneously using threads.

Key Features

  • Default Queue: Always available. Runs all task types, including interactive and settings.

  • Custom Queues: User-defined. Only support worker, discovery, and custom functions.

  • Per-Function Thread Limits: Fine-tune how many threads each function uses in a queue.

  • Disable Functions: Prevent specific task types from running in a queue.

  • Automatic Discovery: Queues are automatically started/stopped based on config changes.

Configuration File: Queues are defined in /etc/ngenea/ngenea-worker.conf.

Memory Notes: Each thread uses ~40MB of RAM idle, and up to 125MB depending on functions configured. More threads = more memory use.

Removing Queues: Removing a queue from config stops it. It must be manually de-registered using: ngeneahubctl manage remove_queue <site> <queue>. To re-use a name, restart the worker and use ngeneahubctl manage remove_queue <site> <queue> --offline-only.

Read More..

1.6.4.1. GET /queues/

Description

Retrieves a list of active job queues in the system, grouped by site. Each queue includes details such as the site it belongs to, nodes handling the queue, its name, and the timestamp of its last heartbeat (i.e., when it was last active).

This is useful for monitoring which queues are currently running across different sites in your cluster.

Request Parameters

Name

Type

Required

Description

page

integer

No

Page number of the result set. Defaults to 1 if not specified.

page_size

integer

No

Number of results to return per page. Must be between 20 and 100. Use 0 to return all results without pagination. Defaults to 20 if not specified or below the minimum.

Example Request

curl -X 'GET' \
  'http://your-hub-address:8000/api/queues/' \
  -H 'accept: application/json' \
  -H 'Authorization: Api-Key your-api-key'

Successful Response

HTTP Status Code: 200 OK

Content-Type: application/json

Example Response

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 1,
      "site": {
        "id": 1,
        "name": "siteA",
        "label": "siteA"
      },
      "nodes": [
        {
          "id": 1,
          "name": "siteA-1"
        }
      ],
      "name": "default",
      "label": "default",
      "last_heartbeat": "2025-09-02T14:23:27.048619Z"
    },
    {
      "id": 2,
      "site": {
        "id": 2,
        "name": "siteB",
        "label": "siteB"
      },
      "nodes": [
        {
          "id": 2,
          "name": "sitetest"
        },
        {
          "id": 3,
          "name": "siteB-1"
        }
      ],
      "name": "default",
      "label": "default",
      "last_heartbeat": "2025-09-02T14:23:28.171405Z"
    }
  ]
}

Response Fields

Field

Type

Description

count

integer

Total number of queues.

next

string | null

URL to the next page of results, if paginated.

previous

string | null

URL to the previous page of results, if paginated.

results

array

List of queue objects.

Inside results array:

Field

Type

Description

results[].id

integer

ID of the queue.

results[].site

object

Site where the queue is running.

Inside results[].site:

Field

Type

Description

site.id

integer

ID of the site.

site.name

string

Name of the site.

site.label

string

Display label of site.

results[].nodes

array

Nodes running this queue.

Inside results[].nodes:

Field

Type

Description

nodes[].id

integer

ID of the node.

nodes[].name

string

Name of the node.

results[].name

string

Name of the queue (e.g., default).

results[].label

string

Display label of the queue.

last_heartbeat

string (ISO 8601)

Timestamp of the last queue activity (heartbeat) in UTC.

1.6.4.2. GET /queues/{id}/

Description

Fetch detailed information about a specific job queue using its unique ID. This includes: the site it belongs to, the nodes it’s running on, queue name and label, the last time it sent a heartbeat (used to check if the queue is alive).

Useful for queue monitoring, debugging, or administrative checks on a particular queue.

Request Parameters

Name

Type

Location

Required

Description

id

string

path

Yes

The unique identifier of the node you want to retrieve.

Example Request

curl -X 'GET' \
  'http://your-hub-address:8000/api/queues/2/' \
  -H 'accept: application/json' \
  -H 'Authorization: Api-Key <your-api-key>'

Successful Response

HTTP Status Code: 200 OK

Content-Type: application/json

Example Response

{
  "id": 2,
  "site": {
    "id": 2,
    "name": "siteB",
    "label": "siteB"
  },
  "nodes": [
    {
      "id": 2,
      "name": "sitetest"
    },
    {
      "id": 3,
      "name": "siteB-1"
    }
  ],
  "name": "default",
  "label": "default",
  "last_heartbeat": "2025-09-02T14:39:37.163821Z"
}

Response Fields

Field

Type

Description

id

integer

Unique identifier of the queue.

site

object

Details of the site this queue belongs to.

Inside site object:

Field

Type

Description

site.id

integer

Unique ID of the site.

site.name

string

Internal name of the site.

site.label

string

Human-readable label of the site.

nodes

array

List of nodes where this queue is active.

Inside nodes[] array:

Field

Type

Description

nodes[ ].id

integer

ID of the node.

nodes[ ].name

string

Name of the node.

name

string

Internal name of the queue (e.g., default).

label

string

Human-readable label of the queue.

last_heartbeat

string (ISO 8601)

Last time this queue was active (UTC time).