Datacenter User Guide

Version 2.2 | Published May 16, 2024 ©

Rest Webserver

This section provides the steps to configure a Rest Webserver dataset, to poll data from a generic REST provider.

  1. Create a new dataset of type Rest Webserver, specifying a name and (optionally) a prefix to use to identify the dataset and its values, respectively:

    images/download/attachments/149924502/image-2024-1-29_11-7-30.png
  2. Click Add. The dataset is added to the list, and it has an initial WARNING status as it contains no configured endpoints yet.

    images/download/thumbnails/149924502/image-2023-8-16_14-36-40.png
  3. Click on the dataset card and configure the webserver options in the Dataset parameters section of the main UI.
    images/download/attachments/149924502/image-2024-1-29_11-8-11.png

    Info: If the host to connect to does not require a port to be specified, please leave the Port field as zero.

    If needed, use the API Token and Authentication type fields to specify how an API token should be passed in the request:
    images/download/attachments/149924502/image-2024-1-29_11-9-2.png

    • X-API-Key: Embeds the API token in the X-API-Key key of the request header.

    • Custom header key: Embeds the API token in the request header key specified in the Custom Key field.

    • Bearer token: Embeds the API token in the Authorization key of the request header, and prefixes it with "Bearer".

    • Query parameter: Embeds the API token in the query parameter specified in the Custom Key field.

    • Append to base address: Appends the API token to the host address, for example http://my-api-address/<my-api-key>.

      Info: More information on authentication and authorization can be found on the following link: https://swagger.io/docs/specification/authentication/.

  4. Select one or more endpoints from the table in the Dataset configuration panel by double clicking a row. A new endpoint card is then created.
    images/download/attachments/149924502/image-2024-1-29_11-39-54.png
    Alternatively, you can enter a new endpoint by clicking Add new endpoint on the right-side of the panel, and then clicking on the empty endpoint that is added at the bottom of the table to configure it.
    images/download/attachments/149924502/image-2023-8-16_14-6-47.png
    Doing so reveals the new endpoint details, where its properties can be entered.
    images/download/attachments/149924502/image-2024-1-29_11-40-16.png

    Endpoint Options: When adding a new endpoint, parameters (parts of the endpoint whose value should be fetched from other endpoints) should be encapsulated in curly braces: {part_name}. The value inside curly braces is then resolved either using other endpoints present in the Dataset configuration table, or the ones specified in the Endpoint fixed options section of the main view.
    Using as example the images above, when adding a new endpoint "/authors/{authors}", the {authors} option would be resolved by using the endpoint named "authors" in the table to then present the user a dropdown with various authors to configure the newly added endpoint.

  5. Once an endpoint is added to a dataset, you can select the endpoint card, where its properties can be entered. You can now edit the endpoint configuration.

    images/download/attachments/149924502/image-2024-1-29_11-41-10.png
  6. To change the polling rate (how often the remote REST host is polled for data, in seconds) for the dataset, select if from the list and edit the Polling (s) field in the Dataset parameters on the right-side column.

    images/download/attachments/149924502/image_%282%29.png
  7. When done, the data is added to the Dataset output table.

    images/download/attachments/149924502/image-2023-8-16_15-33-20.png

Filter a Dataset

Values read from a file into a dataset can be filtered with the Filtering tool. To do so, select the dataset card, click on the hamburger menu and then press the Filter button.

images/download/attachments/149924502/image-2023-8-16_15-50-40.png

A dialog visualizing the file's payload schema opens, through which a user can filter the source data.

images/download/attachments/149924502/image-2023-8-16_15-51-12.png

Please refer to the Filtering and Manipulating the Dataset Entries page to learn how to enable, disable and edit the entries added.