Devices
curl --request GET \
--url https://api.pathstack.io/device \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pathstack.io/device"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pathstack.io/device', 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.pathstack.io/device",
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.pathstack.io/device"
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.pathstack.io/device")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pathstack.io/device")
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{
"data": [
{
"system_device_id": "<string>",
"registration": "<string>",
"make": "<string>",
"model": "<string>",
"year": 123,
"active": true,
"tags": [
"<string>"
],
"id": "<string>",
"connection_id": "<string>",
"description": "<string>"
}
],
"links": {
"previous": "<string>",
"current": "<string>",
"next": "<string>"
}
}{
"error": {
"code": 400,
"message": "Invalid JWT format"
}
}{
"error": {
"code": 401,
"message": "Authentication header is missing, or token is invalid/expired."
}
}{
"error": {
"code": 403,
"message": "You do not have access to this resource"
}
}{
"error": {
"code": 422,
"message": "Field required",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
}Devices
Devices
This endpoint returns all Devices that have been created by Connections for your Tenancy.
You can specify the telematics_provider, and it will return only Devices with that provider.
You can specify the tags, and it will return only Devices that have all the tags specified.
The response is paginated, so if the next link is not null, use that link to get the next page of results.
GET
/
device
Devices
curl --request GET \
--url https://api.pathstack.io/device \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pathstack.io/device"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pathstack.io/device', 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.pathstack.io/device",
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.pathstack.io/device"
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.pathstack.io/device")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pathstack.io/device")
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{
"data": [
{
"system_device_id": "<string>",
"registration": "<string>",
"make": "<string>",
"model": "<string>",
"year": 123,
"active": true,
"tags": [
"<string>"
],
"id": "<string>",
"connection_id": "<string>",
"description": "<string>"
}
],
"links": {
"previous": "<string>",
"current": "<string>",
"next": "<string>"
}
}{
"error": {
"code": 400,
"message": "Invalid JWT format"
}
}{
"error": {
"code": 401,
"message": "Authentication header is missing, or token is invalid/expired."
}
}{
"error": {
"code": 403,
"message": "You do not have access to this resource"
}
}{
"error": {
"code": 422,
"message": "Field required",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Query Parameters
Name of the telematics provider
Available options:
mtdata, geotab, navman, mixtelematics, radius, verizon_connect, volvo, fleetsu, digital_matter, netstar, netstar_v2, webfleet, scania, linxio, geoforce, michelin_connected_fleet, navixy, netcorp, mapon Connection ID of data provider
Tags to include. Use query parameters e.g ?tags=a&tags=b to filter for Devices with tags 'a' and 'b'.
Required string length:
1 - 255Page number for pagination (zero-indexed)
Required range:
x >= 0
