Generic REST Data Providers

Due to the specifics of the generic REST data services, Unite UX Studio supports the data provider regardless of the framework your web project uses.

Every data source for the CRUD data operations defines its own endpoint. The data provider supports a base URL so that you can define an endpoint for each data source and each CRUD data operation.

Currently, the Studio does not support hierarchy for the generic REST data provider and has no schema of the data it contains. This means that you can call the data service but cannot relate the data sources through the Studio. To establish the relation between the data, you have to manually add all data fields—for example, set the types and editors.

Getting Started

To set up a generic REST data provider:

  1. On the Dashboard, click the card (or list item) of the application to open the App Design page.
  2. On the App Design page, click Add Data Provider. As a result, the Add Data Provider dialog box appears.
  3. Select the Generic REST data provider.
  4. In Name, provide the name of the data provider.
  5. In Base URI, enter a base URI which is the root URI of a REST service. For example, http://Your-IP-Address:8980/api.
  6. In Authentication Type, select the security model for the service and catalog URI. The model has to match the authentication model of the web application (web server) which provides the data object service. For more information, refer to the article on authentication.

    • None—Indicates that the provider data is not protected by authentication.
    • OpenID Connect—Indicates that the provider data is through an identity layer on top of the OAuth 2.0 protocol.
    • OAuth 2.0—Indicates that provider data is protected for authorization through the OAuth 2.0 protocol.
    • Basic—Indicates that the provider data is protected with a username and a password that are required when the user makes a request.
    • API Key—Indicates that the provider data is protected with an API key token that is required when the user makes API calls.
  7. Click Add Data Provider to save the settings of the data provider and close the Add Data Provider dialog box. As a result, the App Design page displays the card for the newly added data provider.

Using Mock Data Providers

When you first create your application, you might choose to relate it to a data provider that will not be the real data provider for the published application. To override the test URL of that data provider:

  1. Generate the application.
  2. For Angular, navigate to ../app/src/environments/ and update the file you need.

    For React, navigate to ../app/.env or any other of the .env files and set the REACT_APP_CONFIG_PATH configuration. By default, its default value is ../config.json and the application loads the configuration settings from the config.json file in the public directory. To update the default configuration, for example, set REACT_APP_CONFIG_PATH='../someConfig.json' and add a someConfig.json file to the public folder which will only be used in this specific environment.

In this article
Not finding the help you need?