Motia WS/API - CAN Summary By Driver

Craig Marsden
Craig Marsden
  • Updated

This API returns the same data as the CAN Summary By Driver report on the Motia Telematics Portal. This is a summarised version of the CAN-Bus Journey Report grouped by driver rather than vehicle.

 

Service URL

https://ws.mycubo.online/IntegrationService.svc

Service method and input parameters

GetBCANSBDListByUser(string token ,string FromDate, string ToDate)

 

- FromDate –date time (DD/MM/YYYY & HH:MM Format eg 01/01/2022%2000:00)

- ToDate –date time (DD/MM/YYYY & HH:MM Format eg01/01/2022%2023:59)

- Token -By Using below API get the token

(https://ws.mycubo.online/IntegrationService.svc/AuthorizeUser?username=INTG-username&password=INTG-password)

 

Service Response

- ErrorMessage - empty for successful call

- BCANSBD – list of data

 

Sample Response – Invalid Credentials

Request

https://ws.mycubo.online/IntegrationService.svc/GetBCANSBDListByUser?userName=nibcapi&password=nibcap1i&FromDate=01/08/2022%2000:00&ToDate=17/08/2022%2023:59

Response

{

"BCANSBD": null,

"ErrorMessage": "Login failed. Please enter valid username and password."

}

 

Sample Response – Expire or Invalid Token

Request

https://ws.mycubo.online/IntegrationService.svc/GetBCANSBDListByUser?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&FromDate=01/10/2022%2000:00&ToDate=31/10/2022%2023:59&IsShowAll=true

Response

{

    "BCANSBD": null,

    "ErrorMessage": "Token was expired."

}

 

 

Sample Request – Too Many Requests Per Minute

Request

https://ws.mycubo.online/IntegrationService.svc/GetBCANSBDListByUser?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&FromDate=01/10/2022%2000:00&ToDate=31/10/2022%2023:59&IsShowAll=true

Response

{

"BCANSBD": null,

"ErrorMessage": "Last request was 3 seconds ago. Request is allowed once per

60 second period."

}

 

Sample Request – Correct Request

Request

https://ws.mycubo.online/IntegrationService.svc/GetBCANSBDListByUser?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&FromDate=01/10/2022%2000:00&ToDate=31/10/2022%2023:59&IsShowAll=true

Response

{

    "BCANSBD": [

        {

            "Driver_Record": {

                "AdBlueUsed": 0.00,

                "AverageAxleWeight": 0.000000,

                "AverageDrivingMPG": 13.60,

                "AverageMPG": 8.29,

                "AvgDistanceHB": 20.46,

                "CO2": 290.42,

                "DriverCardNo": "DN111129980029",

                "DriverName": "Craig Tacho",

                "DurationDrivingTimeFormatted": null,

                "FirstJourneyStartText": "01/08/2022 08:10",

                "LastJourneyEndText": "17/08/2022 07:14",

                "NOX": 205.000,

                "PM": 3.000,

                "TotalBrakeCount": 555,

                "TotalBrakePercentageHB": "1.80",

                "TotalDistanceTravelled": 204.58,

                "TotalEngineOnTime": 76419,

                "TotalEngineOnTimeText": "21:13",

                "TotalExcessiveIdleTimesText": "13:18",

                "TotalFuelBurnt": 24.67,

                "TotalFuelUsedDriving": 15.05,

                "TotalFuelUsedIdle": 9.63,

                "TotalFuelUsedPTO": 8.86,

                "TotalHarshBrakeCount": 10,

                "TotalIdleTimesText": "15:05",

                "TotalJourneyCount": 20,

                "TotalPTOTimeText": "12:19"

            },

            "Vehicle_Record": [

                {

                    "FriendlyName": "Reg 2",

                    "Registration": "MGZ4429"

                },

                {

                    "FriendlyName": "Reg 3",

                    "Registration": "LRZ8302"

                }

            ]

        },

        {

            "Driver_Record": {

                "AdBlueUsed": 0.00,

                "AverageAxleWeight": 0.000000,

                "AverageDrivingMPG": 14.27,

                "AverageMPG": 13.61,

                "AvgDistanceHB": 3.14,

                "CO2": 16.29,

                "DriverCardNo": "IB0000013CB0E5",

                "DriverName": "[IB0000013CB0E5]",

                "DurationDrivingTimeFormatted": null,

                "FirstJourneyStartText": "01/08/2022 07:56",

                "LastJourneyEndText": "03/08/2022 11:22",

                "NOX": 11.000,

                "PM": 0.000,

                "TotalBrakeCount": 152,

                "TotalBrakePercentageHB": "3.95",

                "TotalDistanceTravelled": 18.83,

                "TotalEngineOnTime": 3114,

                "TotalEngineOnTimeText": "00:51",

                "TotalExcessiveIdleTimesText": "00:00",

                "TotalFuelBurnt": 1.38,

                "TotalFuelUsedDriving": 1.32,

                "TotalFuelUsedIdle": 0.07,

                "TotalFuelUsedPTO": 0.00,

                "TotalHarshBrakeCount": 6,

                "TotalIdleTimesText": "00:12",

                "TotalJourneyCount": 4,

                "TotalPTOTimeText": "00:00"

            },

            "Vehicle_Record": [

                {

                    "FriendlyName": "Lorry 1",

                    "Registration": "IFZ5242"

                }

            ]

        }

    ],

    "ErrorMessage": null

}

Comments

0 comments

Article is closed for comments.