The Xentara Web Service v2.0
User Manual
Model File Format

Table of Contents

See also
The Xentara Model File in the Xentara user manual

JSON Format for Servers

A JSON object describing a Web Service Server has the following syntax:

{
"@Skill.WebService.Server": {
"name": "Web Service",
"UUID": "164b64d9-9cea-4201-a557-8c408b8796c9",
"ACL": { ... },
"portNumber": 8080,
"authentication": {
...
},
"serverCertificate": {
...
},
"endpoints": {
"/api/v1/turbine/start": "Turbine.Start",
"/api/v1/turbine/stop": "Turbine.Stop",
"/api/v1/turbine/temperatures/intake": "Turbine.Temperatures.Intake",
"/api/v1/turbine/temperatures/exhaust": "Turbine.Temperatures.Exhaust"
},
"extraReadAttributes": [
"updateTime",
"writeTime"
]
}
}

Object Members
nameA string value containing the name of the server. The name is used to construct the server’s primary key.
UUIDA string value containing the unique UUID of the server.
ACLAn optional JSON object containing the element ACL of the server. The format of the object is described under JSON Format for ACLs in the Xentara user manual.
portNumberA numeric value containing the TCP port number the server should listen on.
authenticationAn optional JSON object containing the authentication settings for the server. The format of the object is described under JSON Format for HTTP Authentication Settings in the Xentara user manual.
serverCertificate

An optional JSON object containing the paths to the server certificate and private key file for the web service. The format of the object is described under JSON Format for Certificates in the Xentara user manual.

If you do not specify this member, then the global Xentara server certificate will be used.

endpoints

A JSON object containing the list of endpoints. Each member of the object defines a single endpoint.

The name of the member (before the colon) defines the path of the endpoint. The path must be a valid URL path element, and must start with a slash (“/”). The path must not end in a slash (“/”).

The value of the member (after the colon) defines the data point associated with the endpoint. It must be a string value containing the primary key of a Xentara data point.

extraReadAttributes

An optional JSON array containing additional attributes that should be included in the response to read requests. The value and quality attributes are always included authomatically, and must not appear in the array.

It is not considered an error if the data point associated with an endpoint does not provide all of the additional attributes. Any attributes not provided by the data point will simply be omitted from the response. This allows you to include attributes like “writeError” or “writeTime” in this list, that may not be supported by all data points.