JSON API » access » access/update
Updates an existing remote access account.
Input parameters
Requires authentication and the administrator or wholesale role privileges.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
id | Integer | ID of account to update. | Yes | |
account | String | Account number to authenticate caller. | No | Current value. |
callerid | String | Callerid to match. Empty string for none. | No | Current value. |
callerid_external | String | Callerid to transmit on external calls. | No | Current value. |
callerid_internal | String | Callerid to transmit on internal calls. | No | Current value. |
cos | Integer | ID of class of service. 0 for default. 1 for system COS that allows all calls. | No | Current value. |
description | String | Description. | No | Current value. |
dialplan | String | Dial plan. Empty string for default. | No | Current value. |
dnumber | String | Number to automatically dial. Empty string for none. | No | Current value. |
dtmf_connect_caller | String | DTMF to play to caller when outbound call connects. | No | Current value. |
locked | Integer | 1 to lock the account, 0 not to. | No | Current value. |
name | String | Name. | No | Current value. |
owner | Integer | ID of owning person. 0 for none. | No | Current value. |
password | String | PIN to authenticate caller. | No | Current value. |
play_balance | Integer | 1 to play the balance to caller, 0 not to. | No | Current value. |
prefix | String | Called number prefix to match. Empty string for none. | No | Current value. |
presentation_external | Integer | 1 to allow callerid presentation on external calls, 32 to forbid it. | No | Current value. |
recordgroup | Integer | ID of record group. 0 for none. | No | Current value. |
source | String | Source IP address to match. Empty string for none. | No | Current value. |
strip | Integer | Number of digits to strip from called number. Normally only used with prefix. | No | Current value. |
type | String | "callback", "direct", or "menu". | No | Current value. |
validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
Responses
Code | Description |
---|---|
201 | Input passed validation. Only returned if validation=1. |
204 | Success. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
403 | Your rate plan does not allow this. |
404 | The account does not exist, or you do not have permission to update it. |
Data returned
No data is returned.
Example: Changing the name
http://enswitch.example.com/api/json/access/update/?auth_username=user;auth_password=password;id=123;name=example{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }
Change history
Version | Changes |
---|---|
3.14 | cos input parameter changed to allow 0 for default and 1 to allow all calls. |
3.13 | Function added. |