RUAL Documentation

Queue APIs

Below is a comprehensive list of queue-related APIs that serve various purposes such as help manage background tasks, track their status, set priorities, and view execution logs.

Retrieves a specific queue item by its GUID from the storage system and returns it in the response.

Key Type Example
:guid string "7a1c3e4d5f2b8c9a6e0d7f3b5a4c8e2d9b1f7c3a0e5d4b6f8c2a9d7b3e5f0c1a"
{ "from": "scheduled-8f2a7c13b9d4e65f0a3c1e5d78b4a92d3c5e60f7a8b9c2d3e4f5a6b7c8d9012f", "state": "pending", "service": "blueprint-trigger", "request": "triggerScheduledEventFromQueue", "raw_payload": "{\"blueprint_guid\":\"5c1d4e2a9b8f7c3d6e0a5f2b8d9c7e4a3b6d8f5c7a1e2f4b0d3c6e8a9b7f2d5c\",\"guid\":\"1e4d7c2a5b9f3c8d6e0a2f5b7c9d3e4a8f6d5b1c7a0e2f3b6d8c5a9b4f7e2d1c\"}", "metadata": { "queue_title": "REPEATING EVENT - Auto-generated task" }, "claimed": false, "run_on": 1740914223, "unique_id": "3f9b2d4a7c6e5f8a1d3c0b7e9f2a5d6c8b4e7a9f0d2c3b6e1a8f5d4c7b2e9f0a", "running": false, "running_since": -1, "created_by_host": "server-node-045", "_meta": { "guid": "7a1c3e4d5f2b8c9a6e0d7f3b5a4c8e2d9b1f7c3a0e5d4b6f8c2a9d7b3e5f0c1a", "expiry": 1741087023, "entity": 87, "removed": 0, "created": 1740910623, "updated": 1740910623, "ums": 1740910623036, "cms": 1740910623036, "update_hash": "a5b2d4f8c9e1a3d7c6b0f2e4a9d5c8b7f3a0e1d4c6b2f8a9d7e5c3f0b2a4d1e7" } }
{ "succes": false, "error": "ERROR_KEY" }
Error Code Description
ERROR_KEY an error occured while retrieving queue data.
DOCUMENT_NOT_FOUND given guid does not match with a stored document/queue

Retrieves information about active queue nodes, including their status, resource allocation, and last activity timestamps.

{ "host": "server-xyz-01", "process": 12345, "cpus": 8, "env": "production", "workers": 10, "web_workers": 5, "backend_workers": 5, "last_queue_fetch": 1740912345, "last_update": 1740915678, "alive_since": 1740481234, "hash": "no-hash", "state": "up" }
{ "succes": false, "error": "ERROR_KEY" }

this request retrieves details of executed blueprint triggers from the queue, including execution state, request metadata, and processing information.

{ "from": "bp-unsaved", "state": "executed", "service": "automation", "request": "executeTask", "raw_payload": "{\"entity\":99,\"task_id\":\"abc123xyz456def789ghi012jkl345mno678pqr901stu234vwx567yz890\"}", "metadata": null, "claimed": true, "run_on": 1750000000, "unique_id": "zz11yy22xx33ww44vv55uu66tt77ss88rr99qq00pp11oo22nn33mm44ll55kk66", "running": false, "running_since": -1, "created_by_host": "host-123.region.internal", "hostname": "worker-456.region.internal", "running_time": 42, "_meta": { "guid": "aa11bb22cc33dd44ee55ff66gg77hh88ii99jj00kk11ll22mm33nn44oo55pp66", "expiry": -1, "entity": 99, "removed": 0, "created": 1750000000, "updated": 1750000042, "ums": 1750000042010, "cms": 1750000000123, "update_hash": "123abc456def789ghi012jkl345mno678pqr901stu234vwx567yz890" } }
{ "succes": false, "error": "ERROR_KEY" }
Error Code Description
ERROR_KEY an error occured while searching queue

this sends details of executed blueprint triggers from the queue, including execution state, request metadata, and processing information.

{ "from": "bp-unsaved", "state": "executed", "service": "automation", "request": "executeTask", "raw_payload": "{\"entity\":99,\"task_id\":\"abc123xyz456def789ghi012jkl345mno678pqr901stu234vwx567yz890\"}", "metadata": null, "claimed": true, "run_on": 1750000000, "unique_id": "zz11yy22xx33ww44vv55uu66tt77ss88rr99qq00pp11oo22nn33mm44ll55kk66", "running": false, "running_since": -1, "created_by_host": "host-123.region.internal", "hostname": "worker-456.region.internal", "running_time": 42, "_meta": { "guid": "aa11bb22cc33dd44ee55ff66gg77hh88ii99jj00kk11ll22mm33nn44oo55pp66", "expiry": -1, "entity": 99, "removed": 0, "created": 1750000000, "updated": 1750000042, "ums": 1750000042010, "cms": 1750000000123, "update_hash": "123abc456def789ghi012jkl345mno678pqr901stu234vwx567yz890" } }
{ "succes": false, "error": "ERROR_KEY" }
Error Code Description
ERROR_KEY an error occured while searching queue