Users/Login
Log in to get additional access rights.
Request
- Username - string - the user name
- Password - string - password
Response
- UserEdit - boolean - true if this user can edit user accounts
- Editor - boolean - true if this user can access the editor
- Diag - boolean - true if this user can access the diagnostics
- AuthKey - string - session id to reactivate this login later; this has a limited lifetime after websocket stop
Example
in:
{
"function": "Users/Login",
"id": "some-text-or-number",
"data": {
"Username": "john",
"Password": "doe"
}
}
out:
{
"function": "Users/Login",
"id": "some-text-or-number",
"status": 0,
"data": {
"Groups": ["users", ...],
"UserEdit": false,
"Editor": true,
"Diag": true,
"Username": "john",
"AuthKey": "abcdef"
}
}
Users/ActivateSession
Activate a previous login session.
Request
- AuthKey - string - the session key previously got from Users/Login
Response
- UserEdit - boolean - true if this user can edit user accounts
- Editor - boolean - true if this user can access the editor
- Diag - boolean - true if this user can access the diagnostics
- Username - string - the user name
Example
in:
{
"function": "Users/ActivateSession",
"id": "some-text-or-number",
"data": {
"AuthKey": "xyzabc"
}
}
out:
{
"function": "Users/ActivateSession",
"id": "some-text-or-number",
"status": 0,
"data": {
"Groups": ["users", ...],
"UserEdit": false,
"Editor": true,
"Diag": true,
"Username": "john"
}
}
Users/AccessRights
Fetch the current access rights. These values are also returned for "Users/Login" and "Users/ActivateSession", so this operation is mainly useful for getting the anonymous rights
Request
empty
Response
- UserEdit - boolean - true if this user can edit user accounts
- Editor - boolean - true if this user can access the editor
- Diag - boolean - true if this user can access the diagnostics
- Username - string - the user name
Example
in:
{
"function": "Users/AccessRights",
"id": "some-text-or-number",
"data": {
}
}
out:
{
"function": "Users/AccessRights",
"id": "some-text-or-number",
"status": 0,
"data": {
"Groups": ["users", ...],
"UserEdit": false,
"Editor": true,
"Diag": true,
"Username": "john"
}
}
Users/List
List all user accounts.
Request
empty
Response
- Results - array of object - results
- Username - string - the user name; empty for anonymous user
- Password - boolean - true if a password is set; for security reasons, the password won't be transferred back
- UserEdit - boolean - true if this user can edit user accounts
- Editor - boolean - true if this user can access the editor
- Diag - boolean - true if this user can access the diagnostics
- Groups - array of string - the list of groups that this user is a member of
- Items - array of object - the list of items that this user has access to
- Itemname - string - the item name (or prefix)
- Prefix - boolean - true if Name should be interpreted as a prefix
- Write - boolean - true if the item(s) can be written
Example
in:
{
"function": "Users/List",
"id": "some-text-or-number",
"data": {
}
}
out:
{
"function": "Users/Login",
"id": "some-text-or-number",
"status": 0,
"data": {
"Results": [
{"Username": "john",
"Password": true,
"UserEdit": false,
"Editor": true,
"Diag": truem
"Groups": [ "group1", "group2" ],
"Items": [
{ "Itemname": "Objects.Server.ServerStatus.CurrentTime", "Prefix": false, "Write": false },
...
]
}, ...
]
}
}
Users/ListGroup
List all user groups.
Request
empty
Response
- Results - array of object - results
- Groupname - string - the group name
- UserEdit - boolean - true if users in this group can edit user accounts
- Editor - boolean - true if users in this group can access the editor
- Diag - boolean - true if users in this group can access the diagnostics
- Items - array of object - the list of items that users in this group have access to
- Itemname - string - the item name (or prefix)
- Prefix - boolean - true if Name should be interpreted as a prefix
- Write - boolean - true if the item(s) can be written
Example
in:
{
"function": "Users/ListGroup",
"id": "some-text-or-number",
"data": {
}
}
out:
{
"function": "Users/Login",
"id": "some-text-or-number",
"status": 0,
"data": {
"Results": [
{"Groupname": "users",
"UserEdit": false,
"Editor": true,
"Diag": true,
"Items": [
{ "Itemname": "Objects.Server.ServerStatus.CurrentTime", "Prefix": false, "Write": false },
...
]
}, ...
]
}
}
Users/Write
Write an user account.
Request
- Username - string - the user name; empty for anonymous user
- Password - boolean or string; optional - true or missing to keep the current password; false to clear the password; string to set a new password
- UserEdit - boolean - true if this user can edit user accounts
- Editor - boolean - true if this user can access the editor
- Diag - boolean - true if this user can access the diagnostics
- Groups - array of string; optional - the list of groups that this user is a member of
- Items - array of object; optional - the list of items that this user has access to
- Itemname - string - the item name (or prefix)
- Prefix - boolean - true if Name should be interpreted as a prefix
- Write - boolean - true if the item(s) can be written
Response
empty
Example
in:
{
"function": "Users/Write",
"id": "some-text-or-number",
"data": {
"Username": "john",
"Password": "doe",
"UserEdit": true,
"Editor": true,
"Diag": true,
"Groups": [ "group1", "group2", ...]
"Items": [
{ "Itemname": "Objects.Server.ServerStatus.CurrentTime", "Prefix": false, "Write": false },
...
]
}
}
out:
{
"function": "Users/Write",
"id": "some-text-or-number",
"status": 0,
"data": {
}
}
Users/WriteGroup
Write an user group.
Request
- Groupname - string - the group name
- UserEdit - boolean - true if this user can edit user accounts
- Editor - boolean - true if users in this group can access the editor
- Diag - boolean - true if users in this group can access the diagnostics
- Items - array of object; optional - the list of items that this user has access to
- Itemname - string - the item name (or prefix)
- Prefix - boolean - true if Name should be interpreted as a prefix
- Write - boolean - true if the item(s) can be written
Response
empty
Example
in:
{
"function": "Users/WriteGroup",
"id": "some-text-or-number",
"data": {
"Groupname": "group1",
"UserEdit": true,
"Editor": true,
"Diag": true,
"Items": [
{ "Itemname": "Objects.Server.ServerStatus.CurrentTime", "Prefix": false, "Write": false },
...
]
}
}
out:
{
"function": "Users/WriteGroup",
"id": "some-text-or-number",
"status": 0,
"data": {
}
}
Users/Delete
Delete an user account.
Request
- Username - string - the user name; empty for anonymous user
Response
empty
Example
in:
{
"function": "Users/Delete",
"id": "some-text-or-number",
"data": {
"Username": "john"
}
}
out:
{
"function": "Users/Delete",
"id": "some-text-or-number",
"status": 0,
"data": {
}
}
Users/DeleteGroup
Delete an user group.
Request
- Groupname - string - the group name
Response
empty
Example
in:
{
"function": "Users/DeleteGroup",
"id": "some-text-or-number",
"data": {
"Groupname": "john"
}
}
out:
{
"function": "Users/DeleteGroup",
"id": "some-text-or-number",
"status": 0,
"data": {
}
}