Jump to content

TuCloudAPI updatetask: Difference between revisions

From Wiki 7Kas
TuCloudAPI reference: product name -> FuturePBX (API surface unchanged); regenerated from func=help
TuCloudAPI reference regenerated from func=help: tenancy rule, pbx notes on every PBX-scoped function, error codes
 
(One intermediate revision 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|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|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 ==
Line 7: Line 7:


== Call ==
== Call ==
GET https://tucloudapi.7kas.com:9087/tucloud?func=updatetask&ukey=YOUR_KEY&pbx=PBX_NAME
  https://tucloudapi.7kas.com:9087/tucloud?func=updatetask&ukey=YOUR_KEY&pbx=PBX_NAME
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. Always HTTP 200; the response is a JSON envelope.


== Parameters ==
== Parameters ==
Line 14: Line 14:
! Parameter !! Type !! Required !! Default !! Meaning
! Parameter !! Type !! Required !! Default !! Meaning
|-
|-
| <code>pbx</code> || string || Yes || — || TuCloud PBX NAME (e.g. tucall). The (ukey, pbx) pair is the tenant boundary; the server verifies the ukey owns this PBX.
| <code>pbx</code> || string || Yes || — || FuturePBX NAME (e.g. tucall). The (ukey, pbx) pair is the tenant boundary; the server verifies the ukey owns this PBX.
|-
|-
| <code>id</code> || integer || Yes || — || Task id (_id).
| <code>id</code> || integer || Yes || — || Task id (_id).
Line 30: Line 30:
| <code>dayofmonth</code> || integer || No || <code>0</code> || Day of month 1-31; 0 = any.
| <code>dayofmonth</code> || integer || No || <code>0</code> || Day of month 1-31; 0 = any.
|-
|-
| <code>dayofweek</code> || integer || No || <code>0</code> || Day of week 0-6; 7 = any.
| <code>dayofweek</code> || integer || No || <code>7</code> || Day of week in cron numbering: 0 = Sunday, 1 = Monday ... 6 = Saturday; 7 = any day (the default). 0 is Sunday, not "any".
|-
|-
| <code>hold</code> || integer || No || <code>0</code> || 1 = recurring, 0 = one-shot.
| <code>hold</code> || integer || No || <code>0</code> || 1 = recurring, 0 = one-shot.
Line 41: Line 41:


== Errors ==
== 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>.
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 21:17, 8 October 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

Edit a task (does not change status). 404 if not in the caller's PBX.

Call

https://tucloudapi.7kas.com:9087/tucloud?func=updatetask&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.
id integer Yes — Task id (_id).
name string Yes — Task name (required).
description string No — Optional description.
time string No 00:00 Time of day HH:MM.
second integer No 0 Second 0-59.
month integer No 0 Month 1-12; 0 = any.
dayofmonth integer No 0 Day of month 1-31; 0 = any.
dayofweek integer No 7 Day of week in cron numbering: 0 = Sunday, 1 = Monday ... 6 = Saturday; 7 = any day (the default). 0 is Sunday, not "any".
hold integer No 0 1 = recurring, 0 = one-shot.

Example

https://tucloudapi.7kas.com:9087/tucloud?func=updatetask&ukey=KEY&pbx=tucall&id=224&name=Verano

Response

{ok, task:TASK}.

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