Promotic

Preconfiguration "REST API - Server - receive or send (GET, POST)"

The REST API server to receive and process or send data by methods POST and GET

This preconfiguration can be activated when creating a new object (e.g. by "New object ..." in the local object menu or by pressing the Insert key after selecting the object) and is included in the group: "/ Communication / Protocols and other communications / REST API".
This preconfiguration can be created in the object: PmaFolder or PmaRoot.

- The preconfiguration creates an object of the PmaFolder type containing PmaFolder, PmaWeb, PmaWebDir, PmaData and PmaPanel objects.
- The preconfiguration is created including the panel (object of the PmaPanel type) is functional also as Web panel.


The PmaWebDir object has the events onPageAction and onPageModify.

The onPageModify event handles sending data to the client based on the requested page and also the parameter specified in the URL address. The preconfiguration has an example ready there to send data if the client requests the page "test.htm" with the "test=1" or "test=2" parameter.

The onPageAction event handles receiving and processing data from a client by the "POST" method. The preconfiguration has an example ready to receive data if the client requests the page "test.htm" with the "test=1" or "test=2" parameter. The GET, PUT and DELETE methods are not handled here.
These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the Pma objects tree. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and the first character must not be a number.
Default: "REST_Server"
Port numberPort number on which this server will expect incoming messages
Enabling the test panel for the Web

History:
Pm9.00.20: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.