Cube API Guide

Video Guide

Step 1: Generate AToken

method: POST
url: https://v9.footfallcam.com/account/GenerateAccessToken
Body(payload):
{
"email": "[email protected]",
"password": "123456",
"expiration": "2024-03-15"
}

After clicking send, you may able to get the AToken in the Body Response.

Step 2: Generate site detail

method: GET
url: https://data.footfallcam.com/api/Sites
Hearder: add the KEYWORD AToken in key, and paste the AToken generated before into value

After clicking send, you can get the BranchId in the Body Response.

Step 3: Call Cube Example

Method: POST
URL: https://cube.footfallcam.com/API/v1/load
Authorization: Bearer Token: {{your access token}}
KEY Content-Type VALUE: application/json
Body:

{
    "query": {
        "measures": [
            "sitearea_footfallcounting_hour.FC01_1_SUM",
            "sitearea_footfallcounting_hour.FC02_1_SUM"
        ],
        "dimensions": [
            "sitearea_footfallcounting_hour.BranchName",
            "sitearea_footfallcounting_hour.Time"
        ],
        "filters": [
            {
                "member": "sitearea_footfallcounting_hour.BranchId",
                "operator": "equals",
                "values": [
                    "6903"
                ]
            },
            {
                "member": "sitearea_footfallcounting_hour.isoperating",
                "operator": "equals",
                "values": [
                    "true"
                ]
            }
        ],
        "timeDimensions": [
            {
                "dimension": "sitearea_footfallcounting_hour.Time",
                "dateRange": [
                    "2023-07-27T00:00:00.000",
                    "2023-07-27"
                ]
            }
        ],
        "order": [
            [
                "sitearea_footfallcounting_hour.BranchId",
                "asc"
            ],
            [
                "sitearea_footfallcounting_hour.Time",
                "asc"
            ]
        ],
        "offset": 0,
        "limit": 100
    }
}

You can get the data in the Body Response after clicking send.

Please refer List of Cube to use other cube and refer Metric Documentation for the metrics.

Updated on April 22, 2024