/reporting/Dps

"/reporting/Dps"
The "/reporting/Dps" endpoint is similar to /reporting/Dp but this endpoint can be used to query multiple data points and the response is a structured JSON object. Also auto-correction is done when providing DPs with missing dot at the end, e.g.: \c ExampleDP_Rpt2 --> \c ExampleDP_Rpt2. See also Example below.
Parameter Description

The first required parameter is the data point name including the system name.

from

The two optional parameters are a timestamp for from and a timestamp for to.

The format of the timestamp is ISO format.

When only the from parameter is given, the API will set the to parameter to the current date and time.

If the parameters from and to are not specified, the online value(s) are queried.

to
count "count" URL parameter. Number of values that should be read out before the "from" and after the "to" time.
jsonCompact

"jsonCompact" URL parameter. The default value is 0. If you set the parameter to 1, the JSON will be returned in a compressed format (output on one line), not "human readable", but slightly less network traffic.

verifyDpExistence

"verifyDpExistence" URL parameter. If you set the parameter to TRUE, the endpoint checks if all provided DPs exist or not. If one of them does not exist, a JSON error object will be returned:

{ "errorText": "description of the error occurred" }

If you set the parameter to FALSE (default), a "data point does not exist" error is returned.

Note: The count can also be set via the config entry dpGetPeriodCount, the JSON format via the config entry jsonCompact and the existence of data points can be checked via the config entry verifyDpExistence. See the section [restReporting] for the config entries. Note that the URL parameter overrides the values set via the config entries.

DPs with two DPs and 'from' parameter:

Request:

https://HOST:443/reporting/Dps?System1:ExampleDP_Rpt1.&System1:ExampleDP_Rpt2.&from=2023-02-13T12:00:00.000Z 

Response:

{
  "generatedBy": "WinCC OA 3.19-P001 @ Windows AMD64",
   "formatVersionMajor": 2,
   "formatVersionMinor": 0,
   "from": "2023-02-13T12:00:00.000Z",
   "to": "2023-02-13T15:00:00.000Z",
    "dps": [
       {
          "DP":"System1:ExampleDP_Rpt1.",
          "result": {
             "returnMessage": "ok",
             "returnCode": 0,
             "data": [
               {
                  "value": 23.0,
                  "timestamp": "2023-02-13T12:01:45.745Z",
                  "statusBits": 9439544818969608449,
                  "manager": "UI -num 1"
               },
               {
                  "value": 41.0,
                  "timestamp": "2023-02-13T12:04:45.746Z",
                  "statusBits": 9439544818971705601,
                  "manager": "UI -num 1"
               },
               // ...
               {
                  "value": 72.0,
                  "timestamp": "2023-02-13T13:09:03.513Z",
                  "statusBits": 9439544818971705601,
                  "manager": "UI -num 1"
               }
            ]
         }
      },
     {
      "DP":"System1:ExampleDP_Rpt2.",
       "result": {
          "returnMessage": "ok",
           "returnCode": 0,
             "data": [
                {
                  "value": 70.0,
                   "timestamp": "2023-02-13T12:01:45.745Z",
                   "statusBits": 9439544818971705601,
                   "manager": "UI -num 1"
                },
                {
                   "value": 55.0,
                   "timestamp": "2023-02-13T12:04:45.746Z",
                   "statusBits": 9439544818969608449,
                   "manager": "UI -num 1"
                },
                {
                   "value": 103.0,
                   "timestamp": "2023-02-13T12:07:45.746Z",
                   "statusBits": 9439544818971705601,
                   "manager": "UI -num 1"
                },
                // ...
                {
                  "value": 26.0,
                   "timestamp": "2023-02-13T13:09:03.513Z",
                   "statusBits": 9439544818969608449,
                   "manager": "UI -num 1"
                }
             ]
          }
       }
   ]
}