Motia WS/API - Historic Message

Craig Marsden
Craig Marsden
  • Updated

This API returns the nearest tracking messages (up to 60 minutes before and after) for a list of registrations for a given time/date. This allows you to analyse the data of where a vehicle was at a date/time in the past. 

Service URL

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

Service method and input parameters

GetHistoricAssetList(string token, string StartDateTime, string Reg)

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

- Reg – (xyz,abc) Multiple Reg should be in comma separated

- Token- By Using below api to get the token (Instructions Here)

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

 

Service Response

- ErrorMessage - empty for successful call

- ASSETS – list of data

 

Sample Response – Expired or Invalid Token

Request

https://ws.mycubo.online/IntegrationService.svc/GetHistoricAssetList?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&StartDateTime=31/10/2022%2000:00&Reg=zyx,abc

Response

{

    "ASSETS": null,

    "ErrorMessage": "Token was expired."

}

 

Sample Response – Invalid Credentials

Request

https://ws.mycubo.online/IntegrationService.svc/GetHistoricAssetList?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&StartDateTime=31/10/2022%2000:00&Reg=zyx,abc

Response

{

"ASSETS": null,

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

}

 

Sample Request – Too Many Requests Per Minute

Request

https://ws.mycubo.online/IntegrationService.svc/GetHistoricAssetList?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&StartDateTime=31/10/2022%2000:00&Reg=zyx,abc

Response

{

"ASSETS": 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/GetHistoricAssetList?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS&StartDateTime=31/10/2022%2000:00&Reg=zyx,abc

Response

{

  "Assets": [

    {

      "Active": true,

      "AssetType": "Vehicle",

      "Dealer": "NIBC",

      "DigiCentralTachoMessageUpdated": null,

      "DigiDailyDrive": null,

      "DigiDurationOfNextBreakRest": null,

      "DigiExtendedDriveUsed": null,

      "DigiMaximumDailyDrive": null,

      "DigiReducedRestUsed": null,

      "DigiRemainingBreakRest": null,

      "DigiRemainingDailyDrive": null,

      "DigiRemainingDrive": null,

      "DigiRemainingWeeklyDrive": null,

      "DigiTachoSysCardNumber": null,

      "DigiTimeLeftUntilNextDailyRest": null,

      "DigiTwoWeekDrive": null,

      "DigiWorkState": null,

      "FriendlyName": "Craig Marsden",

      "FuelLevel": 0.00,

      "Heading": 0,

      "IMEI": 864919057695930,

      "Icon": "http:\/\/hub.nibc.co.uk\/markers\/CarBlack.png",

      "LastReceived": "2022-05-12T07:44:35",

      "LastUpdate": "2022-05-12T07:44:06",

      "Latitude": 55.0385956,

      "Location": "Newcastle Airport<\/b>",

      "Longitude": -1.7113066,

      "Odometer": 8728.31000000,

      "Registration": "T777CWM",

      "Speed": 0,

      "Status": "P",

      "TachoDriverID": null,

      "TachoDriverName": null,

      "TachoWorkState": null,

      "TempTag1Name": null,

      "TempTag1Value": 0.0000,

      "TempTag2Name": null,

      "TempTag2Value": 0.0000,

      "TempTag3Name": null,

      "TempTag3Value": 0.0000,

      "TempTag4Name": null,

      "TempTag4Value": null,

      "WorkingHours": null

    }

  ],

  "ErrorMessage": null

}

Comments

0 comments

Article is closed for comments.