RESTful WebService
- Only the user with system administrator or group administrator privilege allow to use the API.
- Use basic authentication and HTTPS protocol.
Configuration
- Select or create a system administrator / group administrator user and enable API service.

- Go to System > System Parameter and set ID 38 “EnableWebServices” as true.

- Here’s an example of one HTTP client request.

Method
- GET
- POST
- PUT
- PATCH
- DELETE
Status Code
| Code | Status | message |
|---|---|---|
| 200 | OK – [GET] | Get the data successfully |
| 201 | CREATED – [POST/PUT/PATCH] | Create or update the data successfully |
| 202 | Accepted – [*] | Send the request successfully |
| 204 | No Content – [DELETE] | Delete the data successfully |
| 400 | INVALID REQUEST – [POST/PUT/PATCH] | Server does not create or update the data |
| 401 | Unauthorized – [*] | Permission Denied |
| 403 | Forbidden – [*] | Access Denied |
| 404 | NOT FOUND – [*] | Resource does not exist |
| 406 | Not Acceptable – [GET] | Request format error |
| 500 | INTERNAL SERVER ERROR – [*] | An error occurs in the server |
Services
- CPE Service
- Device Service
- Network Service
- Group Service
- Provision Service
- User Service
- Wholesale Wizard Service
Resource API
Request
| Name | Value |
|---|---|
| Protocol | HTTPS |
| Authorization | Basic Auth |
| HTTP method | GET、POST、PUT、PATCH、DELETE |
| HTTP content-type | application/json |
| URL endpoint | MUST use UrlEncode method to encode the url. |
| parameters | |
| Request Body | JSON format |
Response
| Name | Value |
|---|---|
| HTTP code | 201 Created |
| JSON format | {“status”: 1} |
CPE Service
| GET | /RestfulWebService/rest/cpes/rpcMethods |
The method request the specific CPE to provide the supported RPC Methods
URL
/RestfulWebService/rest/cpes/rpcMethods
/RestfulWebService/rest/{groupName}/cpes/rpcMethods
Roles Allowed
System Administrator
URL Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| serialnumber | The MAC address of CPE. | true | String |
Response arguments
Each array contains the name of supported RPC methods of the request device.
The list of methods returned by an ACS MUST always include “Inform”.
Example
GET /RestfulWebService/rest/cpes/rpcMethods?serialnumber=001DAA123456
GET /RestfulWebService/rest/RootGroup/cpes/rpcMethods?serialnumber=001DAA123456
Response
HTTP status : 200
Response :
[
"xxxxxxxxx",
"xxxxxxxxx",
...
]
| GET | /RestfulWebService/rest/cpes/parameterNames |
This method will get accessible parameters and writable attribute on a particular CPE.
URL
/RestfulWebService/rest/cpes/parameterNames
/RestfulWebService/rest/{groupName}/cpes/parameterNames
Roles Allowed
System Administrator
URL Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| serialnumber | The MAC address of CPE. | true | String |
| parameterPath | A string contains either a complete Parameter name or a Partial Path Name representing a subset of the name hierarchy. | true | String |
| nextLevel | If false, the response MUST contain the Parameter or Object whose name exactly matches the ParameterPath argument. If true, the response MUST contains all Parameters and Objects that are next-level children of the Object given by the ParameterPath argument. | true | String |
Response arguments
Each array structure contais the name and other attribute for a Parameter or Object.
| Name | Description |
|---|---|
| name | Specify the full path name or a partial path Name of a TR-069 Parameter |
| writable | Whether the parameter value allow to change by using the SetParameterValues method. |
Example
GET RestfulWebService/rest/cpes/parameterNames?serialnumber=001DAA123456¶meterPath=InternetGatewayDevice.LANDevice.1.Hosts.&nextLevel=true
GET RestfulWebService/rest/RootGroup/cpes/parameterNames?serialnumber=001DAA123456¶meterPath=InternetGatewayDevice.LANDevice.1.Hosts.&nextLevel=true
Response
HTTP status : 200
Response :
[
{
"name":"InternetGatewayDevice.LANDevice.1.Hosts.HostNumberOfEntries",
"writable":false
},
{
"name":"InternetGatewayDevice.LANDevice.1.Hosts.Host.",
"writable":false
}
]
| POST | /RestfulWebService/rest/cpes/parameterValues |
This method will obtain the value of one or more TR-069 Parameters for the specific CPE.
URL
/RestfulWebService/rest/cpes/parameterValues
/RestfulWebService/rest/{groupName}/cpes/parameterValues
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| serialnumber | The MAC address of CPE. | true | String |
| parameterNameList | Array with TR069 paramater names. | true | Array:String |
Response arguments
Array of name-value pairs contains the name and value for each requested TR-069 Parameter.
| Name | Description |
|---|---|
| name | The name of a TR-069 Parameter. |
| value | The value the TR-069 Parameter. |
Example
POST /RestfulWebService/rest/cpes/parameterValues
POST /RestfulWebService/rest/RootGroup/cpes/parameterValues
JSON :
{
"serialnumber": "001DAA123456",
"parameterNameList" : [
"InternetGatewayDevice.DeviceInfo.ModelName",
"InternetGatewayDevice.DeviceInfo.Description"
]
}
Response
HTTP status : 200
Response :
{
"parameterList": [
{
"name":"InternetGatewayDevice.DeviceInfo.ModelName",
"value":"xxxx"
},
{
"name":"InternetGatewayDevice.DeviceInfo.Description",
"value":"xxxx"
}
],
"excludeParameterList" : []
}
| POST | /RestfulWebService/rest/cpes/parameterAttributes |
This method will request the attributes associated with one or more TR-069 Parameters for specific CPE.
URL
/RestfulWebService/rest/cpes/parameterAttributes
/RestfulWebService/rest/{groupName}/cpes/parameterAttributes
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| serialnumber | The MAC address of CPE. | true | String |
| parameterNameList | Array with TR069 paramater names. | true | Array:String |
Response arguments
List access control and notification information for the specified set of Parameters.
| Name | Description | Value |
|---|---|---|
| name | Name of a TR-069 Parameter. | |
| notification | Indicates whether (and how) the CPE will notify the ACS when the specified Parameter(s) change in value. | [0:6] |
| accessList | Array of zero or more entities for which write access to the specified Parameter(s) is granted. |
Example
POST /RestfulWebService/rest/cpes/parameterAttributes
POST /RestfulWebService/rest/RootGroup/cpes/parameterAttributes
JSON :
{
"serialnumber": "001DAA123456",
"parameterNameList" : [
"InternetGatewayDevice.DeviceInfo.ModelName",
"InternetGatewayDevice.DeviceInfo.Description"
]
}
Response
HTTP status : 200
Response :
{
[
{
"name":"InternetGatewayDevice.DeviceInfo.ModelName",
"accessList":["xxxx"],
"notification":"xxxx"
},
{
"name":"InternetGatewayDevice.DeviceInfo.Description",
"accessList":["xxxx"]
"notification":"xxxx"
}
],
"excludeParameterList":[]
}
| POST | /RestfulWebService/rest/cpes/object |
This method request CPE to create a new instance of a Multi-Instance Object and only for Linux model(V3900/V2960/V300B).
URL
/RestfulWebService/rest/cpes/object
/RestfulWebService/rest/{groupName}/cpes/object
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| serialnumber | The MAC address of CPE. | true | String |
| objectName | The parameter path of the collection Objects which a new instance should be created. | true | String |
Response arguments
| Name | Description | Value |
|---|---|---|
| cpeStatus | A correct response to this method returns an integer enumeration. | 0 = The Object has been created. 1 = The Object creation has been validated and committed, but not yet applied (for example, if a reboot is required before the new Object can be applied). 9003 = Invalid arguments. 9005 = Invalid Parameter name. 8002 = Internal error . |
Example
POST /RestfulWebService/rest/cpes/object
POST /RestfulWebService/rest/RootGroup/cpes/object
JSON :
{
"serialnumber": "001DAA123456",
"objectName" : "InternetGatewayDevice.X_00507F_INTERFACE_V39.WAN."
}
Response
HTTP status : 201
Response :
{
"instanceNumber":2,
"cpeStatus":0
}
| POST | /RestfulWebService/rest/cpes/reboot |
This method will request CPE to reboot, please calls this API for use of extreme caution.
URL
/RestfulWebService/rest/cpes/reboot
/RestfulWebService/rest/{groupName}/cpes/reboot
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| serialnumber | The MAC address of CPE. | true | String |
Response arguments
| Name | Description |
|---|---|
| result | A message from server. |
Example
POST /RestfulWebService/rest/cpes/reboot
POST /RestfulWebService/rest/RootGroup/cpes/reboot
JSON :
{
"serialnumber": "001DAA123456"
}
Response
HTTP status : 201
Response :
{
"result":"Reboot Ok"
}
| POST | /RestfulWebService/rest/cpes/factoryReset |
This method will reset the CPE to the factory default state, please calls this API for use of extreme caution.
URL
/RestfulWebService/rest/cpes/factoryReset
/RestfulWebService/rest/{groupName}/cpes/factoryReset
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| serialnumber | The MAC address of CPE. | true | String |
Response arguments
| Name | Description |
|---|---|
| result | A message from server. |
Example
POST /RestfulWebService/rest/cpes/factoryReset
POST /RestfulWebService/rest/RootGroup/cpes/factoryReset
JSON :
{
"serialnumber": "001DAA123456"
}
Response
HTTP status : 201
Response :
{
"result":"FactoryReset Ok"
}
| PATCH | /RestfulWebService/rest/cpes/parameterValues |
This method will modify the value of one or more TR-069 Parameters.
URL
/RestfulWebService/rest/cpes/parameterValues
/RestfulWebService/rest/{groupName}/cpes/parameterValues
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| serialnumber | The MAC address of CPE. | true | String |
| parameterList | List of TR069 parameters. | true | Array |
| parameterList[].name | The name of a TR-069 Parameter. | true | String |
| parameterList[].value | The value of a TR-069 Parameter. | true | String |
Response arguments
| Name | Description | Value |
|---|---|---|
| cpeStatus | A correct response to this method returns an integer enumeration. | 0 = All Parameter changes have been validated and applied. 1 = All Parameter changes have been validated and committed, but some or all are not yet applied.(for example, if a reboot is required before the new values are applied). 9003 = Invalid arguments. 9005 = Invalid Parameter name. 8002 = Internal error . |
Example
PATCH /RestfulWebService/rest/cpes/parameterValues
PATCH /RestfulWebService/rest/RootGroup/cpes/parameterValues
JSON :
{
"serialnumber": "001DAA123456",
"parameterList" : [
{
"name" : "InternetGatewayDevice.X_00507F_Applications.IGMP.EnableIGMPFastLeave",
"value" : "true"
},
{
"name" : "InternetGatewayDevice.X_00507F_System.Management.FTPServer",
"value" : "true"
}
]
}
Response
HTTP status : 201
Response :
{
"cpeStatus": 0
}
| PATCH | /RestfulWebService/rest/cpes/parameterAttributes |
This method request CPE to change value for the attributes of one or more TR-069 Parameters.
URL
/RestfulWebService/rest/cpes/parameterAttributes
/RestfulWebService/rest/{groupName}/cpes/parameterAttributes
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| serialnumber | The MAC address of CPE. | true | String | |
| parameterList | List of TR069 parameters. | true | Array | |
| parameterList[].name | The name of a Parameter. | true | String | |
| parameterList[].accessList | Array of zero or more entities for which write access to the specified Parameter(s) is granted | true | String | Subscriber |
| parameterList[].accessListChange | If true, the value of AccessList replaces the current access list for this Parameter or group of Parameters. If false, no change is made to the access list. | true | Boolean | |
| parameterList[].notification | Indicates whether (and how) the CPE will notify the ACS when the specified Parameter(s) change in value. | true | Integer | [0:6] |
| parameterList[].notificationChange | If true, the value of Notification replaces the current notification setting for this Parameter or group of Parameters. If false, no change is made to the notification setting. | true | Boolean |
Response arguments
| Name | Description | Value |
|---|---|---|
| cpeStatus | A correct response to this method returns an integer enumeration. | 0 = All Parameter changes have been validated and applied. 1 = All Parameter changes have been validated and committed, but some or all are not yet applied.(for example, if a reboot is required before the new values are applied). 9003 = Invalid arguments. 9005 = Invalid Parameter name. 8002 = Internal error . |
| result | A message from server |
Example
PATCH /RestfulWebService/rest/cpes/parameterAttributes
PATCH /RestfulWebService/rest/RootGroup/cpes/parameterAttributes
JSON :
{
"serialnumber": "001DAA123456",
"parameterList" : [
{
"name" : "InternetGatewayDevice.X_00507F_System.Management.AllowManagementfromInternet",
"accessList": ["Subscriber"],
"accessListChange": true,
"notification": 0,
"notificationChange":true
},
{
"name" : "InternetGatewayDevice.X_00507F_System.Management.FTPServer",
"accessList": ["Subscriber"],
"accessListChange": true,
"notification": 0,
"notificationChange":true
}
]
}
Response
HTTP status : 201
Response :
{
"cpeStatus": 0,
"result": "SetParameterAttributesResponse ok"
}
| DELETE | /RestfulWebService/rest/cpes/object |
This method is used to remove a particular instance of an Object and only for Linux model(V3900/V2960/V300B).
This method call takes as an argument the Path Name of the Object instance including the Instance Identifer.
URL
/RestfulWebService/rest/cpes/object
/RestfulWebService/rest/{groupName}/cpes/object
Roles Allowed
System Administrator
URL Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| serialnumber | The MAC address of CPE. | true | String |
| objectName | The TR-069 Path Name of the Object instance that will be removed. | true | String |
Response arguments
| Name | Description | Value |
|---|---|---|
| cpeStatus | A fail response of this method returns an integer enumeration. | 0 = The Object has been deleted… 1 = The Object deletion has been validated and committed, but not yet applied. 9003 = Invalid arguments. 9005 = Invalid Parameter name. 8002 = Internal error . |
Example
DELETE /RestfulWebService/rest/cpes/object?serialnumber=001DAA123456&objectName=InternetGatewayDevice.X_00507F_INTERFACE_V39.WAN.8.
DELETE /RestfulWebService/rest/RootGroup/cpes/object?serialnumber=001DAA123456&objectName=InternetGatewayDevice.X_00507F_INTERFACE_V39.WAN.8.
Response
HTTP status : 200
Response :
{
"cpeStatus": 0
}
Device Service
| GET | /RestfulWebService/rest/devices/count |
This method will get the total number of devices in the ACS.
URL
/RestfulWebService/rest/devices/count
/RestfulWebService/rest/{groupName}/devices/count
Roles Allowed
System Administrator | Group Administrator
URL Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| treeType | 0 = Count all of the devices in the server. 1 = Count all of the devices that can be managed by the API user, with both “enable” and “disable” CPE status in Network Management. 2 = Count all of the devices that can be managed by this user, with only “enable” CPE status in Network Management. |
true | Integer | [0:2] |
Response arguments
| Name | Description |
|---|---|
| count | The number of devices. |
Example
GET /RestfulWebService/rest/devices/count?treeType=1
GET /RestfulWebService/rest/RootGroup/devices/count?treeType=1
Response
HTTP status : 200
Response :
{
"count":123
}
| GET | /RestfulWebService/rest/devices |
This method will request the detail information of the device(s) in ACS server by the user and argument.
URL
/RestfulWebService/rest/devices
/RestfulWebService/rest/{groupName}/devices
Roles Allowed
System Administrator | Group Administrator
URL Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| treeType | 0 = All of the devices in the server. 1 = All of the devices that can be managed by this API user, with both “enable” and “disable” status in Network Management. 2 = All of the devices that can be managed by this user, with only “enable” status in Network Management. |
false | Integer | [0:2] |
| ip | Search the device by this IP address. | false | String | |
| networkName | Search the device by the network name. | false | String | |
| deviceName | Search the device by the device name. | false | String | |
| ugroupName | Search the devices which allow to manage by the user group(must with deviceName parameter). | false | String |
Response arguments
A list with detail information of the device(s).
Example
GET /RestfulWebService/rest/devices?treeType=1
GET /RestfulWebService/rest/devices?ip=192.168.1.1
GET /RestfulWebService/rest/devices?networkName=Root%20Network
GET /RestfulWebService/rest/devices?deviceName=902_001DAA3D4F16&ugroupName=RootGroup
GET /RestfulWebService/rest/RootGroup/devices?treeType=1
Response
HTTP status : 200
Response :
[
{
"connectionRequestUrl" : "http://192.168.1.1:8069/cwm/CRN.html",
"deviceName" : "2762Vac_001DAA653288",
"deviceId" : 5,
...
}
]
| GET | /RestfulWebService/rest/devices/offlineDevice |
This method will request the information which CPE device(s) are offline in ACS server by the user and argument.
URL
/RestfulWebService/rest/devices/offlineDevice
/RestfulWebService/rest/{groupName}/devices/offlineDevice
Roles Allowed
System Administrator | Group Administrator
URL Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| networkId | Search the device(s) which are offline by network id. | false | Integer | |
| deviceId | Search the device which is offline by the device id. | false | Integer |
Response arguments
A list with the information which CPE device(s) are offline.
Example
GET /RestfulWebService/rest/devices/offlineDevice?networkId=3
GET /RestfulWebService/rest/devices/offlineDevice?deviceId=4
GET /RestfulWebService/rest/RootGroup/devices/offlineDevice?deviceId=4
Response
HTTP status : 200
Response :
[
{
"deviceId": 4,
"deviceName": "2865ac_001DAA123456",
"deviceSerialNumber": "001DAA123456"
}
]
| PATCH | /RestfulWebService/rest/devices |
This method is used to enable or disable device.
URL
/RestfulWebService/rest/devices
/RestfulWebService/rest/{groupName}/devices
Roles Allowed
System Administrator | Group Administrator
Data Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| serialnumber | The MAC address of device. | true | String | |
| deviceStatus | Device is Disable or Enable. | true | String | Enable,Disable |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration. | 0 = The method that change device’s status failed. 1 = The method that change device’s status success. |
Example
PATCH /RestfulWebService/rest/devices
PATCH /RestfulWebService/rest/RootGroup/devices
JSON :
{
"serialnumber": "001DAA123456",
"deviceStatus" : "Enable"
}
Response
HTTP status : 201
Response :
{
"status" : 1
}
| PATCH | /RestfulWebService/rest/devices/changeNetwork |
This method is used to move the device to other network.
URL
/RestfulWebService/rest/devices/changeNetwork
/RestfulWebService/rest/{groupName}/devices/changeNetwork
Roles Allowed
System Administrator | Group Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| serialnumber | The MAC address of device. | true | String |
| networkId | The id of network that device will be moved to. | true | Integer |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration. | 0 = The method that change device to other network failed. 1 = The method that change device to other network success. |
Example
PATCH /RestfulWebService/rest/devices/changeNetwork
PATCH /RestfulWebService/rest/RootGroup/devices/changeNetwork
JSON :
{
"serialnumber": "001DAA123456",
"networkId" : 3
}
Response
HTTP status : 201
Response :
{
"status" : 1
}
| DELETE | /RestfulWebService/rest/devices |
This method is used to delete device(s) in the ACS by user and argument.
URL
/RestfulWebService/rest/devices
/RestfulWebService/rest/{groupName}/devices
Roles Allowed
System Administrator | Group Administrator
URL Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| serialnumber | Search and delete the device by the MAC address. | false | String |
| deviceName | Search and delete the device by the device name. | false | String |
| ip | Search and delete the device by the IP. | false | String |
Response arguments
This method request has no arguments.
Example
DELETE /RestfulWebService/rest/devices?serialnumber=001DAA123456
DELETE /RestfulWebService/rest/devices?deviceName=Vigor2860_001DAA123456
DELETE /RestfulWebService/rest/devices?ip=192.168.1.2
DELETE /RestfulWebService/rest/RootGroup/devices?serialnumber=001DAA123456
Response
○ HTTP status : 200
Response :
{
"status":1
}
○ HTTP status : 200
Response :
{
"status": 1,
"deviceDeleteSuccess": [
{
"deviceName": "DrayTek",
"serialnumber": "001DAA123456"
},
{
"deviceName": "DrayTek",
"serialnumber": "001DAA234567"
},
{
"deviceName": "DrayTek",
"serialnumber": "001DAA345678"
}
],
"deviceDeleteFail": []
}
○ HTTP status : 200
Response :
{
"status": 1,
"deviceDeleteSuccess": [
{
"deviceName": "DrayTek",
"serialnumber": "001DAA123456"
},
{
"deviceName": "DrayTek",
"serialnumber": "001DAA234567"
}
],
"deviceDeleteFail": [
{
"deviceName": "DrayTek",
"serialnumber": "001DAA345678"
}
]
}
Network Service
| GET | /RestfulWebService/rest/networks |
The method listed the networks' information which the user is allowed to manage.
URL
/RestfulWebService/rest/networks
/RestfulWebService/rest/{groupName}/networks
Roles Allowed
System Administrator | Group Administrator
URL Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| userId | Search the network(s) by user id. | false | Integer |
Response arguments
A list with the information of the network(s).
Example
GET /RestfulWebService/rest/networks
GET /RestfulWebService/rest/networks?userId=xxxxxxxxxxxxxx
GET /RestfulWebService/rest/RootGroup/networks
Response
HTTP status : 200
Response :
[
{
"id" : 2,
"name":"Root Network",
"parentId":-1,
"userName":"xxx",
"password":"xxx",
"location":""
},
...
]
| POST | /RestfulWebService/rest/networks |
This method will create a new Network in the ACS.
URL
/RestfulWebService/rest/networks
/RestfulWebService/rest/{groupName}/networks
Roles Allowed
System Administrator | Group Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| name | The name of the new network. | true | String |
| parentId | The id of parent network for the new network. | true | Integer |
| userName | The network username for CPE to authenticate with the ACS server. This parameter allow to set as the empty string if no authentication is required. | true | String |
| password | The network password for CPE to authenticate with the ACS server. This parameter allow to set as the empty string if no authentication is required. | true | String |
| location | The location of network. Empty string is allowed. | true | String |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration. | 0 = Create the new network failed. 1 = Create the new network successfully. |
Example
POST /RestfulWebService/rest/networks
POST /RestfulWebService/rest/RootGroup/networks
JSON :
{
"name":"newNetwork",
"parentId":2,
"userName":"xxx",
"password":"xxx",
"location":""
}
Response
HTTP status : 201
Response :
{
"status":1
}
| PATCH | /RestfulWebService/rest/networks |
This method will update the Network information by searching network ID.
URL
/RestfulWebService/rest/networks
/RestfulWebService/rest/{groupName}/networks
Roles Allowed
System Administrator | Group Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| id | The id of network which you’d like to update information. | true | Integer |
| name | The new name of this network. | false | String |
| parentId | The new parent network’s ID for this network. | false | Integer |
| userName | The network username for CPE to authenticate with the ACS server. This parameter allow to set as the empty string if no authentication is required. | false | String |
| password | The network password for CPE to authenticate with the ACS server. This parameter allow to set as the empty string if no authentication is required. | false | String |
| location | The location of network. Empty string is allowed. | false | String |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response of this method returns an integer enumeration. | 0 = Update the network information failed. 1 = Update the network information successfully. |
Example
PATCH /RestfulWebService/rest/networks
PATCH /RestfulWebService/rest/RootGroup/networks
JSON :
{
"id": 15,
"parentId":3,
"location":"New Jersey"
}
PATCH /RestfulWebService/rest/networks
PATCH /RestfulWebService/rest/RootGroup/networks
JSON :
{
"id": 15,
"userName":"xxx",
"password":"xxx"
}
Response
HTTP status : 201
Response :
{
"status" : 1
}
| DELETE | /RestfulWebService/rest/networks/{id} |
The method will search and delete the network by network ID.
URL
/RestfulWebService/rest/networks
/RestfulWebService/rest/{groupName}/networks
Roles Allowed
System Administrator | Group Administrator
URL Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| id | The id of the network. | true | Integer |
Response arguments
This method request has no arguments.
Example
DELETE /RestfulWebService/rest/networks/15
DELETE /RestfulWebService/rest/RootGroup/networks/15
Response
○ HTTP status : 200
Response :
{
"status":1
}
Group Service
| GET | /RestfulWebService/rest/groups |
The method will list all the user groups in the ACS.
URL
/RestfulWebService/rest/groups
/RestfulWebService/rest/{groupName}/groups
Roles Allowed
System Administrator
URL Parameters
This method request has no arguments.
Response arguments
A list with the detail information of each user group.
Example
GET /RestfulWebService/rest/groups
GET /RestfulWebService/rest/RootGroup/groups
Response
HTTP status : 200
Response :
{
"status" : 1,
"countEntries" : 7,
"uGroup" : [
{
"ugroupId" : 1,
"ugroupName" : "RootGroup",
"ugroupEnableCpeNotify" : true,
"ugroupEnableGlobalserver" : false,
"ugroupEnableGlobalserverSnmp" : false,
"ugroupEnableExpiredate" : true,
"ugroupExpiredate" : "2020/01/11",
"ugroupNodes" : -1,
"ugroupUsednodes" : 256
},
...
]
}
| GET | /RestfulWebService/rest/groups/getUsers |
The method request the information of all users in the group.
URL
/RestfulWebService/rest/groups/getUsers
/RestfulWebService/rest/{groupName}/groups/getUsers
Roles Allowed
System Administrator
URL Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| ugroupId | The ID of the user group. | false | Integer |
| ugroupName | The name of the user group. | false | String |
Response arguments
A list with the information of the user(s) in the user group.
Example
GET /RestfulWebService/rest/groups/getUsers?ugroupId=1
GET /RestfulWebService/rest/groups/getUsers?ugroupName=RootGroup
GET /RestfulWebService/rest/RootGroup/groups/getUsers?ugroupId=1
Response
HTTP status : 200
Response :
[
{
"userId" : "users_1520471059355",
"userName" : "clouduser",
"authentication" : "Internal",
"roleName" : "System Administrator",
"uGroupList" : ["RootGroup","group1"]
},
...
]
| POST | /RestfulWebService/rest/groups |
This method will create a new user group in ACS.
URL
/RestfulWebService/rest/groups
/RestfulWebService/rest/{groupName}/groups
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| ugroupName | The name of the new group. | true | String | |
| ugroupNodes | Define the maximum number of CPE node that group could have. | true | Integer | -1 : No Limit Nodes |
| ugroupEnableCpeNotify | Enable/disable CPE notify Mail/SMS/SNMP function. | true | Boolean | |
| ugroupEnableGlobalserver | Enable/disable global mail server for this user group. | true | Boolean | |
| ugroupEnableGlobalserverSnmp | Enable/disable global SNMP server for this user group. | true | Boolean | |
| ugroupEnableExpiredate | Enable/disable the expire date for this user group. | true | Boolean | |
| ugroupExpiredate | Specify the expire date of this user group. | false | String | 2020/01/11,format : yyyy/mm/dd |
| ugroupLicenseType | The type of the license for such group. Only for ACS cloud version(distributor host only). | false | String | Standard – Standard has basic monitoring and management features for dealers providing to their customers.
Premium – All the features in Standard, plus provisioning for CPEs, Reports, User Management and Network Management to provide better services. Ideal for dealers who need multi-tenancy capability. |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response of this method returns an integer enumeration. | 0 = Fail to create a new user group. 1 = Create the new group successfully. |
Example
POST /RestfulWebService/rest/groups
POST /RestfulWebService/rest/RootGroup/groups
JSON :
{
"ugroupName":"newGroup",
"ugroupNodes":-1,
"ugroupEnableCpeNotify":false,
"ugroupEnableGlobalserver":false,
"ugroupEnableGlobalserverSnmp":false,
"ugroupEnableExpiredate":true,
"ugroupExpiredate":"2021/01/11",
"ugroupLicenseType":"Standard"
}
Response
HTTP status : 201
Response :
{
"status":1
}
| POST | /RestfulWebService/rest/groups/userToGroupByName |
This method will search the user by user name then add it into the user group.
URL
/RestfulWebService/rest/groups/userToGroupByName
/RestfulWebService/rest/{groupName}/groups/userToGroupByName
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| ugroupNameAssign | The name of the user group you want to add the user. | true | String | |
| userName | The name of the user you want to add into the user group. | true | String | |
| authentication | The authentication type for the user. | true | String | Internal External |
| ugroupNameBelongTo | One of the group that user current belong to(Make sure ACS could search the unique user). | false | String |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration. | 0 = Fail to add the user into user group |
| result | the message return from the server. |
Example
POST /RestfulWebService/rest/groups/userToGroupByName
POST /RestfulWebService/rest/RootGroup/groups/userToGroupByName
JSON :
{
"ugroupNameAssign":"group2",
"userName":"clouduser",
"authentication":"External",
"ugroupNameBelongTo":"group1"
}
Response
HTTP status : 201
Response :
{
"status":1,
"result":"Add success."
}
| POST | /RestfulWebService/rest/groups/userToGroupByUserId |
This method will search the user by user ID then add it into the user group.
URL
/RestfulWebService/rest/groups/userToGroupByUserId
/RestfulWebService/rest/{groupName}/groups/userToGroupByUserId
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| ugroupNameAssign | The name of the user group you want to add user. | true | String |
| userId | The ID of the user you want to add into the user group. | true | String |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A successful response of this method returns an integer enumeration. | 0 = Fail to add the user into user group. 1 = Add the user into group successfully. |
| result | the message return from the server. |
Example
POST /RestfulWebService/rest/groups/userToGroupByUserId
POST /RestfulWebService/rest/RootGroup/groups/userToGroupByUserId
JSON :
{
"ugroupNameAssign":"group2",
"userId":"users_1556786705847"
}
Response
HTTP status : 201
Response :
{
"status":1,
"result":"Add success."
}
| POST | /RestfulWebService/rest/groups/removeUserFromGroupByName |
This method will search the user by user name then remove it from the user group.
URL
/RestfulWebService/rest/groups/removeUserFromGroupByName
/RestfulWebService/rest/{groupName}/groups/removeUserFromGroupByName
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| ugroupNameRemoveFrom | The name of the user group you want to remove the user. | true | String | |
| userName | The name of the user you want to remove from the user group. | true | String | |
| authentication | The authentication type for the user. | true | String | Internal External |
| ugroupNameBelongTo | One of the group that user current belong to(Make sure ACS could search the unique user). | false | String |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration. | 0 = Fail to remove the user from the user group. 1 =Remove the user from the user group successfully. |
| result | the message return from the server. |
Example
POST /RestfulWebService/rest/groups/removeUserFromGroupByName
POST /RestfulWebService/rest/RootGroup/groups/removeUserFromGroupByName
JSON :
{
"ugroupNameRemoveFrom":"group2",
"userName":"clouduser",
"authentication":"External",
"ugroupNameBelongTo":"group1"
}
Response
HTTP status : 201
Response :
{
"status":1,
"result":"Remove success."
}
| POST | /RestfulWebService/rest/groups/removeUserFromGroupByUserId |
This method will search the user by userID then remove it from the user group.
URL
/RestfulWebService/rest/groups/removeUserFromGroupByUserId
/RestfulWebService/rest/{groupName}/groups/removeUserFromGroupByUserId
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| ugroupNameRemoveFrom | The name of the user group you want to remove user. | true | String |
| userId | The ID of the user you want to remove from the user group. | true | String |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration. | 0 = Fail to remove the user from the user group. 1 =Remove the user from the user group successfully. |
| result | the message return from the server. |
Example
POST /RestfulWebService/rest/groups/removeUserFromGroupByUserId
POST /RestfulWebService/rest/groups/removeUserFromGroupByUserId
JSON :
{
"ugroupNameRemoveFrom":"group2",
"userId":"users_1556786705847"
}
Response
HTTP status : 201
Response :
{
"status":1,
"result":"Remove success."
}
| PATCH | /RestfulWebService/rest/groups/updateById |
This method will search the user group by ID then update the information of the user group.
URL
/RestfulWebService/rest/groups/updateById
/RestfulWebService/rest/{groupName}/groups/updateById
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| ugroupId | The ID of the user group which you’d like update. | true | Integer | |
| newUgroupName | The name of the user group will be changed to. | false | String | |
| ugroupNodes | Define the maximum number of CPE node that group could have. | false | Integer | -1 : No Limit Nodes |
| ugroupEnableCpeNotify | Enable/disable CPE notify Mail/SMS/SNMP. | false | Boolean | |
| ugroupEnableGlobalserver | Enable/disable CPE notify Mail/SMS/SNMP function. | false | Boolean | |
| ugroupEnableGlobalserverSnmp | Enable /disable global SNMP server. | false | Boolean | |
| ugroupEnableExpiredate | Enable/disable the expire date for this user group. | false | Boolean | |
| ugroupExpiredate | Specify the expire date of this user group. | false | String | 2020/01/11,format : yyyy/mm/dd |
| ugroupLicenseType | The type of the license for such group. Only for ACS cloud version(distributor host only). | false | String | Standard – Standard has basic monitoring and management features for dealers providing to their customers.
Premium – All the features in Standard, plus provisioning for CPEs, Reports, User Management and Network Management to provide better services. Ideal for dealers who need multi-tenancy capability. |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration. | 0 = Fail to update the user group. 1 = Update the user group successfully. |
Example
PATCH /RestfulWebService/rest/groups/updateById
PATCH /RestfulWebService/rest/RootGroup/groups/updateById
JSON :
{
"ugroupId": 4,
"newUgroupName":"existGroup2",
"ugroupNodes":-1,
"ugroupEnableCpeNotify":false,
"ugroupEnableGlobalserver":false,
"ugroupEnableGlobalserverSnmp":false,
"ugroupEnableExpiredate":true,
"ugroupExpiredate":"2021/01/11",
"ugroupLicenseType":"Standard"
}
Response
HTTP status : 201
Response :
{
"status" : 1
}
| PATCH | /RestfulWebService/rest/groups/updateByName |
This method will search the user group by name then update the information of the user group.
URL
/RestfulWebService/rest/groups/updateByName
/RestfulWebService/rest/{groupName}/groups/updateByName
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| ugroupName | The name of the user group which you’d like update. | true | String | |
| newUgroupName | The name of the group will be changed to. | false | String | |
| ugroupNodes | Define the maximum number of CPE node that group could have. | false | Integer | -1 : No Limit Nodes |
| ugroupEnableCpeNotify | Enable /disable CPE notify Mail/SMS/SNMP function. | false | Boolean | |
| ugroupEnableGlobalserver | Enable/disable global mail server. | false | Boolean | |
| ugroupEnableGlobalserverSnmp | Enable /disable global SNMP server. | false | Boolean | |
| ugroupEnableExpiredate | Enable/disable the expire date for this user group. | false | Boolean | |
| ugroupExpiredate | Specify the expire date of this user group. | false | String | 2020/01/11,format : yyyy/mm/dd |
| ugroupLicenseType | The type of the license for such group. Only for ACS cloud version(distributor host only). | false | String | Standard – Standard has basic monitoring and management features for dealers providing to their customers.
Premium – All the features in Standard, plus provisioning for CPEs, Reports, User Management and Network Management to provide better services. Ideal for dealers who need multi-tenancy capability. |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration. | 0 = Fail to update the user group. 1 = Update the user group successfully. |
Example
PATCH /RestfulWebService/rest/groups/updateByName
PATCH /RestfulWebService/rest/RootGroup/groups/updateByName
JSON :
{
"ugroupName":"existGroup",
"newUgroupName":"existGroup2",
"ugroupNodes":-1,
"ugroupEnableCpeNotify":false,
"ugroupEnableGlobalserver":false,
"ugroupEnableGlobalserverSnmp":false,
"ugroupEnableExpiredate":true,
"ugroupExpiredate":"2021/01/11",
"ugroupLicenseType":"Standard"
}
Response
HTTP status : 201
Response :
{
"status" : 1
}
| DELETE | /RestfulWebService/rest/groups |
The method will search the user group by ID or name then delete it.
URL
/RestfulWebService/rest/groups
/RestfulWebService/rest/{groupName}/groups
Roles Allowed
System Administrator
URL Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| ugroupId | The ID of the user group. | false | Integer |
| ugroupName | The name of the user group. | false | String |
Response arguments
This method request has no arguments.
Example
DELETE /RestfulWebService/rest/groups?ugroupId=4
DELETE /RestfulWebService/rest/groups?ugroupName=testGroup
DELETE /RestfulWebService/rest/RootGroup/groups?ugroupId=4
Response
○ HTTP status : 200
Response :
{
"status":1
}
Provision Service
| POST | /RestfulWebService/rest/provisions/cpeSetParameter |
This method will create a new CPE Set Parameter profile in ACS.
URL
/RestfulWebService/rest/provisions/cpeSetParameter
/RestfulWebService/rest/{groupName}/provisions/cpeSetParameter
Roles Allowed
System Administrator | Group Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| profileName | The name of the CPE Set Parameter profile. | true | String |
| ugroupName | The name of the user group that the profile belong to. | true | String |
| provisionItems | The list of the TR069 parameters. | true | Array |
| provisionItems[].id | The ID of TR069 parameter that defined by user. | true | Integer |
| provisionItems[].name | The name of TR069 parameter. | true | String |
| provisionDevices | The list of the devices | true | Array |
| provisionDevices[].serialnumber | The MAC address of the device. | true | String |
| provisionDevices[].isReboot | Request CPE to reboot after the profile applied. | true | Boolean |
| provisionDevices[].deviceKeep | Avoid profile setting being change by the client. ACS will keep the required setting for the CPE. | true | Boolean |
| provisionDevices[].name | Set the display name of the CPE. | false | String |
| provisionDevices[].network | Set the network of the device with network name. | false | String |
| provisionDevices[].parameters | The list of parameter values. | true | Array |
| provisionDevices[].parameters[].id | The ID of TR069 parameter that defined by user. | true | Integer |
| provisionDevices[].parameters[].value | The value of the TR-069 parameter. | true | String |
| provisionDevices[].parameters[].isKeep | Avoid single parameter’s setting being change by the client. ACS will keep the required setting for the CPE. | true | Boolean |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration | 0 = Fail to create the profile. 1 = Create the profile successfully. |
Example
POST /RestfulWebService/rest/provisions/cpeSetParameter
POST /RestfulWebService/rest/RootGroup/provisions/cpeSetParameter
JSON :
{
"profileName" : "Draytek_Router",
"ugroupName" : "RootGroup",
"provisionItems":[
{
"id" : 1,
"name" : "InternetGatewayDevice.X_00507F_Applications.IGMP.Interface"
},
{
"id" : 2,
"name" : "InternetGatewayDevice.X_00507F_Applications.IGMP.EnableIGMPFastLeave"
}
],
"provisionDevices":[
{
"serialnumber" : "001DAA123456",
"name" : "vigor2860",
"isReboot" : false,
"network" : "Root Network",
"deviceKeep" : false,
"parameters" : [
{
"id" : 1,
"value" : "WAN1",
"isKeep" : false
},
{
"id" : 2,
"value" : "true",
"isKeep" : false
}
]
},{ ... }
]
}
Response
HTTP status : 201
Response :
{
"status":1
}
| POST | /RestfulWebService/rest/provisions/globalParameter |
This method will create/update a global parameter profile in ACS.
Only updates the exist profile for Parameter List mode.
After create profile, you could go to Provisionong > Network & Devices to apply it.
URL
/RestfulWebService/rest/provisions/globalParameter
/RestfulWebService/rest/{groupName}/provisions/globalParameter
Roles Allowed
System Administrator | Group Administrator
Data Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| ugroupName | The name of the group that global profile. | true | String |
| globalProfiles | The list of the global profiles. | true | Array |
| globalProfiles[].name | The name of the profile. | true | String |
| globalProfiles[].isReplace | If true the exist profile will be cleared before updating the parameters;Otherwise,the method only updates the parameters that user send. | true | Boolean |
| globalProfiles[].isKeep | Avoid profile setting being change by the client. ACS will keep the required setting for the CPE. | true | Boolean |
| globalProfiles[].parameters | The list of TR069 parameters | true | Array |
| globalProfiles[].parameters[].name | The name of the TR-069 parameter. | true | String |
| globalProfiles[].parameters[].value | The value of the TR-069 parameter. | true | String |
| globalProfiles[].parameters[].ord | The applied order of the TR-069 parameter. | true | Integer |
| globalProfiles[].parameters[].isKeep | Avoid single parameter’s setting being change by the client. ACS will keep the required setting for the CPE. | true | Boolean |
| globalProfiles[].parameters[].model | The model which applied with such profile. | true | String |
Response arguments
| Name | Description | Value |
|---|---|---|
| profileName | The name of the profile. | |
| status | A correct response to this method returns an integer enumeration. | 0 = Fail to add or update the profile. 1 = Create or update the profile successfully. |
Example
POST /RestfulWebService/rest/provisions/globalParameter
POST /RestfulWebService/rest/RootGroup/provisions/globalParameter
JSON :
{
"ugroupName" : "RootGroup",
"globalProfiles" : [
{
"name" : "vigor2860",
"isReplace" : false,
"isKeep" : false,
"parameters" : [
{
"name": "InternetGatewayDevice.X_00507F_Applications.IGMP.Interface",
"value": "WAN1",
"ord":0,
"isKeep":false,
"model":"Vigor2860n+"
},{
"name": "InternetGatewayDevice.X_00507F_Applications.IGMP.EnableIGMPFastLeave",
"value": "false",
"ord":0,
"isKeep":false,
"model":"Vigor2860n+"
}
]
},{
"name":"Vigor2760",
"isReplace":true,
...
}
]
}
Response
HTTP status : 201
Response :
[
{
"profileName":"vigor2860",
"status":1
},{
"profileName":"Vigor2760",
"status":1
}
]
User Service
| GET | /RestfulWebService/rest/users |
The method will list the users in ACS by different role user.
URL
/RestfulWebService/rest/users
/RestfulWebService/rest/{groupName}/users
Roles Allowed
System Administrator | Group Administrator
URL Parameters
This method request has no arguments.
Response arguments
List the information for each user.
Example
GET /RestfulWebService/rest/users
GET /RestfulWebService/rest/RootGroup/users
Response
HTTP status : 200
Response :
{
"data" : [
{
"enable" : true,
"userName" : "wizard1",
"userId" : "users_1520471059355",
"roleName" : "System Administrator",
"email" : "",
"description" : "",
"telephone" : "",
"authentication" : "Internal",
"enableMailNotify" : false,
"enableSmsNotify" : false,
"enableWuiLogin" : true,
"enableApiService" : false,
"lastModifiedBy" : "root",
"userGroupList" : []
},
...
]
}
| POST | /RestfulWebService/rest/users |
This method will create a new user. (The user with system administrator privilege is not allowed to create. Group Administrator can only create users with lower privilege.)
URL
/RestfulWebService/rest/users
/RestfulWebService/rest/{groupName}/users
Roles Allowed
System Administrator | Group Administrator
Data Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| enable | Enable/Disable the user account. | true | Boolean | |
| userName | The name for the new user. | true | String | |
| password | The password for the new user. | true | String | |
| roleName | The role for the new user. | true | String | Group Administrator – Have the middle authority high than “Administrator”. Administrator – Have the middle authority. Standard – Have the middle authority higher than operator,only for ACS cloud version. Operator – Have the low authority higher than View Only Operator. View Only Operator – Have the lowest authority. |
| telephone | The telephone number of the user account for receiving the SMS notification. | true | String | |
| The email address of the user account for receiving the email notification. | true | String | ||
| description | A brief description for the user. | true | String | |
| enableMailNotify | Enable to receive the mail notification when there’s an alarm event be generated. | true | Boolean | |
| enableSmsNotify | Enable to receive the SMS notification when there’s an alarm event be generated. | true | Boolean |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration. | 0 = Fail to create the user account. 1 = Create the user account successfully. |
| userId | The id of the created user. |
Example
POST /RestfulWebService/rest/users
POST /RestfulWebService/rest/RootGroup/users
JSON :
{
"enable": true,
"userName":"testUser",
"password":"testUser",
"roleName":"Group Administrator",
"email":"",
"description":"",
"telephone":"",
"enableMailNotify":false,
"enableSmsNotify":false
}
Response
HTTP status : 201
Response :
{
"status":1,
"userId":"users_xxxxxxxxxxxx"
}
| PATCH | /RestfulWebService/rest/users/updateByUserId |
This method will search the user by user ID then update the user information.
URL
/RestfulWebService/rest/users/updateByUserId
/RestfulWebService/rest/{groupName}/users/updateByUserId
Roles Allowed
System Administrator | Group Administrator
Data Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| userId | The ID of the user. | true | String | |
| enable | Enable/Disable the user. | false | Boolean | |
| password | The password for the user. | false | Boolean | |
| roleName | The role for the user. System Administrator can not be changed or be selected. | false | String | Group Administrator – Have the middle authority high than “Administrator”. Administrator – Have the middle authority. Standard – Have the middle authority higher than operator,only for ACS cloud version. Operator – Have the low authority higher than View Only Operator. View Only Operator – Have the lowest authority. |
| telephone | The telephone number for receiving the SMS notification. | false | String | |
| description | A brief description for the user. | false | String | |
| enableMailNotify | Enable to receive the mail notification when there’s an alarm event be generated. | false | Boolean | |
| enableSmsNotify | Enable to receive the SMS notification when there’s an alarm event be generated. | false | Boolean |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration. | 0 = Fail to update the user information. 1 = Update the user information successfully. |
Example
PATCH /RestfulWebService/rest/users/updateByUserId
PATCH /RestfulWebService/rest/RootGroup/users/updateByUserId
JSON :
{
"enable": true,
"userId":"users_1553828599980",
"enableMailNotify":true,
"enableSmsNotify":true
}
Response
HTTP status : 201
Response :
{
"status" : 1
}
| PATCH | /RestfulWebService/rest/users/updateByUserName |
This method will search the user by username then update the user information.
URL
/RestfulWebService/rest/users/updateByUserName
/RestfulWebService/rest/{groupName}/users/updateByUserName
Roles Allowed
System Administrator | Group Administrator
Data Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| userName | A name for the user. | true | String | |
| authentication | The authentication type for the user. | true | String | Internal External |
| ugroupName | The group that the user belong to. | false | String | |
| enable | Enable/Disable the user. | false | Boolean | |
| password | The password for the user. | false | Boolean | |
| roleName | The role for the user. System Administrator can not be changed or be selected. | false | String | Group Administrator – Have the middle authority high than “Administrator”. Administrator – Have the middle authority. Standard – Have the middle authority higher than operator,only for ACS cloud version. Operator – Have the low authority higher than View Only Operator. View Only Operator – Have the lowest authority. |
| telephone | The telephone number for receiving the SMS notification. | false | String | |
| description | A brief description for the user. | false | String | |
| enableMailNotify | Enable to receive the mail notification when there’s an alarm event be generated. | false | Boolean | |
| enableSmsNotify | Enable to receive the SMS notification when there’s an alarm event be generated. | false | Boolean |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration. | 0 = Fail to update the user information. 1 = Update the user information successfully. |
Example
PATCH /RestfulWebService/rest/users/updateByUserName
PATCH /RestfulWebService/rest/RootGroup/users/updateByUserName
JSON :
{
"enable": true,
"userName":"testUser",
"authentication":"Internal",
"ugroupName":"cloud2",
"enableMailNotify":true,
"enableSmsNotify":true
}
Response
HTTP status : 201
Response :
{
"status" : 1
}
| DELETE | /RestfulWebService/rest/users |
The method search the user by the user ID or username then delete it.
Can not delete user with System Administrator privilege.
URL
/RestfulWebService/rest/users
/RestfulWebService/rest/{groupName}/users
Roles Allowed
System Administrator | Group Administrator
URL Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| userId | The id of the user. | Required if “userName” does not provide. | String | |
| userName | The name of the user. | Required if “userId” does not provide. | String | |
| authentication | The authentication type for the user. | Required if “userName” provide. | String | Internal External |
| ugroupName | The group that the user belong to. | false | String |
Response arguments
This method request has no arguments.
Example
DELETE /RestfulWebService/rest/users?userId=users_1555645052813
DELETE /RestfulWebService/rest/users?userName=testUser&ugroupName=cloud2&authentication=External
DELETE /RestfulWebService/rest/RootGroup/users?userId=users_1555645052813
Response
○ HTTP status : 200
Response :
{
"status":1
}
Wholesale Wizard Service
| POST | /RestfulWebService/rest/wholesalewizards |
The method will create user, user group and network profile via a wizard.
URL
/RestfulWebService/rest/wholesalewizards
/RestfulWebService/rest/{groupName}/wholesalewizards
Roles Allowed
System Administrator
Data Parameters
| Name | Description | Required | Type | Value |
|---|---|---|---|---|
| enable | Enable/Disable the user. | true | Boolean | |
| userName | A name for the new user. | true | String | |
| password | The password for the new user. | true | String | |
| roleName | The role for the new user. | true | String | Group Administrator – Have the middle authority high than “Administrator”. Administrator – Have the middle authority. Standard – Have the middle authority higher than operator,only for ACS cloud version. Operator – Have the low authority higher than View Only Operator. View Only Operator – Have the lowest authority. |
| phone | The telephone number of the user account for receiving the SMS notification. | true | String | |
| The email address of the user account for receiving the email notification. | true | String | ||
| description | A brief description for the user. | true | String | |
| mailNotify | Enable to receive the mail notification when there’s an alarm event be generated. | true | Boolean | |
| smsNotify | Enable to receive the SMS notification when there’s an alarm event be generated. | true | Boolean | |
| ugroupName | The name of the group. | true | String | |
| enableGlobalMailServer | Enable /disable global mail server. | Required if you want to create ugroup. | Boolean | |
| enableExpireDate | Enable/disable the expire date. | Required if you want to create ugroup. | Boolean | |
| expireDate | The expire date for such user group. | Required if you want to create ugroup. | String | 2020/10/22,Date formate : yyyy/MM/dd. |
| nodes | Define number of node that group owns. | Required if you want to create ugroup. | Integer | -1 : No Limit Nodes. |
| licenseType | The type of the license for such group. Only for ACS cloud version. | false | String | Standard – Standard has basic features for dealers to provide monitoring and management to their customers. Premium – All the features in Standard, plus provisioning for CPEs, Reports, User Management and Network Management to provide better services. Ideal for dealers who need multi-tenancy capability. |
| networkId | The id of network.0 means to create new network. | true | Integer | 0 = create new network. |
| parentNetworkId | The id of parent network for new network. | Required if networkId is 0 | Integer | |
| networkName | The name of new network. | Required if networkId is 0 | String | |
| networkUserName | The network username for CPE to authenticate with the ACS server. This parameter allow to set as the empty string if no authentication is required. | Required if networkId is 0 | String | “” = no authentication is required |
| networkPassword | The network password for CPE to authenticate with the ACS server. This parameter allow to set as the empty string if no authentication is required. | Required if networkId is 0 | String | “” = no authentication is required |
| location | The location of network. Empty string is allowed. | Required if networkId is 0 | String |
Response arguments
| Name | Description | Value |
|---|---|---|
| status | A correct response to this method returns an integer enumeration. | 0 = Fail to create user/user group/network. 1 =Create user/user group/network succesfully. |
Example
POST /RestfulWebService/rest/wholesalewizards
POST /RestfulWebService/rest/RootGroup/wholesalewizards
JSON :
{
"userName":"test123",
"password":"test123",
"phone":"12345678",
"email":"support@draytek.com",
"description":"Test usage",
"enable":true,
"mailNotify":false,
"smsNotify":false,
"roleName":"Group Administrator",
"ugroupName":"Draytek",
"enableGlobalMailServer":true,
"enableExpireDate":true,
"expireDate":"2020/10/22",
"nodes":100,
"licenseType":"Premium",
"networkId":0,
"parentNetworkId":2,
"networkName":"Draytek",
"networkUserName" : "draytek",
"networkPassword":"draytekpassword",
"location":"Taiwan"
}
Response
HTTP status : 201
Response :
{
"status":1
}
| DELETE | /RestfulWebService/rest/wholesalewizards/{id} |
The method will delete the networks, devices, and users in the user group, users with system administrator role are not included.
URL
/RestfulWebService/rest/wholesalewizards
/RestfulWebService/rest/{groupName}/wholesalewizards
Roles Allowed
System Administrator
URL Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| id | The id of the user group. | true | Integer |
Response arguments
This method request has no arguments.
Example
DELETE /RestfulWebService/rest/wholesalewizards/3
DELETE /RestfulWebService/rest/RootGroup/wholesalewizards/3
Response
○ HTTP status : 200
Response :
{
"data": [
{
"id": 80,
"category": 1,
"name": "wholesaletest",
"auth": "",
"deleted": "DELETED",
"categoryName": "Network"
},
{
"id": 0,
"category": 2,
"name": "wholesaletest",
"auth": "Internal",
"deleted": "DELETED",
"categoryName": "User"
},
{
"id": 0,
"category": 3,
"name": "wholesaletest",
"auth": "",
"deleted": "DELETED",
"categoryName": "User Group"
}
],
"usergroupName": "wholesaletest",
"length": 3,
"status": 1,
"result": "All operations have been completed successfully."
}