Back to Devexpress

Connect to a JSON Endpoint

reportserver-401240-administrative-panel-manage-data-models-connect-to-json.md

latest1.4 KB
Original Source

Connect to a JSON Endpoint

  • Jun 30, 2023

Use the steps described below to connect a data model to a JSON endpoint.

Administrative Panel

  1. Click Data Models on the Report and Dashboard Server’s toolbar to switch to the data models view.

  2. Click Add Data Model to invoke the New Data Model dialog.

  3. Define the data model’s name and description.

  4. Set the data provider to JSON.

  5. Specify the JSON endpoint’s URI.

  6. You can also specify HTTP request options (authentication credentials, URL parameters and HTTP headers).

Specify Trusted Locations/Resources

Default configuration of the DevExpress Report and Dashboard Server prohibits UI controls from downloading remote data. This prevents Server Side Request Forgery (SSRF) attacks against Report and Dashboard Server applications.

  1. Open the GlobalSetting table in the Report and Dashboard Server database.
  2. Add an entry composed of a TrustedLocations key and comma-separated list of trusted locations or resources:
sql
INSERT INTO [GlobalSetting] ([Key], [Value], [OptimisticLockField]) VALUES ('TrustedLocations', 'https://example.com/data/, https://otherserver.example/products.json', 0)
  1. Restart the web server to apply new settings.

Check Configuration

The created data model appears in the list. Select the model to see its details.

Click Edit to change connection settings.