Telemetry API

API change history

A collection of RESTful JSON-based data operations used to retrieve vehicle and account data from your telematics solution. NOTE: when using OAUTH2.0, add "Bearer " before your token in the Authorization header.

Asset by ID

Gets an Asset by ID (idAsset) and includes Device and Driver information.

Try it

Request

Request URL

Request parameters

  • number

    The unique identifier of the Asset (idAsset).

Request headers

  • string

    ** Authorization Token is Required.

  • string

    ** Required. 3 character Environment Code.

  • string
    Subscription key which provides access to this API. Found in your Profile.

Request body

Responses

200 OK

Representations

{
  "idAsset": 47074,
  "idAsset_Type": 2,
  "idDevice": 51046,
  "Asset_Label": "ACME-0001",
  "Asset_Description": "",
  "Asset_TZ": "-5",
  "Asset_DST": null,
  "Created_By": 4210,
  "Created_On": "2022-01-24T16:53:18.967Z",
  "Icon_Color": 1,
  "Updated_By": 274,
  "Updated_On": "2023-06-09T14:20:06.433Z",
  "TZ_Index": 20,
  "Make": "PETERBILT",
  "Model": "PB337",
  "Year": 2018,
  "Vin": "P01 V14 S0000000",
  "LicensePlate": "DAN 123",
  "EquipmentID": "680001",
  "GPSInstallDate": null,
  "BatteryTypeVoltage": "12",
  "BusinessUnit": null,
  "Division": null,
  "Department": null,
  "Region": null,
  "AssignedTo": null,
  "LocationInfo": null,
  "Status": null,
  "FuelType": "Diesel",
  "ProcurementOption": null,
  "ProcurementInfo": null,
  "InitialCost": null,
  "ExternalID": null,
  "GPSInstallNotes": "Unit installed in rear cabinet behind driver",
  "HarnessType": "Widget",
  "BillingRatePerHour": null,
  "EngineHoursFromEngineBus": false,
  "District": null,
  "idLandmark": null,
  "AcquiredDate": "2023-04-09T00:00:00Z",
  "Installed_By": null,
  "Installer_Updated_By": null,
  "Installer_YellowIron": null,
  "Installer_AntennaType": null,
  "Installer_RelayUsed": null,
  "VehicleClass": null,
  "OdometerSource": "E",
  "SpeedSource": "G",
  "Primary_idAsset": null,
  "EquipmentType": "Widget",
  "EquipmentSubType": "Semi",
  "TankCapacity_ml": 120,
  "FuelEcon_City_kpl": 12,
  "FuelEcon_Hwy_kpl": 16,
  "Engine": null,
  "MSRP": 35000,
  "Style": "4-Door Double Cab 5.0-Foot Bed 4WD 4.0-Liter 6-Cyclinder 5-Speed Automatic",
  "Installer_PO": "Cvdv",
  "GrossVehicleWeightRating": "4 Tons",
  "Installed_By_Name": "Johnny @Smith",
  "InstallType": "Data Cable GPS",
  "Installer_SelfVerify": false,
  "Installer_SelfAssesment": "Odometer at Install: 27,534.65  miles\nEngine Hours at Install: 1,811.4 hours\n",
  "Installer_Vendor_Name": "Harry's",
  "Device": {
    "idDevice": 51046,
    "idDevice_Type": 16,
    "Last_idRaw_Data": 54764377,
    "idCustomer": 56,
    "idCarrier": 3,
    "Created_On": "2022-01-24T22:29:16.167Z",
    "Serial_Nbr": "0016-1345620032",
    "Last_Location_Time": "2023-06-08T17:12:20Z",
    "Last_Communication": "2023-06-08T17:12:20Z",
    "Last_Heading": 186,
    "Configuration_Status": null,
    "Last_Motion_Event": 3,
    "Last_Motion_Time": "2023-06-08T17:11:23Z",
    "In_Motion": false,
    "Carrier1": "AT&T Direct",
    "IMEI": null,
    "Order_Nbr": null,
    "Serial_Number_Displayed": "134562-0032",
    "GPS_Odometer_Offset": 0,
    "GPS_Odometer_Offset_Date": "2023-06-09T14:20:06.807Z",
    "Last_GPS_Odometer": 32436.28,
    "Last_Engine_Odometer": 32436.28,
    "Last_Engine_Time": 2239.59,
    "Last_Fuel_Efficiency": 7.41,
    "RTOS_Image_Version": null,
    "Device_Notes": null,
    "Item_Nbr": null,
    "Last_idEvent_Code": 21,
    "Last_Nearby_Address": "3061 Riverside Ave, Rialto, CA 92377",
    "Last_Landmark_Name": null,
    "Last_RSSI": 11,
    "Last_Satellites": 0,
    "Last_GPS_Speed": 0,
    "Last_Engine_Speed": 0,
    "Last_Posted_Speed": null,
    "Last_Engine_RPM": 51,
    "Last_Coolant_Temp": 88,
    "Last_Battery_Voltage": 12.712,
    "Last_Battery_Percentage": null,
    "Bus_Type": "12-CAN500/J1939",
    "VIN": "2NP2HJ7X2MM732478",
    "Last_Total_Fuel_Used": 4364.39,
    "Last_Total_Engine_Idle_Fuel": 1061.18,
    "Last_Total_Engine_Idle_Time": 1403.2,
    "ICCID": null,
    "Last_Altitude": 0,
    "Last_Fuel_Level_Percent_1": 86,
    "Last_Fuel_Level_Percent_2": null,
    "Last_Engine_Time_Offset": -0.4,
    "Last_Engine_Time_Offset_Date": "2023-05-02T15:40:51.7Z",
    "Last_Engine_Running": false,
    "Last_Battery_Temp": null,
    "Last_Temp_Sensor1": null,
    "Last_idLandmark": null,
    "AssignedToidCustomer": null,
    "DeviceModel": "MC4",
    "SIMNBR": null,
    "idCustomer_Final": null,
    "idDevice_Final": null,
    "DeviceSwapType": null,
    "idDealer_Swappable": null,
    "First_Report_Date": "2022-01-24T22:30:10Z",
    "Last_Event": "Ignition Off",
    "Latitude": 34.0480193,
    "Longitude": -117.3688525,
    "Last_Heading_Cardinal": "S",
    "Last_Location_DateTime_Local": "2023-06-08T12:12:20Z",
    "Last_Location_Time_Local": "12:12 PM CDT",
    "Last_Location_Date_Local": "06/08/2023",
    "Last_Communication_Local": "2023-06-08T12:12:20Z",
    "Device_Type": "MC-4",
    "Days_Since_Start": 500,
    "Estimated_GPS_Odometer": 32436.28,
    "Estimated_Engine_Hours": 2239.19,
    "Last_Nearby_House_Number": "3061",
    "Last_Nearby_Street": "Riverside Ave",
    "Last_Nearby_House_Number_and_Street": "3061 Riverside Ave",
    "Last_Nearby_Locality": "Rialto",
    "Last_Nearby_Region": "CA",
    "Last_Nearby_Postal_Code": "92377",
    "Last_Nearby_County": "San Bernardino County",
    "Last_Nearby_isoCountryCode": "US",
    "Last_JBUS_Data": {
      "vin": "NP2HJ7X2MM73247"
    },
    "Is_Running": false,
    "EngineHoursSource": "E",
    "OdometerSource": "G",
    "SpeedSource": "G",
    "SourceUIEnabled": true,
    "VSSOdometerSourceEnabled": true,
    "CityStatePostal": "Rialto,CA,92377",
    "LatLong": "34.0480193,-117.3688525"
  },
  "Alert_Count": 2,
  "Group_Name": null,
  "User_Specified_Odometer": null,
  "User_Specified_EngineHours": null,
  "User_Specified_Odometer_IsDirty": null,
  "User_Specified_EngineHours_IsDirty": null,
  "Asset_Icon_Full_Path": "images/library/truck-mack-red.png",
  "Asset_idImage": 343,
  "Asset_idImageCustom": null,
  "Hier_ParentAccount_Name": "ACME Ready Mix",
  "Hier_Level2_Name": "North America Region",
  "Hier_Level3_Name": "USA",
  "Hier_Level4_Name": "Iowas",
  "Hier_Level5_Name": "Cedar Rapids",
  "Hier_ParentAccount_Id": 56,
  "Hier_Level2_Id": 2920,
  "Hier_Level3_Id": 2964,
  "Hier_Level4_Id": 3279,
  "Hier_Level5_Id": 3335,
  "Is_Running": false,
  "GroupListCSV": null,
  "Sensor_Count": 0,
  "ListOfGroupIds": null,
  "Created_By_UserName": "5G Tower Admin",
  "Updated_By_UserName": "John @Smith",
  "Driver": {
    "idDriver": 428,
    "idCustomer": 56,
    "idAddress": 4312,
    "idImageCustomDriver": 100668,
    "FirstName": "Joe",
    "LastName": "Driver",
    "EmailAddress": "joedriver@temeda.com",
    "WorkPhone": "8024974916",
    "CellPhone": "111-111-1111",
    "Description": null,
    "Title": "test",
    "Dept": null,
    "Gender": null,
    "EmployeeID": null,
    "DLNumber": "1234",
    "DLState": null,
    "Created_On": "2021-10-01T02:24:45.833Z",
    "Created_By": 274,
    "Updated_On": "2023-05-25T21:38:38.817Z",
    "Updated_By": 274,
    "Enabled": null,
    "FuelCardNumber": null,
    "IsRoutingAndDispatchEnabled": false,
    "idRoutingAndDispatchDriver": null,
    "idUser": null,
    "Address": {
      "idAddress": 4312,
      "Address_Line1": null,
      "Address_Line2": null,
      "Address_Line3": null,
      "Locality": null,
      "Region": null,
      "Postal_Code": null,
      "isoCountryCode": null,
      "idAddress_Type": null,
      "Created_On": null,
      "Created_By": null,
      "Latitude": null,
      "Longitude": null
    },
    "Driver_Icon_Full_Path": "images/library/custom_drivers/56_20220524_050743.jpeg?cache=1653412063631",
    "FullName": "Joe Driver",
    "AssignedAssets": null,
    "AssignedAssetsList": null,
    "Created_By_UserName": null,
    "Updated_By_UserName": null
  },
  "CurrentDriver": "Joe Driver",
  "CurrentIdDriver": 428,
  "FindNearestAssetDistance": null,
  "Is_Valid_Install": null,
  "Primary_Asset_Label": null,
  "CustomData": null,
  "HierarchyidCustomer": 3335,
  "HierarchyLevel": 5,
  "MaintDueCount": null,
  "MaintOverdueCount": null,
  "YearMakeModel": "2018,PETERBILT,PB337",
  "Installer_Latitude": 37.785834,
  "Installer_Longitude": -122.406417
}

