ModifyAccount

You can use the ModifyAccount method to modify an existing account.

When you lock an account, any existing connections from that account are immediately terminated. When you change an account's CHAP settings, any existing connections remain active, and the new CHAP settings are used on subsequent connections or reconnections. To clear an account's attributes, specify {} for the attributes parameter.

Parameters

This method has the following input parameters:

Name Description Type Default value Required
accountID AccountID for the account to modify. integer None Yes
status

Status for the account:

active: Account is active and connections are allowed.

locked: Account is locked and connections are refused.

string None No
initiatorSecret The CHAP secret to use for the initiator. This secret must be 12-16 characters in length and should be impenetrable. The initiator CHAP secret must be unique and cannot be the same as the target CHAP secret. string None No
targetSecret The CHAP secret to use for the target (mutual CHAP authentication). This secret must be 12-16 characters in length and should be impenetrable. The target CHAP secret must be unique and cannot be the same as the initiator CHAP secret. string None No
attributes List of name-value pairs in JSON object format. JSON object None No
username Used to change the username associated with the account. (Must be 1 to 64 characters in length). string None No

Return value

This method has no return value.

Request example

Requests for this method are similar to the following example. In this example, the attributes are cleared by specifying {} for them:

{
   "method": "ModifyAccount",
   "params": {
     "accountID"  : 25,
     "status"   : "locked",
     "attributes" : {}
   },
   "id" : 1
}

Response example

This method returns a response similar to the following example:

{
 "id" : 1, 
 "result" : { }
}