Jump to content

TuCloudAPI updatepbxconfig: Difference between revisions

From Wiki 7Kas
TuCloudAPI reference: pbx param help -> FuturePBX (API surface unchanged)
TuCloudAPI reference (generated from func=help)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
''TuCloudAPI function to manage FuturePBX (the cloud PBX). Available to: '''SuperRoot, Operator, Client'''.''
''TuCloudAPI function to manage FuturePBX (the cloud PBX). Available to: '''SuperRoot, Operator, Client'''.''
{{Note|1=Requires the <code>pbx</code> parameter (the PBX '''name''', e.g. <code>tucall</code>). The server verifies that your <code>ukey</code>'s own account owns that PBX, whatever its role; otherwise, and also for a PBX that does not exist, it returns <code>{"ok":false,"code":"forbidden"}</code>.}}


== Description ==
== Description ==
Update this PBX's settings (strict set). password is the PBX super-user Clave: PLAINTEXT (never md5), min 8 / max 32, charset [a-zA-Z0-9 . ! $ * # - _]; blank/omitted = keep the existing one. nota max 256. admin_ext_id = a tucloud_pbx_ext id in THIS pbx (0/blank = none; bad_ext if not in-tenant). Identity/provisioning fields are read-only and cannot be set here. Requires a non-readonly ukey.
Update this PBX's settings (strict set). password is the PBX super-user Clave: PLAINTEXT (never md5), min 8 / max 32, charset [a-zA-Z0-9 . ! $ * # - _]; blank/omitted = keep the existing one. nota max 256. admin_ext_id = a tucloud_pbx_ext id in THIS pbx (0/blank = none; bad_ext if not in-tenant). Identity/provisioning fields are read-only and cannot be set here; an email param with a DIFFERENT value is REFUSED (field email, reason not_allowed): the master email changes only through requestpbxemail; the current value ("" on a PBX without one) changes nothing and is ignored. Requires a non-readonly ukey.


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


== Parameters ==
== Parameters ==
Line 25: Line 27:
== Response ==
== Response ==
{ok, config:{...}} or {ok:false,code:invalid_param|bad_ext|forbidden}.
{ok, config:{...}} or {ok:false,code:invalid_param|bad_ext|forbidden}.
== Errors ==
Always HTTP 200. On failure the body is <code>{"ok":false,"code":"...","message":"..."}</code>. Common codes: <code>missing_pbx</code>, <code>forbidden</code>, <code>invalid_param</code>, <code>not_found</code>, <code>conflict</code>, <code>in_use</code>, <code>db_error</code>, <code>server_busy</code>; the Response section above lists any specific to this function.


----
----
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 19:20, 3 November 2026

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

ℹ Requires the 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

Update this PBX's settings (strict set). password is the PBX super-user Clave: PLAINTEXT (never md5), min 8 / max 32, charset [a-zA-Z0-9 . ! $ * # - _]; blank/omitted = keep the existing one. nota max 256. admin_ext_id = a tucloud_pbx_ext id in THIS pbx (0/blank = none; bad_ext if not in-tenant). Identity/provisioning fields are read-only and cannot be set here; an email param with a DIFFERENT value is REFUSED (field email, reason not_allowed): the master email changes only through requestpbxemail; the current value ("" on a PBX without one) changes nothing and is ignored. Requires a non-readonly ukey.

Call

https://tucloudapi.7kas.com:9087/tucloud?func=updatepbxconfig&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.
password string No — New super-user Clave (blank = keep). Plaintext, 8-32, [a-zA-Z0-9.!$*#-_].
nota string No — Free note (max 256).
admin_ext_id integer No 0 Designated admin extension id (0 = none; must be in this PBX).

Example

https://tucloudapi.7kas.com:9087/tucloud?func=updatepbxconfig&ukey=KEY&pbx=tucall&nota=Centralita&admin_ext_id=1234

Response

{ok, config:{...}} or {ok:false,code:invalid_param|bad_ext|forbidden}.

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