TuCloudAPI getpbxs: Difference between revisions
getpbxs: account-scoped selector (all roles) |
TuCloudAPI reference: product name -> FuturePBX (API surface unchanged); regenerated from func=help |
||
| Line 1: | Line 1: | ||
''TuCloudAPI function to manage | ''TuCloudAPI function to manage FuturePBX (the cloud PBX). Available to: '''SuperRoot, Operator, Client'''.'' | ||
{{Note|Requires the <code>pbx</code> parameter (the PBX '''name''', e.g. <code>tucall</code>). The server verifies your <code>ukey</code> owns that PBX; otherwise it returns <code>{"ok":false,"code":"forbidden"}</code>.}} | {{Note|Requires the <code>pbx</code> parameter (the PBX '''name''', e.g. <code>tucall</code>). The server verifies your <code>ukey</code> owns that PBX; otherwise it returns <code>{"ok":false,"code":"forbidden"}</code>.}} | ||
Revision as of 14:14, 3 August 2026
TuCloudAPI function to manage FuturePBX (the cloud PBX). Available to: SuperRoot, Operator, Client.
pbx parameter (the PBX name, e.g. tucall). The server verifies your ukey owns that PBX; otherwise it returns {"ok":false,"code":"forbidden"}.Description
List the PBXs assigned to the calling ukey's account (post-login selector; show only if >1). Takes ukey ONLY (no pbx). For EVERY role — SuperRoot, operator and client — it returns only the tucloud PBXs whose accountcode is associated with the ukey (never every tenant under a root). Use the returned "pbx" value as the pbx= param on other calls.
Call
GET https://tucloudapi.7kas.com:9087/tucloud?func=getpbxs&ukey=YOUR_KEY
Requires the ukey parameter. Always HTTP 200; response is a JSON envelope.
Parameters
None beyond ukey and func=getpbxs.
Example
https://tucloudapi.7kas.com:9087/tucloud?func=getpbxs&ukey=KEY
Response
{ok, pbxs:[{_id,pbx,label,domain}]}. Send pbx=<pbx> on subsequent calls.
Errors
Always HTTP 200. On failure the body is {"ok":false,"code":"...","message":"..."}. Codes: missing_pbx, unknown_pbx, forbidden, invalid_param, not_found, db_error, server_busy.
Back to TuCloudAPI