Get Idles
curl --request GET \
--url https://api.tessie.com/{vin}/idles \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tessie.com/{vin}/idles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tessie.com/{vin}/idles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tessie.com/{vin}/idles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tessie.com/{vin}/idles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tessie.com/{vin}/idles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tessie.com/{vin}/idles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{
"id": 1393231,
"started_at": 1626454383,
"ended_at": 1626461947,
"location": "8055 Dean Martin Drive, Las Vegas, Nevada 89139, United States",
"latitude": 36.042928,
"longitude": -115.187801,
"starting_battery": 66,
"ending_battery": 63,
"rated_range_used": 8.29,
"climate_fraction": 1,
"sentry_fraction": 0,
"energy_used": 2.64
}
]
}Vehicle Data
Get Idles
Returns the idles for a vehicle.
A vehicle is considered idle if not driving or charging.
GET
/
{vin}
/
idles
Get Idles
curl --request GET \
--url https://api.tessie.com/{vin}/idles \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tessie.com/{vin}/idles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tessie.com/{vin}/idles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tessie.com/{vin}/idles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tessie.com/{vin}/idles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tessie.com/{vin}/idles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tessie.com/{vin}/idles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{
"id": 1393231,
"started_at": 1626454383,
"ended_at": 1626461947,
"location": "8055 Dean Martin Drive, Las Vegas, Nevada 89139, United States",
"latitude": 36.042928,
"longitude": -115.187801,
"starting_battery": 66,
"ending_battery": 63,
"rated_range_used": 8.29,
"climate_fraction": 1,
"sentry_fraction": 0,
"energy_used": 2.64
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The associated VIN.
Query Parameters
Whether to return data in miles or kilometers.
Available options:
mi, km Whether to output the results in JSON or CSV.
Available options:
json, csv The IANA timezone name.
The start of the timeframe. Unix timestamp in seconds.
The end of the timeframe. Unix timestamp in seconds.
The latitude of the parking spot.
Example:
37.4925
The longitude of the parking spot.
Example:
121.9447
The radius from the parking spot, in meters.
Example:
80
Whether to include the parking spot.
The maximum number of results.
Response
200 - application/json
Success
Show child attributes
Show child attributes

