JSON API » access » access/update

Updates an existing remote access account.

Input parameters

Requires authentication and the administrator or wholesale role privileges.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
idIntegerID of account to update.Yes
accountStringAccount number to authenticate caller.NoCurrent value.
calleridStringCallerid to match. Empty string for none.NoCurrent value.
callerid_externalStringCallerid to transmit on external calls.NoCurrent value.
callerid_internalStringCallerid to transmit on internal calls.NoCurrent value.
cosIntegerID of class of service. 0 for default. 1 for system COS that allows all calls.NoCurrent value.
descriptionStringDescription.NoCurrent value.
dialplanStringDial plan. Empty string for default.NoCurrent value.
dnumberStringNumber to automatically dial. Empty string for none.NoCurrent value.
dtmf_connect_callerStringDTMF to play to caller when outbound call connects.NoCurrent value.
lockedInteger1 to lock the account, 0 not to.NoCurrent value.
nameStringName.NoCurrent value.
ownerIntegerID of owning person. 0 for none.NoCurrent value.
passwordStringPIN to authenticate caller.NoCurrent value.
play_balanceInteger1 to play the balance to caller, 0 not to.NoCurrent value.
prefixStringCalled number prefix to match. Empty string for none.NoCurrent value.
presentation_externalInteger1 to allow callerid presentation on external calls, 32 to forbid it.NoCurrent value.
presentation_internalInteger1 to allow callerid presentation on internal calls, 32 to forbid it.NoCurrent value.
recordgroupIntegerID of record group. 0 for none.NoCurrent value.
sourceStringSource IP address to match. Empty string for none.NoCurrent value.
stripIntegerNumber of digits to strip from called number. Normally only used with prefix.NoCurrent value.
typeString"callback", "direct", or "menu".NoCurrent value.
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
201Input passed validation. Only returned if validation=1.
204Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
403Your rate plan does not allow this.
404The 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

VersionChanges
4.4presentation_internal parameter added.
3.14cos input parameter changed to allow 0 for default and 1 to allow all calls.
3.13Function added.