DLI ISO32 Object Model Reference
|
object | cred/ |
Security attributes of agent performing request |
This object contains the following items:
name | Client username, if any |
is_admin | Administrative user |
outlet_access | Outlet access permissions |
agent | Agent identifier |
ip_address | Client IP address, if any |
Sample curl
write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "{\"ip_address\":\"192.168.0.7\",\"is_admin\":true,\"name\":\"admin\",\"agent\":\"web ui\",\"outlet_access\":[true,true,true,true,true,true,true,true]}" "http://192.168.0.100/restapi/cred/"
Sample curl
read command:
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/cred/"
⇒
{"ip_address":"192.168.0.44","is_admin":true,"name":"admin","agent":"web ui","outlet_access":[true,true,true,true,true,true,true,true]}
sum (optional string) | cred/name/ |
Username of the client, as verified by the agent, if any |
This sum does not support direct modification.
This sum can assume the following values:
constant null | Username absent or unknown | Username could not be obtained | |
string | Client username | Username of the client, as verified by the agent |
Sample curl
read command:
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/cred/name/"
⇒
"admin"
Sample requests
read command:
print(requests.get('http://192.168.0.100/restapi/cred/name/',auth=auth,headers=headers).json())
⇒
'admin'
sum (boolean) | cred/is_admin/ |
Flag indicating whether the user is an administrator |
This sum does not support direct modification.
This sum can assume the following values:
constant true | Administrator | The user is an administrator | |
constant false | Regular user | The user is a regular user |
Sample uom
library read command:
print(uom.dump(uom.cred.is_admin))
⇒
true
Sample JS request
read command:
request.get({url:"cred/is_admin/"},function(error,response,body) {console.log(body)});
⇒
true
sum (variant) | cred/outlet_access/ |
Access settings for outlets |
The value is subject to the following constraints: any of the following is true:
true
false
This sum is composite, i.e. is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
constant true | Full | State of all outlets can be manipulated by the user | |
constant false | None | Outlet states cannot be neither seen nor manipulated by the user | |
array | Outlet access levels | Access levels per outlet |
Sample JS request
read command:
request.get({url:"cred/outlet_access/"},function(error,response,body) {console.log(body)});
⇒
[true,true,true,true,true,true,true,true]
Sample requests
read command:
print(requests.get('http://192.168.0.100/restapi/cred/outlet_access/',auth=auth,headers=headers).json())
⇒
[True, True, True, True, True, True, True, True]
See also Outlet access permissions: Outlet access levels
(possibly) array | cred/outlet_access/ |
Access levels per outlet |
This array is a part of a composite value which is modified as a whole.
This array contains Outlet access elements.
Creating elements in this collection is not supported.
sum (boolean) | cred/outlet_access/N/ |
Access level for outlet by index |
The value is subject to the following constraints: outlets[index of the value]
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
constant true | Full | Outlet state can be manipulated by the user | |
constant false | None | Outlet state cannot be neither seen nor manipulated by the user |
Sample uom
library read command (note that _outlet_access_index
is a variable):
print(uom.dump(uom.cred.outlet_access[_outlet_access_index]))
⇒
true
Sample JS request
read command (note that _outlet_access_index
is a variable):
request.get({url:"cred/outlet_access/"+_outlet_access_index.toString()+"/"},function(error,response,body) {console.log(body)});
⇒
true
string | cred/agent/ |
Identifier of the agent performing request |
This string does not support direct modification.
Sample curl
read command:
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/cred/agent/"
⇒
"web ui"
Sample requests
read command:
print(requests.get('http://192.168.0.100/restapi/cred/agent/',auth=auth,headers=headers).json())
⇒
'web ui'
sum (optional string) | cred/ip_address/ |
IPv4 address of the client performing request, if any |
This sum does not support direct modification.
This sum can assume the following values:
constant null | Client IP address absent or unknown | The request is performed locally, or its origin is unknown | |
string | Client IP address | IPv4 address of the client performing request | the value matches ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$ |
Sample CLI read command:
uom get "cred/ip_address"
⇒
"192.168.0.27"
Sample curl
read command:
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/cred/ip_address/"
⇒
"192.168.0.20"