Promotic

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

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

This preconfiguration can be activated when creating a new object (e.g. by "New object ..." in the local object menu or after pressing the Insert key after selecting the object) and is included in the group: "/ Communication / XML, JSON, CSV, text".
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 a 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 parameter "test=1" or "test=2".

The onPageAction event handles receiving and processing data from the client by the "POST" method. The preconfiguration has an example ready to receive data if the client requests the page "test.htm" with the parameter "test=1" or "test=2". 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 tree of Pma objects. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics, 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.23 SCADA system documentation MICROSYS, spol. s r.o.

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