Jump to content

TuCloudAPI getpbxs: Difference between revisions

From Wiki 7Kas
getpbxs: account-scoped selector (all roles)
TuCloudAPI reference regenerated from func=help: tenancy rule, pbx notes on every PBX-scoped function, error codes
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
''TuCloudAPI function to manage tucloud (PBX) services. Available to: '''SuperRoot, Operator, Client'''.''
''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>.}}


== Description ==
== 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.
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 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 ==
== Call ==
GET https://tucloudapi.7kas.com:9087/tucloud?func=getpbxs&ukey=YOUR_KEY
  https://tucloudapi.7kas.com:9087/tucloud?func=getpbxs&ukey=YOUR_KEY
Requires the <code>ukey</code> parameter. Always HTTP 200; response is a JSON envelope.
GET, or POST with the parameters form-urlencoded in the body. Requires the <code>ukey</code> parameter.


== Parameters ==
== Parameters ==
Line 18: Line 16:
== Response ==
== Response ==
{ok, pbxs:[{_id,pbx,label,domain}]}. Send pbx=<pbx> on subsequent calls.
{ok, pbxs:[{_id,pbx,label,domain}]}. Send pbx=<pbx> on subsequent calls.
== Errors ==
Always HTTP 200. On failure the body is <code>{"ok":false,"code":"...","message":"..."}</code>. Codes: <code>missing_pbx</code>, <code>unknown_pbx</code>, <code>forbidden</code>, <code>invalid_param</code>, <code>not_found</code>, <code>db_error</code>, <code>server_busy</code>.


----
----
Back to [[TuCloudAPI]]
Back to [[TuCloudAPI]]
[[Category:TuCloudAPI SuperRoot]][[Category:TuCloudAPI Operator]][[Category:TuCloudAPI Client]][[Category:TuCloudAPI]]
[[Category:TuCloudAPI SuperRoot]][[Category:TuCloudAPI Operator]][[Category:TuCloudAPI Client]][[Category:TuCloudAPI]]

Latest revision as of 21:16, 8 October 2026

TuCloudAPI function to manage FuturePBX (the cloud PBX). Available to: SuperRoot, Operator, Client.

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 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

https://tucloudapi.7kas.com:9087/tucloud?func=getpbxs&ukey=YOUR_KEY

GET, or POST with the parameters form-urlencoded in the body. Requires the ukey parameter.

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.


Back to TuCloudAPI