The documentation from version 39.5.17 of PLANTA project can be found in the new PLANTA Online Help.

Web Interface Workflow: GET New from DB 39.5.10

Information

  • The following workflow provides basic knowledge required to create an interface in PLANTA project using the functions delivered.
  • The objective of this workflow is a web interface which makes load data available.

Requirements

  • Basic customizing knowledge
  • Basic knowledge of REST

Notes

From DB 39.5.14

  • In order to be able to use the interface, the PLANTA link web services must be activated and configured in the web.conf:
  • If the web services are not activated, the buttons for the execution of different actions for which the web services are required, are not displayed at some positions.
  • NEW Web interfaces use the Fully Qualified Domain Name (FQDN) as an address by default. If it is not available, the host name of the machine is used. If it is not available, the IP of the machine is used. You can define an explicit host name with the planta_link_hostname global setting.

Please pay attention to upper and lower case spelling in all fields in the web interface modules!

From DB 39.5.11

  • In order to be able to use the interface, the PLANTA link web services must be activated and configured in the web.conf:
  • If the web services are not activated, the buttons for the execution of different actions for which the web services are required, are not displayed at some positions.

Please pay attention to upper and lower case spelling in all fields in the web interface modules!

Up to DB 39.5.11

  • In order to be able to use the interface, the PLANTA link web services must be activated and configured:
  • If the web services are not activated, the buttons for the execution of different actions for which the web services are required, are not displayed at some positions.

Please pay attention to upper and lower case spelling in all fields in the web interface modules!

Create Web Entity

Objective

  • To create a web entity which describes our data

Procedure

  • Open the Configuration panel
  • Insert a new entity in the Web Entities submodule
    • via the Insert Web Entity context menu entry
    • or by clicking on the Insert button
  • Specify a name and select table 463 in the Data table field.
  • Insert three web attributes via the Insert Web attribute context menu entry of the newly created web entity
    • DI001395 Project ID
    • DI001516 Task ID
    • DI001519 Load date
    • DI001510 Actual load
  • The Column types are automatically read out and displayed.
  • The name of the attribute is arbitrary but must comply with the Java name conventions for identifiers and must not occur more than once within an entity.
  • For a date, DateTransformer is automatically selected in the Transformer field.
    • You can adjust the parameters of the transformer by clicking on the tool symbol.
      • The DateTransformer enables you to configure the date format.
  • Save.

Create Web Interface

Objective

  • To create a web entity which makes the data available

Procedure

  • Open the Configuration panel
  • Create a new web interface
    • via the Insert Web Interface context menu entry or
    • by clicking on the Insert button
  • Fill the fields as follows:
    • The Name is arbitrary
    • The Active field must be activated before the interface is used.
    • Create a placeholder in the Url field, for example: /load/{resource}
    • Allocate an API key
    • Select the DefaultServiceImplementation GET implementation
    • The entity created newly in the previous step is selected in the Web entity field
  • Save.
  • After you have selected the entity, you can configure the URL-filter by clicking on the tool button.
    • Select data item 001517 Resource in the dialog module and save

Test Web Interface

Objective

  • To test the newly created web interface

Procedure

  • Click on the earth button to open the Test Web Interface module
  • Select GET as HTTP method
  • Enter R1 as a resource
  • Click on the Run button
    • The placeholder in the URL is automatically replaced by the transferred value and the API key is handed on in the HTTP-header.
  • In the Response field, the result of the query is output, which is cut at 3000 characters.

Example return value:

[{"date": "10/13/2016", "prId": "7000", "load": 8.0, "taskId": "1.01"}, {"date": "10/14/2016", "prId": "7000", "load": 10.0, "taskId": "1.01"}, {"date": "10/17/2016", "prId": "7000", "load": 3.0, "taskId": "1.01"}, {"date": "9/30/2016", "prId": "7000", "load": 7.0, "taskId": "1.01"}, {"date”: "10/3/2016", "prId": "7000", "load": 7.0, "taskId": "1.01"}, {"date": "11/24/2016", "prId": "7000", "load": 8.0, "taskId": "3.10"}]

         PLANTA project









 
  • Suche in Topic-Namen

  • Suche in Topic-Inhalten
This site is powered by the TWiki collaboration platform Powered by Perl