Security
This section describes the JSON API for account configuration, certificate installation and usage configuration.
status.json
GET api/security/status/status.json
This object is used to get general security status information.
Response data:
Name | Data Type | Note |
|---|---|---|
storage:total | Integer | Number of bytes totally available for security content storage |
storage:free | Integer | Number of bytes currently available for security contents storage |
JSON response example:
{"storage":
{
"total":241664,
"free":151552
},
{
"device_certificates":
"slots":16,
"free":15
}
}
accounts.json
GET api/security/status/accounts.json
This object is used to receive an array of all configured accounts.
Response data:
Name | Data Type | Note |
|---|---|---|
username | String | Account username |
role | String | Account role |
JSON response example:
{
"<username1>":{"role" : "account1 role" },
"<username2>":{"role" : "account2 role" },
,,,
"<usernameN>":{"role" : "accountX role" },
}addfirstaccount.json & addaccount.json
GET api/security/config/addfirstaccount.json?
Username=<username>&Password=<password>&Role=<role>
GET api/security/config/addaccount.json?
Username=<username>&Password=<password>&Role=<role>The function addfirstcount.json is used from a “first run page” to create the first user account. It will only be accepted if no previous accounts exist.
The function addaccount.json is used to add a user account.
Request data:
Name | Data Type | Note |
|---|---|---|
Username | String | Account username (see Account Configuration) |
Password | String | Account password (see Account Configuration) |
role | String | Account role (see Account Configuration) |
JSON success response example:
{
"result" : 0
}
JSON failure response example:
Name | Data Type | Note |
|---|---|---|
result | Integer | The result of the operation (0 = success) |
errordesc | String | A readable description of the fault. Included in case of error. |
{
"result" : x,
"errordesc" : "Failure description"
}
deleteaccount.json
GET api/security/config/deleteaccount.json?Username=<username>
This function deletes a user account.
Request data:
Name | Data Type | Note |
|---|---|---|
Username | String | User name of account to delete (see Account Configuration) |
JSON success response example:
{
"result" : 0
}
JSON failure response example:
Name | Data Type | Note |
|---|---|---|
result | Integer | The result of the operation (0 = success) |
errordesc | String | A readable description of the fault. Included in case of error. |
{
"result" : x,
"errordesc" : "Failure description"
}
protocolinfo.json
GET api/security/status/protocolinfo.json
This function is used to get information about number of certificates that can be configured for each supported security protocol.
JSON response example:
{
"https" : { "max_certs" : 2 },
…
"protocol_x" : { "max_certs" : 1 }
}