DLI EPCR5 Object Model Reference
20210317T161408Z
DLI Controller API
object
The set of objects that comprise the controller's API
dot_inline_dotgraph_690.png

This is an automatically generated document describing the object model and containing samples interacting with it.

It is advised that you use the latest curl version to interact with the object model. In particular, some versions are known not to implement digest authentication correctly.Sample curl request path URI template arguments are string keys or 0-based integer indices of the entities involved. Template arguments need URL-encoding. Matrix URIs are supported.

The uom command-line utility is available in firmware versions 1.8.1.0 and above.Its sample request path shell variables are string keys or 0-based integer indices of the entities involved. Strings might need URL-encoding if they contain a slash ('/') or a percent sign ('').

The Python requests module samples assume the following preamble:

from __future__ import print_function
import requests
from requests.auth import HTTPDigestAuth
headers = {'accept': 'application/json','content-type': 'application/json','prefer': 'return=minimal','x-csrf': 'x'}
auth = HTTPDigestAuth('admin', '1234')

Python requests sample request path variables are string keys or 0-based integer indices of the entities involved. Template arguments need URL-encoding. Matrix URIs are supported.

The JavaScript request module samples assume that you require https://github.com/request/request or an API-compatible alternative like https://github.com/postmanlabs/postman-request and use the following preamble:

var request=require("request").defaults({baseUrl: "http://192.168.0.100/restapi/", auth: {user: "admin", pass: "1234", sendImmediately: false}, json: true, headers: {"X-CSRF": "x", "Prefer": "return=minimal" }});

Alternately you can supply the defaults enumerated on each request.JavaScript request sample path variables are string keys or 0-based integer indices of the entities involved. Template arguments need URL-encoding. Matrix URIs are supported.

The Lua uom module is available in firmware versions 1.8.1.0 and above.Lua uom module samples assume the following preamble:

local uom=require("uom")
local null=uom.null

Lua uom module sample request path variables are string keys or 1-based integer indices of the entities involved.

This object contains the following items:

relayRelay object
authAuthentication server object
configConfiguration server object
networkNetwork configuration data
notificationEvent notification server object
autopingAutoping server object
scriptScripting server object
snmpSNMP server object
upnpUPnP server object
mqttMQTT client object
meterMeter server object
rendererRenderer object
credCredentials

Sample JS request read command:

request.get({url:""},function(error,response,body) {console.log(body)});

<...>

Sample curl read command:

curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/"

...

Browse more samples