Get datasource data

The /api/DataList/v2 endpoint retrieves data of the datasource within a specified date range and based on the properties set in the call. You can customize your request with parameters, such as dates and granularity. This endpoint has the following characteristics:

  • It can fetch data from up to 10 different datasources in a single call, specifying the granularity and aggregation method.

  • The Grouping field allows to select the nature of the granularity, which can range from minutes to hours or even years.

  • The Granularity field determines the extent of grouping needed to establish a valid granularity, such as 5 minutes or 2 hours.

  • You can select the aggregation type, indicating the mathematical operation the data will use to be grouped in the given granularity.

    Note: if you leave this endpoint blank, the system uses the default aggregation method of the datasource.
    Note: High granularity on a large date range may take some time to bring back data.

To retrieve the data of a datasource, follow these steps:

  1. Go to the Datalist section and find the /api/DataList/v2 endpoint.
    Layer 1
  2. Fill in the corresponding parameters and then click the Try It Out button.
    Layer 1
  3. If the server accepts the token, it returns a "200 HTTP" response and a response body similar to the following one:
    [
      {
        "DataSourceId": 13483,
        "Date": "2023-07-09T00:15:00",
        "Value": 1156.2222000000002
      },
      {
        "DataSourceId": 13483,
        "Date": "2023-07-09T00:30:00",
        "Value": 1154.6184
      },
      {
        "DataSourceId": 13483,
        "Date": "2023-07-09T00:45:00",
        "Value": 1152.8550666666667
      },
      {
        "DataSourceId": 13483,
        "Date": "2023-07-09T01:00:00",
        "Value": 1151.0710666666666
      },
      {
        "DataSourceId": 13483,
        "Date": "2023-07-09T01:15:00",
        "Value": 1149.2292
      },
      {
        "DataSourceId": 13483,
        "Date": "2023-07-09T01:30:00",
        "Value": 1146.2518000000002
      },
      {
        "DataSourceId": 13483,
        "Date": "2023-07-09T01:45:00",
        "Value": 1140.1956
      },
      {
        "DataSourceId": 13483,
        "Date": "2023-07-09T02:00:00",
        "Value": 1138.1038
      }
      ]
    Note: If you get another HTTP Status Code related to an error, check that all data has been added in a proper format. If it has, contact your GPM representative.

You obtain data from the datasource.