Description | Calling this endpoint by providing the type of counting data & query payload object in JSON string to get counting data in JSON format. |
Endpoint |
{CubeHostAddress}/API/v1/load {CubeHostAddress}: https://cube.footfallcam.com (if you're using on-premise solution, please consult FootfallCam Support on the host address) |
Method | POST |
Headers |
|
Body - JSON Example | { "query": { "measures": [ "ThisCubeName.FC01_SUM", "ThisCubeName.FC01_AVG", "ThisCubeName.FC02_SUM", "ThisCubeName.FC02_AVG" ], "timeDimensions": [ { "dimension": "ThisCubeName.Time", "dateRange": [ "2021-10-01T10:00:00.000", "2021-10-31" ], "granularity": "hour" } ], "order": [ [ "ThisCubeName.FC01_SUM", "desc" ] ], "filters": [ { "member": "ThisCubeName.CompanyId", "operator": "equals", "values": [ "1001" ] }, { "member": "ThisCubeName.BranchId", "operator": "equals", "values": [ "2001", "2001" ] }, { "member": "ThisCubeName.BranchName", "operator": "equals", "values": [ "BranchName1", "BranchName2" ] }, { "member": "ThisCubeName.AreaId", "operator": "equals", "values": [ "3001", "3002", "3003" ] } ], "dimensions": [ "ThisCubeName.CompanyId", "ThisCubeName.CompanyName", "ThisCubeName.BranchId", "ThisCubeName.BranchName", "ThisCubeName.AreaId", "ThisCubeName.AreaName" ], "limit" : 50000 } } |
Body Description |
Cube name must be mentioned in payload and its available fields depends on cube selected. Please refer list of cube for cube details
|
Response 1 - JSON Example | { "error": "Continue wait", "stage": { "stage": "Executing query", "timeElapsed": 5003 } } |
Response 1 Description | The 'Continue Wait' response simply an indication that the backend may takes sometime to execute the query and return result. It is not due to failed API call, the query is executing at backend. Retry afterward and the API will return result once the backend finish execute the query. |
Response 2 - JSON Example | { "query": {}, "data": [ { "cube3.CompanyId": "18330", "cube3.CompanyName": "DemoCompany", "cube3.BranchId": "23097", "cube3.BranchName": "UKSite01", "cube3.AreaId": "-1", "cube3.AreaName": null, "cube3.Time.hour": "2022-01-15T11:00:00.000", "cube3.Time": "2022-01-15T11:00:00.000", "cube3.FC01_SUM": 200, "cube3.FC01_MAX": 180, "cube3.FC01_AVG": 100, "cube3.FC01_MIN": 20, "cube3.FC02_SUM": 188, "cube3.FC02_MAX": 171, "cube3.FC02_AVG": 94, "cube3.FC02_MIN": 17 }, { "cube3.CompanyId": "18330", "cube3.CompanyName": "DemoCompany", "cube3.BranchId": "23097", "cube3.BranchName": "UKSite01", "cube3.AreaId": "-1", "cube3.AreaName": null, "cube3.Time.hour": "2022-01-07T15:00:00.000", "cube3.Time": "2022-01-07T15:00:00.000", "cube3.FC01_SUM": 175, "cube3.FC01_MAX": 100, "cube3.FC01_AVG": 87.5, "cube3.FC01_MIN": 75, "cube3.FC02_SUM": 174, "cube3.FC02_MAX": 95, "cube3.FC02_AVG": 87, "cube3.FC02_MIN": 79 }, { "cube3.CompanyId": "18330", "cube3.CompanyName": "DemoCompany", "cube3.BranchId": "23097", "cube3.BranchName": "UKSite01", "cube3.AreaId": "-1", "cube3.AreaName": null, "cube3.Time.hour": "2022-01-15T13:00:00.000", "cube3.Time": "2022-01-15T13:00:00.000", "cube3.FC01_SUM": 171, "cube3.FC01_MAX": 151, "cube3.FC01_AVG": 85.5, "cube3.FC01_MIN": 20, "cube3.FC02_SUM": 166, "cube3.FC02_MAX": 146, "cube3.FC02_AVG": 83, "cube3.FC02_MIN": 20 } ], "lastRefreshTime": "2022-01-19T07:35:41.259Z", "refreshKeyValues": [ [ { "refresh_key": "13688147" } ] ], "usedPreAggregations": {}, "transformedQuery": {}, "requestId": "dda53bef-4d52-4377-aee8-74d2976cafc6-span-1", "annotation": {}, "dataSource": "default", "dbType": "prestodb", "extDbType": "cubestore", "external": false, "slowQuery": false } |
Response 2 Description | Counting data result will be in 'data' section as list of objects, other additional information may be remove in future. |