1 General

This is the documentation for the anynode Powershell module. The Powershell module can be utilzed to administrate anynode via the REST-API. It is compatible with the anynode frontend version 4.10.18 and upwards.

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.

Webserver Connectors Menu
Figure 1 navigating to the web server connector menu

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.

REST Connector
Figure 2 activating REST services on the connector

To access the REST-API through the Powershell module it is necessary that your system trusts the anynode webserver's certificate. That can either be achieved by using a certificate that is signed by a trusted CA or adding the certificate to the truststore of your system. The Get-anynodeWebserverCertificate function can also be used to add the certificate to the trusted list of the Powershell session.

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).

User Management Menu
Figure 3 navigating to the user management menu

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.

  • Address

    This parameter needs to point to the address of the anynode instance. To skip entering the parameter for every command the Initialize-anynodeAddress command can be used.

  • Port

    This parameter needs to point to the port of the anynode instance. To skip entering the parameter for every command the Initialize-anynodePort command can be used.

  • APIVersion

    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.

  • Credential

    If this parameter is supplied with a username Powershell will prompt for the corresponding password when it processes the command to authenticate. The Initialize-anynodeCredential command can be used to set default credentials for the Powershell session.

  • Username

    The username of the initiating user. This can be used in combination with the Password parameter to authenticate.

  • Password

    The password of the initiating user. This can be used in combination with the Username parameter to authenticate.