REST Interface Plugin

The REST Interface allows access to the Nodes of CoDaBix® via HTTP request formatted as an JSON object.
  • Read Nodes (values, optionally historical values, children and properties) from CoDaBix®.
  • Write a new actual value to a specified Node.
  • Create a new Node.

e.g. the following HTTP request is reading the System Nodes Tree of CoDaBix®:

CoDaBix-Request.js
var oIE = WScript.CreateObject("InternetExplorer.Application");
oIE.navigate("about:blank");
var token = oIE.Document.Script.prompt("Enter Token", "1:QqjkQAtk4hyWRnbTt1+dZdGFCg3QE+nS");
 
var request;
try {request = new XMLHttpRequest();}
catch (error) {
   try {request = new ActiveXObject("Msxml2.XMLHTTP");}
   catch (error) {
      request = new ActiveXObject("Microsoft.XMLHTTP");
   }
}
 
request.open("POST", "http://localhost:8181/api/json", false);
request.send('{"tk": "' + token + '", "browse": { "na": "" } }');
 
WScript.Echo(request.responseText);
Supported actions for Nodes:
Action Description
Reading Reads the specified Node.
Browsing Reads the specified Node and the child Nodes.
Writing Writes a new actual value to the specified Node.
  • HTTP Clients supporting HTTP/1.1 and supporting the JSON format
  • Easy connection to other systems
  • Easy read and write access to the Nodes of CoDaBix® using any programming language without additional libraries
  • Linking of CoDaBix® to existing RESTable Software (e.g. SCADA systems)

Documentation of the RESTful API

You can find the documentation of the REST API of the plugin here:

The REST Interface Plugin is an inherent part of CoDaBix® and does not need to be installed.
The REST Interface Plugin currently doesn't provide a configuration.
The REST Interface Plugin provides a status code for functions for diagnostic purposes - see Request & Response of the REST API Documentation.
The REST Interface Plugin does not use the CoDaBix® Entity Model and therefore doesn't provide entities.
The REST Interface Plugin is an inherent part of CoDaBix® and therefore doesn't consist of additional files or folders.

This Document

Date 2017-07-12
Version 1.2

Plugin

Name REST Interface Plugin
Version Corresponds to the CoDaBix® Version

Assembly

The REST Interface Plugin is an inherent part of CoDaBix® and therefore doesn't consist of a separate assembly.