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.

Assets by Group ID

Gets Assets by Group ID (idGroup) and includes Device and Driver information.

Try it

Request

Request URL

Request parameters

  • string

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": 3492,
    "idAsset_Type": 2,
    "idDevice": 1768,
    "Asset_Label": "Charles Truck",
    "Asset_Description": "",
    "Asset_TZ": null,
    "Asset_DST": null,
    "Created_By": 0,
    "Created_On": "2017-06-15T14:57:11.263",
    "Icon_Color": 7,
    "Updated_By": 274,
    "Updated_On": "2017-09-20T09:52:22.27",
    "TZ_Index": 20,
    "Make": "Honda",
    "Model": "CR-V",
    "Year": 2008,
    "Vin": "5J6RE48538L031053",
    "LicensePlate": "A656639",
    "EquipmentID": "",
    "GPSInstallDate": "2017-06-15T00:00:00",
    "BatteryTypeVoltage": "12",
    "BusinessUnit": null,
    "Division": null,
    "Department": null,
    "Region": null,
    "AssignedTo": null,
    "LocationInfo": null,
    "Status": null,
    "FuelType": "Gasoline",
    "ProcurementOption": null,
    "ProcurementInfo": null,
    "InitialCost": null,
    "ExternalID": null,
    "GPSInstallNotes": "",
    "HarnessType": "Standard OBD II Y-Cable with Scan Tool Detect",
    "BillingRatePerHour": null,
    "EngineHoursFromEngineBus": false,
    "District": null,
    "idLandmark": null,
    "AcquiredDate": null,
    "Installed_By": 3342,
    "Installer_Updated_By": null,
    "Installer_YellowIron": false,
    "Installer_AntennaType": null,
    "Installer_RelayUsed": false,
    "VehicleClass": null,
    "OdometerSource": "G",
    "SpeedSource": "G",
    "Primary_idAsset": null,
    "Device": {
      "idDevice": 1768,
      "idDevice_Type": 2,
      "Last_idRaw_Data": 23083700,
      "idCustomer": 56,
      "idCarrier": 1,
      "Created_On": "2017-06-15T17:28:18.743",
      "Serial_Nbr": "0002-1132810029",
      "Last_Location_Time": "2018-03-12T13:04:45",
      "Last_Communication": "2018-03-12T13:04:45",
      "Last_Heading": 139,
      "Last_Motion_Event": 3,
      "Last_Motion_Time": "2018-03-12T13:04:30",
      "In_Motion": false,
      "Order_Nbr": null,
      "Serial_Number_Displayed": "113281-0029",
      "GPS_Odometer_Offset": 140399.76656641852,
      "GPS_Odometer_Offset_Date": "2017-09-20T09:51:59.017",
      "Last_GPS_Odometer": 11290.715448568979,
      "Last_Engine_Odometer": null,
      "Last_Engine_Time": 345.62416666666667,
      "Last_Fuel_Efficiency": null,
      "RTOS_Image_Version": "2.192.25",
      "Last_idEvent_Code": 21,
      "Last_Nearby_Address": "2244 95th St, Naperville, IL 60564",
      "Last_Landmark_Name": "TeMeDa HQ",
      "Last_RSSI": 22,
      "Last_Satellites": 7,
      "Last_GPS_Speed": 0.0,
      "Last_Engine_Speed": 0.0,
      "Last_Posted_Speed": null,
      "Last_Engine_RPM": 716,
      "Last_Coolant_Temp": 190,
      "Last_Battery_Voltage": 12.936,
      "Last_Battery_Percentage": null,
      "Bus_Type": "8-CAN 500 29-bit",
      "VIN": "5J6RE48538L031053",
      "Last_Total_Fuel_Used": null,
      "Last_Total_Engine_Idle_Fuel": null,
      "Last_Total_Engine_Idle_Time": null,
      "Last_Altitude": 659.44881889763781,
      "Last_Fuel_Level_Percent_1": 73.0,
      "Last_Fuel_Level_Percent_2": null,
      "Last_Engine_Time_Offset": 2000.0,
      "Last_Engine_Time_Offset_Date": "2017-09-20T09:52:22.29",
      "Last_Engine_Running": false,
      "Last_Battery_Temp": null,
      "Last_Temp_Sensor1": null,
      "Last_Event": "Ignition Off",
      "Latitude": 41.709505,
      "Longitude": -88.190575,
      "Last_Heading_Cardinal": "SE",
      "Last_Location_DateTime_Local": "2018-03-12T08:04:45",
      "Last_Location_Time_Local": "8:04 AM CDT",
      "Last_Location_Date_Local": "03/12/2018",
      "Device_Type": "MC-3",
      "Days_Since_Start": 269,
      "Estimated_GPS_Odometer": 151690.4820149875,
      "Estimated_Engine_Hours": 2345.6241666666665,
      "Last_Nearby_House_Number": "2244",
      "Last_Nearby_Street": "95th St",
      "Last_Nearby_House_Number_and_Street": "2244 95th St",
      "Last_Nearby_Locality": "Naperville",
      "Last_Nearby_Region": "IL",
      "Last_Nearby_Postal_Code": "60564",
      "Last_Nearby_County": "Will County",
      "Last_Nearby_isoCountryCode": "US",
      "Last_JBUS_Data": null,
      "Is_Running": false,
      "EngineHoursSource": "E",
      "OdometerSource": "G",
      "SpeedSource": "G",
      "SourceUIEnabled": true,
      "VSSOdometerSourceEnabled": true
    },
    "Alert_Count": 0,
    "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/custom/\"56\"_20170615_195619.png",
    "Asset_idImage": null,
    "Asset_idImageCustom": 100115,
    "Dealership_Customer_Name": null,
    "Customer_Customer_Name": null,
    "Is_Running": false,
    "GroupListCSV": null,
    "Sensor_Count": 0,
    "ListOfGroupIds": null,
    "Created_By_UserName": null,
    "Updated_By_UserName": null,
    "Is_Dirty": false,
    "Driver": null,
    "CurrentDriver": null,
    "CurrentIdDriver": null,
    "ELDAsset": null,
    "FindNearestAssetDistance": null,
    "Is_Valid_Install": null,
    "Primary_Asset_Label": null,
    "CustomData": null
  },
]

Code samples

@ECHO OFF

curl -v -X GET "https://temeda.azure-api.net/telemetry/groups/{id}/assets/"
-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/groups/{id}/assets/?" + 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/groups/{id}/assets/");


            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/groups/{id}/assets/?" + $.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/groups/{id}/assets/";
    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/groups/{id}/assets/');
$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/groups/{id}/assets/?%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/groups/{id}/assets/?%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/groups/{id}/assets/')


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