Geotab Development Guide
This is the unified skill for all Geotab fleet management development. Navigate to the specific reference you need based on your task.
Choosing a Data Channel
Geotab has three ways to get fleet data. Pick based on the task:
| Need |
Channel |
Reference |
Speed |
| Pre-aggregated KPIs (distance, fuel, idle, safety) for dashboards/reports |
OData Data Connector |
DATA_CONNECTOR.md |
~5–11s |
| Raw entities (trips, devices, GPS, faults) or real-time data |
MyGeotab API |
API_QUICKSTART.md |
~0.5–2s |
| Natural language questions, ad-hoc exploration |
Geotab Ace |
ACE_API.md |
~30–45s |
Key constraints:
- Data Connector requires HTTP Basic Auth on a separate server — not usable from Add-Ins (they only get a session token). Use for server-side scripts, Python apps, and BI tools. Supports
$select (column selection) and $filter (row filtering) for server-side query customization. Respects user permissions (group/vehicle scope).
- API is the only channel for real-time data (
DeviceStatusInfo) and works everywhere including Add-Ins. Scales well for targeted queries (one vehicle's trips, one device's location), but "fetch all trips for the whole fleet and aggregate in code" doesn't scale to production fleets with thousands of vehicles. Use the Data Connector for fleet-wide KPIs at scale. Respects user permissions (group/vehicle scope).
- Ace is great for exploration but slow, may apply implicit filters, and results can vary between runs. Respects user permissions (group/vehicle scope).
- For trip-level or per-event detail, use the API — the Data Connector only has daily/hourly/monthly aggregates.
Full comparison with benchmarks: DATA_ACCESS_COMPARISON.md
Quick Navigation
| Task |
Reference |
Description |
| Connect to API |
API_QUICKSTART.md |
Python authentication, fetching data, entity types |
| Build Add-Ins |
ADDINS.md |
Create custom MyGeotab pages (vanilla JS) |
| Style with Zenith |
ZENITH_STYLING.md |
React components matching MyGeotab look |
| AI Queries |
ACE_API.md |
Natural language fleet queries via Geotab Ace |
| Data Connector |
DATA_CONNECTOR.md |
OData API for pre-aggregated KPIs, safety, faults |
Reference Files
Core Development
| Reference |
When to Use |
| API_QUICKSTART.md |
Starting with Geotab API, fetching devices/trips/drivers, Python development |
| ADDINS.md |
Building custom pages in MyGeotab, JavaScript Add-Ins |
| ZENITH_STYLING.md |
Upgrading Add-Ins to professional React UI |
| ACE_API.md |
Natural language queries, trend analysis, AI insights |
Data Analysis
| Reference |
When to Use |
| DATA_CONNECTOR.md |
Pre-aggregated fleet KPIs via OData (daily/hourly/monthly distance, fuel, idle, safety) |
| SPEED_DATA.md |
Working with vehicle speed data, LogRecord queries |
| TRIP_ANALYSIS.md |
Analyzing trip data, fuel efficiency, distance calculations |
Add-In Development
| Reference |
When to Use |
| EMBEDDED.md |
No-hosting Add-In deployment, inline JSON config |
| EXAMPLES.md |
Complete working Add-In code examples |
| INTEGRATIONS.md |
Navigation, email, maps, external APIs |
| SECURE_BACKEND.md |
Securing Cloud Functions called by Add-Ins |
| STORAGE_API.md |
Persisting Add-In data with AddInData |
| TROUBLESHOOTING.md |
Debugging common Add-In issues |
Zenith Components
| Reference |
When to Use |
| ZENITH_COMPONENTS.md |
Detailed Zenith component API reference |
| ZENITH_EXAMPLE.md |
Complete React + Zenith Add-In example |
Common Patterns
Authentication (Python)
import mygeotab
from dotenv import load_dotenv
import os
load_dotenv()
api = mygeotab.API(
username=os.getenv('GEOTAB_USERNAME'),
password=os.getenv('GEOTAB_PASSWORD'),
database=os.getenv('GEOTAB_DATABASE'),
server=os.getenv('GEOTAB_SERVER', 'my.geotab.com')
)
api.authenticate()
Fetching Data (Python)
from datetime import datetime, timedelta
# Get all vehicles
devices = api.get('Device')
# Get trips from last 7 days
trips = api.get('Trip',
fromDate=datetime.now() - timedelta(days=7),
toDate=datetime.now()
)
# Get drivers
drivers = api.get('User', search={'isDriver': True})
Add-In Structure (JavaScript)
geotab.addin["your-addin-name"] = function() {
var apiRef = null;
return {
initialize: function(api, state, callback) {
apiRef = api;
// Setup code
callback(); // MUST call!
},
focus: function(api, state) {
// Refresh data
},
blur: function(api, state) {
// Cleanup
}
};
};
API Call (JavaScript)
api.call("Get", { typeName: "Device" }, function(devices) {
console.log("Found " + devices.length + " vehicles");
}, function(error) {
console.error("Error:", error);
});
Critical Rules
- Never use
typeName: "Driver" - Use User with search: { isDriver: true }
- Always use date ranges for trips - Never fetch all trips without time bounds
- Test credentials once before loops - Failed auth locks account 15-30 min
- External CSS for Add-Ins - Inline
<style> tags may be stripped
- Call
callback() in initialize - Or Add-In will hang
Entity Types Quick Reference
| Type |
Description |
Common Use |
Device |
Vehicles/assets |
Fleet inventory |
Trip |
Completed journeys |
Route analysis |
User |
Users and drivers |
Driver management |
DeviceStatusInfo |
Current location/status |
Live tracking |
LogRecord |
GPS breadcrumbs |
Historical routes |
StatusData |
Sensor readings |
Engine diagnostics |
ExceptionEvent |
Rule violations |
Safety monitoring |
FaultData |
Engine fault codes |
Maintenance — varies by demo database |
Zone |
Geofences |
Location monitoring |
Group |
Organizational hierarchy |
Vehicle grouping |
See API_QUICKSTART.md for the complete list of 34 entity types.
Getting Started
- Create demo account: my.geotab.com/registration.html (click "Create a Demo Database")
- Set up .env file: Store credentials safely
- Install dependencies:
pip install mygeotab python-dotenv
- Read your first skill: Start with API_QUICKSTART.md
Resources
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: geotab3description: Complete guide for Geotab fleet management development. Use for any task involving the Geotab API, MyGeotab Add-Ins, Zenith styling, or Ace AI queries. This unified skill covers Python API, JavaScript Add-Ins, React components, and natural language fleet queries. Use when this capability is needed.4---56# Geotab Development Guide78This is the unified skill for all Geotab fleet management development. Navigate to the specific reference you need based on your task.910## Choosing a Data Channel1112Geotab has three ways to get fleet data. Pick based on the task:1314| Need | Channel | Reference | Speed |15|------|---------|-----------|-------|16| Pre-aggregated KPIs (distance, fuel, idle, safety) for dashboards/reports | **OData Data Connector** | [DATA_CONNECTOR.md](references/DATA_CONNECTOR.md) | ~5–11s |17| Raw entities (trips, devices, GPS, faults) or real-time data | **MyGeotab API** | [API_QUICKSTART.md](references/API_QUICKSTART.md) | ~0.5–2s |18| Natural language questions, ad-hoc exploration | **Geotab Ace** | [ACE_API.md](references/ACE_API.md) | ~30–45s |1920**Key constraints:**21- **Data Connector** requires HTTP Basic Auth on a separate server — **not usable from Add-Ins** (they only get a session token). Use for server-side scripts, Python apps, and BI tools. Supports `$select` (column selection) and `$filter` (row filtering) for server-side query customization. **Respects user permissions** (group/vehicle scope).22- **API** is the only channel for real-time data (`DeviceStatusInfo`) and works everywhere including Add-Ins. Scales well for targeted queries (one vehicle's trips, one device's location), but **"fetch all trips for the whole fleet and aggregate in code" doesn't scale** to production fleets with thousands of vehicles. Use the Data Connector for fleet-wide KPIs at scale. **Respects user permissions** (group/vehicle scope).23- **Ace** is great for exploration but slow, may apply implicit filters, and results can vary between runs. **Respects user permissions** (group/vehicle scope).24- For trip-level or per-event detail, use the **API** — the Data Connector only has daily/hourly/monthly aggregates.2526Full comparison with benchmarks: [DATA_ACCESS_COMPARISON.md](../../guides/DATA_ACCESS_COMPARISON.md)2728## Quick Navigation2930| Task | Reference | Description |31|------|-----------|-------------|32| **Connect to API** | [API_QUICKSTART.md](references/API_QUICKSTART.md) | Python authentication, fetching data, entity types |33| **Build Add-Ins** | [ADDINS.md](references/ADDINS.md) | Create custom MyGeotab pages (vanilla JS) |34| **Style with Zenith** | [ZENITH_STYLING.md](references/ZENITH_STYLING.md) | React components matching MyGeotab look |35| **AI Queries** | [ACE_API.md](references/ACE_API.md) | Natural language fleet queries via Geotab Ace |36| **Data Connector** | [DATA_CONNECTOR.md](references/DATA_CONNECTOR.md) | OData API for pre-aggregated KPIs, safety, faults |3738## Reference Files3940### Core Development4142| Reference | When to Use |43|-----------|-------------|44| [API_QUICKSTART.md](references/API_QUICKSTART.md) | Starting with Geotab API, fetching devices/trips/drivers, Python development |45| [ADDINS.md](references/ADDINS.md) | Building custom pages in MyGeotab, JavaScript Add-Ins |46| [ZENITH_STYLING.md](references/ZENITH_STYLING.md) | Upgrading Add-Ins to professional React UI |47| [ACE_API.md](references/ACE_API.md) | Natural language queries, trend analysis, AI insights |4849### Data Analysis5051| Reference | When to Use |52|-----------|-------------|53| [DATA_CONNECTOR.md](references/DATA_CONNECTOR.md) | Pre-aggregated fleet KPIs via OData (daily/hourly/monthly distance, fuel, idle, safety) |54| [SPEED_DATA.md](references/SPEED_DATA.md) | Working with vehicle speed data, LogRecord queries |55| [TRIP_ANALYSIS.md](references/TRIP_ANALYSIS.md) | Analyzing trip data, fuel efficiency, distance calculations |5657### Add-In Development5859| Reference | When to Use |60|-----------|-------------|61| [EMBEDDED.md](references/EMBEDDED.md) | No-hosting Add-In deployment, inline JSON config |62| [EXAMPLES.md](references/EXAMPLES.md) | Complete working Add-In code examples |63| [INTEGRATIONS.md](references/INTEGRATIONS.md) | Navigation, email, maps, external APIs |64| [SECURE_BACKEND.md](references/SECURE_BACKEND.md) | Securing Cloud Functions called by Add-Ins |65| [STORAGE_API.md](references/STORAGE_API.md) | Persisting Add-In data with AddInData |66| [TROUBLESHOOTING.md](references/TROUBLESHOOTING.md) | Debugging common Add-In issues |6768### Zenith Components6970| Reference | When to Use |71|-----------|-------------|72| [ZENITH_COMPONENTS.md](references/ZENITH_COMPONENTS.md) | Detailed Zenith component API reference |73| [ZENITH_EXAMPLE.md](references/ZENITH_EXAMPLE.md) | Complete React + Zenith Add-In example |7475## Common Patterns7677### Authentication (Python)7879```python80import mygeotab81from dotenv import load_dotenv82import os8384load_dotenv()8586api = mygeotab.API(87 username=os.getenv('GEOTAB_USERNAME'),88 password=os.getenv('GEOTAB_PASSWORD'),89 database=os.getenv('GEOTAB_DATABASE'),90 server=os.getenv('GEOTAB_SERVER', 'my.geotab.com')91)92api.authenticate()93```9495### Fetching Data (Python)9697```python98from datetime import datetime, timedelta99100# Get all vehicles101devices = api.get('Device')102103# Get trips from last 7 days104trips = api.get('Trip',105 fromDate=datetime.now() - timedelta(days=7),106 toDate=datetime.now()107)108109# Get drivers110drivers = api.get('User', search={'isDriver': True})111```112113### Add-In Structure (JavaScript)114115```javascript116geotab.addin["your-addin-name"] = function() {117 var apiRef = null;118119 return {120 initialize: function(api, state, callback) {121 apiRef = api;122 // Setup code123 callback(); // MUST call!124 },125 focus: function(api, state) {126 // Refresh data127 },128 blur: function(api, state) {129 // Cleanup130 }131 };132};133```134135### API Call (JavaScript)136137```javascript138api.call("Get", { typeName: "Device" }, function(devices) {139 console.log("Found " + devices.length + " vehicles");140}, function(error) {141 console.error("Error:", error);142});143```144145## Critical Rules1461471. **Never use `typeName: "Driver"`** - Use `User` with `search: { isDriver: true }`1482. **Always use date ranges for trips** - Never fetch all trips without time bounds1493. **Test credentials once before loops** - Failed auth locks account 15-30 min1504. **External CSS for Add-Ins** - Inline `<style>` tags may be stripped1515. **Call `callback()` in initialize** - Or Add-In will hang152153## Entity Types Quick Reference154155| Type | Description | Common Use |156|------|-------------|------------|157| `Device` | Vehicles/assets | Fleet inventory |158| `Trip` | Completed journeys | Route analysis |159| `User` | Users and drivers | Driver management |160| `DeviceStatusInfo` | Current location/status | Live tracking |161| `LogRecord` | GPS breadcrumbs | Historical routes |162| `StatusData` | Sensor readings | Engine diagnostics |163| `ExceptionEvent` | Rule violations | Safety monitoring |164| `FaultData` | Engine fault codes | Maintenance — [varies by demo database](../../guides/FAULT_MONITORING.md) |165| `Zone` | Geofences | Location monitoring |166| `Group` | Organizational hierarchy | Vehicle grouping |167168See [API_QUICKSTART.md](references/API_QUICKSTART.md) for the complete list of 34 entity types.169170## Getting Started1711721. **Create demo account:** [my.geotab.com/registration.html](https://my.geotab.com/registration.html) (click "Create a Demo Database")1732. **Set up .env file:** Store credentials safely1743. **Install dependencies:** `pip install mygeotab python-dotenv`1754. **Read your first skill:** Start with [API_QUICKSTART.md](references/API_QUICKSTART.md)176177## Resources178179- [Geotab SDK Documentation](https://geotab.github.io/sdk/)180- [MyGeotab Python Library](https://github.com/Geotab/mygeotab-python)181- [API Reference](https://geotab.github.io/sdk/software/api/reference/)182- [Zenith Storybook](https://developers.geotab.com/zenith-storybook/)183- [Demo Database Reference](../../guides/DEMO_DATABASE_REFERENCE.md)184185---186> Converted and distributed by [TomeVault](https://tomevault.io/claim/fhoffa) — claim your Tome and manage your conversions.187<!-- tomevault:4.0:skill_md:2026-04-11 -->