Add an OData resource

In this topic, you learn how to define an OData resource and add it to Neptune DXP - Open Edition.

Prerequisites

  • There are no prerequisites.

Procedure

  1. In the Cockpit, select the OData Source tool.

    Result: A table with all the OData sources is shown.

  2. Select Create.

    Result: The Create Source dialog opens.

  3. In Name, enter a meaningful name for the OData resource.

  4. In Endpoint, enter an endpoint for the OData resource.

  5. Select Create.

    Result: You start in the General tab of the OData resource.

  6. In Version, select the version of your OData resource.

  7. In Group, assign the OData resource to a group or package of artifacts.

  8. In Description, enter a meaningful description for the OData resource.

  9. Select any of the following options that fit your OData resource:

    • Allow Untrusted Certificates: Allow self-signed certificates that were added in Proxy Authentication.

    • Enable Proxy: Allow proxy to reach external servers to prevent CORS issues.

    • Use in App Designer: Allow this artifact to be used in the App Designer.

  10. Select Save.

Results

  • Your OData resource is saved with the current settings. The OData Source tool adds an ID to your OData resource and saves change dates.

    You can test your OData resource in the App Designer.
  • Drag and drop the OData Source component in the resources of your application.

  • Select your OData resource.

  • Use an onInit component to get the data to your List ( getODataoList(); ).

  • Set the Model Source of your List to your OData resource.

  • Bind your elements to your desired fields, or use the wizard to autogenerate the elements and bindings to your desired fields.