1 General
This document is compatible with the anynode frontend version 4.12.14 and upwards, which provide an application programming interface (API) with many functions via HTTP requests.
The PowerShell functions from this documentation can be used by importing the anynode PowerShell module. The file is included in the anynode installation. It's location on the file system depends on the operation system. For a Windows installation it will be stored at C:\Program Files\TE-SYSTEMS\anynode frontend\res\powershell . For a Debian/Ubuntu installation the path to the module file is /opt/tesystems/anynodefe/res/powershell .
To import the module use the following code:
Import-Module "anynode_rest_api_powershell.psm1"
All REST request are handled by the anynode frontend. Therefore all request must be directed at the URL and port the anynode frontend is running on. The IP address and port on which REST request are accepted can be configured via the user interface. The options for this can be found in the 'Extras' menu in the 'Web Server->Connectors' tab.
A web server connector is an endpoint on which the web server accepts requests. To use the REST API either an existing connector can be used or a new one can be created. It's important to specifically enable the REST service on the connector, that should be used to access the API.
Authentication
The REST API uses basic access authentication. In order to use the API it is recommended to create a dedicated user. Users can either be created by using the User Management in the anynode frontend user interface (Configuration ModeExtrasUser Management) or this API (section 10).
Session ID
If a user was able to be identified after any kind of request, the HTTP Response will contain the cookie JSESSIONID. This cookie can be used to communicate further with the server, using the same web session.
Query string parameters
Every request has a set of parameters that control how the request works. The following parameters can be set on every request.
-
version
This parameter is mandatory and tells the server which version of the request is to be used. The latest version of a request can be found in this document. The latest version is version 0, if the section of a request doesn't state otherwise.If this parameter is not provided or invalid, the server will respond with the HTTP status 400 - Bad Request.
-
backendName
The backend name unambiguously identifies the backend, which has been configured in the frontend. Each backend consists of a set of services (anynode, anynode monitor, anynode ucma...) that belong together. A standard installation sets the local backend name to "localBackend" by default.
-
keepSession
If true, session resources will be held by the server until the session timeout has been reached.
Query String Parameter Encoding
Some characters are not allowed for query strings and may lead to faulty interpretations and erroneous results. For information about query string encoding refer to the RFC3986 (https://tools.ietf.org/html/rfc3986)