Discussions

Ask a Question

MIFARE code

Hi, we're facing problems trying to configure keys to control operator access, the MIFARE code seems not to be recognized and the engine cannot be started. Do we have to insert MIFARE code in a specific way in the portal? The id is something like "16D87814". Another question: is it possible to see all the access attempts (also the failed ones) via API or portal? Thanks, Andrea

Javascript example call

I want to call API from client JS code, I've tried different ways to do it, and in most of them I receive CORS error, i.e. <pre> const data = { grant_type: 'password', username, password }; const init = { method: 'POST' , mode: 'cors' , cache: 'no-cache' , credentials: 'same-origin' // include, *same-origin, omit , headers: { 'Content-Type': 'application/json' // 'Content-Type': 'application/x-www-form-urlencoded', } , redirect: 'follow' // manual, *follow, error , referrerPolicy: 'no-referrer' // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url , body: JSON.stringify(data) }; fetch('https://auth.trackunit.com/token', init) .then(response => { if (response.ok) { let resp = response.json(); debugger; console.log(resp); } }) .catch(error => { debugger; console.err(error); }); </pre> I get the error: Access to fetch at 'https://auth.trackunit.com/token' from origin 'http://localhost:62108' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. Changed mode to 'no-cors', the get error 400 - aborted: <pre> const data = { grant_type: 'password', username, password }; const init = { method: 'POST' , mode: 'no-cors' , cache: 'no-cache' , credentials: 'same-origin' // include, *same-origin, omit , headers: { 'Content-Type': 'application/json' // 'Content-Type': 'application/x-www-form-urlencoded', } , redirect: 'follow' // manual, *follow, error , referrerPolicy: 'no-referrer' // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url , body: JSON.stringify(data) }; fetch('https://auth.trackunit.com/token', init) .then(response => { if (response.ok) { let resp = response.json(); debugger; console.log(resp); } }) .catch(error => { debugger; console.error(error); }); </pre> net::ERR_ABORTED 400 Thank you!

Internal Server Error

Hi, I am trying to request https://api.trackunit.com/public/Report/UnitExtendedInfo and https://api.trackunit.com/public/Report/UnitActiveFaults. In both cases I get the response '500 Internal Server Error' without any further information. What I know is the following: The request for https://api.trackunit.com/public/Report/UnitHistory works fine. I am using the same API key for all requests. The parameters are (probably) valid because I can provoke a Missing Parameter, Invalid UnitId and Invalid DateTime combination error. I suspect an authorization issue because I can provoke an internal server error by appending a letter to the API Key when requesting UnitHistory. This would mean something is wrong with the API key I use to request ExtendeInfo/ActiveFaults but I am using the exact same one I use for History. Is Authorization handled differently for these 2 requests? Some leads on where to start troubleshooting would be highly appreciated. Best Regards, Bruno
ANSWERED

Classic API delayed?

Hi, what is the difference between the actual ExtendedInformation API and the Report API? While requesting the ExtendedInformation each 10 Seconds there are often no changes in the values which are returned but requesting the the report data on the same Timeinterval we can see more changes in the ExtendedInformation. So here is the main question: Is not every changed value directly visible in the ExtendedInformation API and is it possible to prevent that while configuring the CAN-Data or do we need to update to the Streaming API to get near real time changes in the CAN-Data?
ANSWERED

Some very basic questions

Hi, We have a customer in common. The customer wants to view data from trackunit equipped assets in our telematics platform YellowFox. We found your interface https://dev.trackunit.com/docs/trackunit-api , which seems to be usable for exactly this purpose. However, a few questions came up. We are interested in querying for historical data, like "last 7 days". Is there a chance to query multiple units at once? With your one unit per request approach, we might run into issues. We learned you apply a request limit of 1 request per 15 minutes. Did we misunderstand something here, and if not: any chance to work around this limit, like "best practices"? Thanks a lot for your help in advance. Peter Stimpel

Problem with SOAP 1.1 & SOAP 1.2 -> GetUnitExtendedInfo

Hello I got some serialization Errors when i get the result List. I tested the API with Postman and found several wrong encoded value's for example: https://api.trackunit.com/public/GetUnitExtendedInfo?id=1521475 can't copy it in here due to wrong encoding. is it possible to query your API to deliver unicode? Thanks

Get Units by customer

Is there a way to fetch units via classic api GetUnits endpoint by filtering by customerId? We are calling the API using the master account token, but the response includes units from all subaccounts and doesn't include the key of the subaccount that a unit belongs to. Thanks!

How to Get Unit Operating and Idle Hours Per Hours within a Specific Date Range.

403 Access Denied from IRIS API

hello, my name is Pancheng Xue and i'm a developer in a construction company in Germany. We've used the "legacy API" of trackunit for a long time and now we want to upgrade diverse Interfaces with your new IRIS API. I followed every step from the instruction on your website (API user created, token created and so on). But i always get 403 Access Denied from the SwaggerHub with my fresh token. I've also tried the "Resource Owner Password" in Postman to get the data i want, still got 403 Access Denied. Could you find out why i'm having credential problem? My client ID: oa56l6gb63cCDbSl357 API Username: TU-API-21136-1

RunOdo

I need the hours from RunOdo, but https://iris.trackunit.com/public/api/machine/machines/142717/activity does not show any runningOdometer. When I use the Classic API (Http) it works. Do you have any issues with the newer Iris API? { "runningHours": 0.0, "runningOdometer": { "distanceUnit": "KM", "distance": 0.0 }, "timeline": { "startTime": "2020-09-16T06:45:20.246481Z", "endTime": "2020-09-17T06:45:20.2466Z", "summarizedHours": 0.0, "summarizedOdometer": { "distanceUnit": "KM", "distance": 0.0 } } } User: 21707 Email: [email protected]