TuCloudAPI getqueueevents
TuCloudAPI function to manage FuturePBX (the cloud PBX). Available to: SuperRoot, Operator, Client.
pbx parameter (the PBX name, e.g. tucall). The server verifies that your ukey's own account owns that PBX, whatever its role; otherwise, and also for a PBX that does not exist, it returns {"ok":false,"code":"forbidden"}.Description
Today's events of ONE queue (local day), newest first, at most 200, with the same deduplication as getqueuestats (core events; module EXITQUEUE FULL/JOINEMPTY kept as refused). The live page shows them under its feed and appends the live QEVENTs. ENTERQUEUE carries no data2 (the caller number is never exposed). since = Unix epoch seconds: only rows after it (the portal's last ts); 0 or absent = from local midnight. READ-ONLY.
Call
https://tucloudapi.7kas.com:9087/tucloud?func=getqueueevents&ukey=YOUR_KEY&pbx=PBX_NAME
GET, or POST with the parameters form-urlencoded in the body. Requires the ukey parameter. Always HTTP 200; the response is a JSON envelope.
Parameters
| Parameter | Type | Required | Default | Meaning |
|---|---|---|---|---|
pbx |
string | Yes | — | FuturePBX NAME (e.g. tucall). The (ukey, pbx) pair is the tenant boundary; the server verifies the ukey owns this PBX and scopes the report to it. |
queue_id |
integer | Yes | — | The queue (_id of getqueues). not_found if not this PBX's. |
since |
integer | No | 0 |
Unix epoch seconds; only events after it. 0 = the whole local day. |
Example
https://tucloudapi.7kas.com:9087/tucloud?func=getqueueevents&ukey=KEY&pbx=tucall&queue_id=59
Response
{ok, queue_id, day:"YYYY-MM-DD", rows:[{time:"YYYY-MM-DD HH:MM:SS", ts, event, callid, agent, data1, data2, data3, data4, data5}]} (newest first, at most 200).
Errors
Always HTTP 200. On failure the body is {"ok":false,"code":"...","message":"..."}. Common codes: missing_pbx, forbidden, invalid_param, not_found, conflict, in_use, db_error, server_busy; the Response section above lists any specific to this function.
Back to TuCloudAPI