Code samples

@ECHO OFF

curl -v -X GET "https://temeda.azure-api.net/telemetry/assets/{id}"
-H "Authorization: "
-H "EnvironmentCode: "
-H "Ocp-Apim-Subscription-Key: {subscription key}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("Authorization", "");
            client.DefaultRequestHeaders.Add("EnvironmentCode", "");
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");

            var uri = "https://temeda.azure-api.net/telemetry/assets/{id}?" + queryString;

            var response = await client.GetAsync(uri);
        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://temeda.azure-api.net/telemetry/assets/{id}");


            URI uri = builder.build();
            HttpGet request = new HttpGet(uri);
            request.setHeader("Authorization", "");
            request.setHeader("EnvironmentCode", "");
            request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
        };
      
        $.ajax({
            url: "https://temeda.azure-api.net/telemetry/assets/{id}?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Authorization","");
                xhrObj.setRequestHeader("EnvironmentCode","");
                xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
            },
            type: "GET",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://temeda.azure-api.net/telemetry/assets/{id}";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"GET"];
    // Request headers
    [_request setValue:@"" forHTTPHeaderField:@"Authorization"];
    [_request setValue:@"" forHTTPHeaderField:@"EnvironmentCode"];
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://temeda.azure-api.net/telemetry/assets/{id}');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Authorization' => '',
    'EnvironmentCode' => '',
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_GET);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Authorization': '',
    'EnvironmentCode': '',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.urlencode({
})

try:
    conn = httplib.HTTPSConnection('temeda.azure-api.net')
    conn.request("GET", "/telemetry/assets/{id}?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Authorization': '',
    'EnvironmentCode': '',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.parse.urlencode({
})

try:
    conn = http.client.HTTPSConnection('temeda.azure-api.net')
    conn.request("GET", "/telemetry/assets/{id}?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://temeda.azure-api.net/telemetry/assets/{id}')


request = Net::HTTP::Get.new(uri.request_uri)
# Request headers
request['Authorization'] = ''
# Request headers
request['EnvironmentCode'] = ''
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body