LogoLogo
English
English
  • General
    • About this documentation
    • What's new
      • 2025.1
        • 2025.1 U3
        • 2025.1 U2
        • 2025.1 U1
      • 2024.5
        • 2024.5 U1
      • 2024.4
      • 2024.3
  • Products
    • BERNARD Mobility Analyser (BMA)
      • Scope of delivery
      • Data sheet
      • Mounting
    • Mobile BERNARD Mobility Analyser (BMA)
      • Scope of delivery
      • Data sheet
      • Installation
      • Charge battery box
    • BERNARD Character Analyser (BCA)
      • Scope of delivery
      • Datasheet
      • Installation
        • Alignment of the BCA
    • BERNARD Mobility Controller (BMC)
      • Data sheet V2.2
      • Operating instructions V2.2
    • B101 & B401
      • Scope of delivery
      • Data sheet
      • Installation
  • Solution areas
    • Traffic survey
      • Traffic counting
      • Turning movement counting
      • Traffic Flow
    • Adaptive traffic control
    • Parking
      • Barrier-free parking
      • Single space parking
  • Control Center
    • Devices
      • Configuration
        • Object classes
      • Device health
      • Schedule
      • Device monitoring
    • Administration
      • Monitoring alerts
      • License management
      • Device update
      • User management
    • Control center API
      • Data analytics API
  • Data Center
    • Counting
      • Configuration of the survey
      • Data analysis
    • Traffic Flow
      • Configuration of a Traffic Flow survey
      • Data analysis
    • Data Center API
  • Bernard Technologies GmbH
    • Support Center
    • Terms and Conditions
Powered by GitBook
On this page
  • API call
  • Authentication
  • Example of a request
  • Extended documentation
Export as PDF
  1. Control Center
  2. Control center API

Data analytics API

REST API - Access to the underlying data from Data Analytics or the widgets via API

PreviousControl center APINextCounting

Last updated 9 months ago

For each widget in Data Analytics, the underlying data can be queried via a provided . Integration into third-party applications is quick and easy.

API call

As soon as you configure a widget, you will find the API Call item in the side menu. This option is available for every widget.

Execute the call accordingly and test it directly in the dialog box, including the response format, by clicking _Try it out!

The dialog box that appears contains detailed information about what the API call looks like for this widget's data. Copy the code provided and use it as required.

Authentication

Example of a request

Bicycle counting

Below you can see a widget in Data Analytics that is used for bicycle counting. The corresponding widget type (Traffic Counting) has been selected, the data is aggregated per tag, broken down by object class and direction and filtered by bicycles.

API request

The API call shows the corresponding GET request for this data as shown below:

https://example.com/cubejs-api/v1/load?query=
{
   "measures":[
      "CrossingEvents.count"
   ],
   "dimensions":[
      "CrossingEvents.classification",
      "CrossingEvents.direction"
   ],
   "segments":[],
   "filters":[
      {
         "member":"CrossingEvents.streamId",
         "operator":"equals",
         "values":[
            "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
         ]
      },
      {
         "member":"CrossingEvents.classification",
         "operator":"contains",
         "values":[
            "bicycle"
         ]
      },
      {
         "member":"CrossingEvents.lineId",
         "operator":"equals",
         "values":[
            "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
         ]
      }
   ],
   "timeDimensions":[
      {
         "dimension":"CrossingEvents.timestamp",
         "granularity":"day",
         "dateRange":"This week"
      }
   ],
   "order":{}
}

API-Response:

{
  "queryType": "regularQuery",
  "results": [
    {
      "query": {...},
      "data": [
        {
          "CrossingEvents.classification": "bicycle",
          "CrossingEvents.direction": "in",
          "CrossingEvents.timestamp.day": "2021-11-02T00:00:00.000",
          "CrossingEvents.timestamp": "2021-11-02T00:00:00.000",
          "CrossingEvents.count": "235"
        },
        {
          "CrossingEvents.classification": "bicycle",
          "CrossingEvents.direction": "out",
          "CrossingEvents.timestamp.day": "2021-11-02T00:00:00.000",
          "CrossingEvents.timestamp": "2021-11-02T00:00:00.000",
          "CrossingEvents.count": "234"
        },
        {
          "CrossingEvents.classification": "bicycle",
          "CrossingEvents.direction": "in",
          "CrossingEvents.timestamp.day": "2021-11-03T00:00:00.000",
          "CrossingEvents.timestamp": "2021-11-03T00:00:00.000",
          "CrossingEvents.count": "203"
        },
        {
          "CrossingEvents.classification": "bicycle",
          "CrossingEvents.direction": "out",
          "CrossingEvents.timestamp.day": "2021-11-03T00:00:00.000",
          "CrossingEvents.timestamp": "2021-11-03T00:00:00.000",
          "CrossingEvents.count": "249"
        }
      ],
      "annotation": {...}
    }
  ],
  "pivotQuery": {...}
}

Extended documentation

This access token is temporary. For permanent integration in third-party applications, you need a permanent token. Please contact our .

We strictly adhere to the OAuth flow documented by Microsoft. There are several that you can use.

The REST API is based on _Cube.js_. You can find more information and details about this and how it works in general in this .

Curl command
Support
Client Libraries
external documentation
REST API
Historic Parking Utilization Widget
API Call
Bike count widget