Summary:
Lists Data Access templates used to access the internal DsKernel data, and creates new Data Access templates.
URL:
http(s)://{server hostname}/api/dataAccessTemplates
Methods summary
- GET Method - lists the contents of the specific Data Access template identified in the request.
- PUT Method - modifies an existing Data Access template.
- DELETE Method - removes an existing Data Access template from a server.
GET Method detail
List the contents of the specified Data Access template.
Response:
Detailed information about the Data Access template, according to the Export template syntax section of the Data Access Interface page.
Example:
INPUT
curl -u admin:admin https://localhost/api/dataAccessTemplates/C?media=xml -H "content-type:application/xml"
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dataAccessTemplate type="USER" name="C">
<description>Some description</description>
<object type="DeviceEx" tag="device">
<attribute expression="name" tag="name1"/>
<object type="PortEx" tag="port">
<attribute expression="simple;this.ifDescr" tag="descr"/>
<selector>simple;ref.ports</selector>
<filter></filter>
</object>
<selector>simple;ref.devices</selector>
<filter></filter>
</object>
</dataAccessTemplate>
PUT Method detail
Modifies the existing Data Access Template.
Request:
An XML definition of the template
Response:
The modified Data Access Template. If unsuccessful, a description of the error.
Example:
INPUT
curl -u admin:admin https://localhost/api/dataAccessTemplates/C?media=xml -X PUT -H "content-type:application/xml" -d \
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dataAccessTemplate type="USER" name="C">
<description>Some description</description>
<object type="DeviceEx" tag="device">
<selector>simple;ref.devices</selector>
<filter></filter>
<attribute asElement="false" expression="name"/>
<attribute asElement="false" expression="id"/>
<object type="PortEx" tag="port">
<selector>simple;ref.ports</selector>
<filter></filter>
<attribute asElement="false" tag="descr" expression="simple;this.ifDescr"/>
</object>
</object>
</dataAccessTemplate>'
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dataAccessTemplate type="USER" name="C">
<description>Some description</description>
<object type="DeviceEx" tag="device">
<attribute expression="name" tag=""/>
<attribute expression="id" tag=""/>
<object type="PortEx" tag="port">
<attribute expression="simple;this.ifDescr" tag="descr"/>
<selector>simple;ref.ports</selector>
<filter></filter>
</object>
<selector>simple;ref.devices</selector>
<filter></filter>
</object>
</dataAccessTemplate>
DELETE Method detail
Removes the existing Data Access Template.
Response:
The template after modifications on success, the error description otherwise.
Example:
INPUT
curl -u admin:admin https://localhost/api/dataAccessTemplates/C?media=xml -X DELETE -H "content-type:application/xml"
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<statusInfo>
<message>OK</message>
</statusInfo>
Comments
0 comments
Please sign in to leave a comment.