User Tools

Site Tools


api:pbx:switch:set

API : PBX : Switch Set

Introduction

This request will set the value of a switch.

The switch name can be prefixed with SHARED: if it is a shared switch, or <employee-id>: if it is a personal switch. If not prefix, it is considered global.

Request

URL https://api.telecomx.dk/pbx/switch/SWITCH_NAME
Method POST/GET
Access level PERSONAL or VIEWER if name is prefixed with SHARED: or <user-id>:
MANAGER, OWNER, RESELLER, ADMIN.
Param SWITCH_NAME String Name of switch. May only contain up to 50 chars of a-z, A-Z, 0-9 _ or -.
Query value String If GET request, this holds the value to set on the switch: true or false.
customer Id If GET request, optional customer id. Defaults to users own customer.
Body value String If POST request, this holds the value to set on the switch: true or false.
customer Id If POST request, optional customer id. Defaults to users own customer.

Request GET example

https://api.telecomx.dk/pbx/switch/alarm?value=true&customer=1234567890123457890ABCD

Request POST body example

{
  value: true,
  customer: '1234567890123457890ABCD'
}

Response

Json object
success Boolean True on success

Example

{
  success: true
}

Errors

Error code Message Description
404 customer Customer not found
403 name User access level requires name to be prefixed with SHARED: or user-id:
422 name Invalid switch name
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/switch/set.txt · Last modified: 2024/06/03 10:48 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki