askill
geotab

geotabSafety --Repository

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.

20 stars
1.2k downloads
Updated 2/13/2026

Package Files

Loading files...
SKILL.md

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:

NeedChannelReferenceSpeed
Pre-aggregated KPIs (distance, fuel, idle, safety) for dashboards/reportsOData Data ConnectorDATA_CONNECTOR.md~5–11s
Raw entities (trips, devices, GPS, faults) or real-time dataMyGeotab APIAPI_QUICKSTART.md~0.5–2s
Natural language questions, ad-hoc explorationGeotab AceACE_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

TaskReferenceDescription
Connect to APIAPI_QUICKSTART.mdPython authentication, fetching data, entity types
Build Add-InsADDINS.mdCreate custom MyGeotab pages (vanilla JS)
Style with ZenithZENITH_STYLING.mdReact components matching MyGeotab look
AI QueriesACE_API.mdNatural language fleet queries via Geotab Ace
Data ConnectorDATA_CONNECTOR.mdOData API for pre-aggregated KPIs, safety, faults

Reference Files

Core Development

ReferenceWhen to Use
API_QUICKSTART.mdStarting with Geotab API, fetching devices/trips/drivers, Python development
ADDINS.mdBuilding custom pages in MyGeotab, JavaScript Add-Ins
ZENITH_STYLING.mdUpgrading Add-Ins to professional React UI
ACE_API.mdNatural language queries, trend analysis, AI insights

Data Analysis

ReferenceWhen to Use
DATA_CONNECTOR.mdPre-aggregated fleet KPIs via OData (daily/hourly/monthly distance, fuel, idle, safety)
SPEED_DATA.mdWorking with vehicle speed data, LogRecord queries
TRIP_ANALYSIS.mdAnalyzing trip data, fuel efficiency, distance calculations

Add-In Development

ReferenceWhen to Use
EMBEDDED.mdNo-hosting Add-In deployment, inline JSON config
EXAMPLES.mdComplete working Add-In code examples
INTEGRATIONS.mdNavigation, email, maps, external APIs
SECURE_BACKEND.mdSecuring Cloud Functions called by Add-Ins
STORAGE_API.mdPersisting Add-In data with AddInData
TROUBLESHOOTING.mdDebugging common Add-In issues

Zenith Components

ReferenceWhen to Use
ZENITH_COMPONENTS.mdDetailed Zenith component API reference
ZENITH_EXAMPLE.mdComplete 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

  1. Never use typeName: "Driver" - Use User with search: { isDriver: true }
  2. Always use date ranges for trips - Never fetch all trips without time bounds
  3. Test credentials once before loops - Failed auth locks account 15-30 min
  4. External CSS for Add-Ins - Inline <style> tags may be stripped
  5. Call callback() in initialize - Or Add-In will hang

Entity Types Quick Reference

TypeDescriptionCommon Use
DeviceVehicles/assetsFleet inventory
TripCompleted journeysRoute analysis
UserUsers and driversDriver management
DeviceStatusInfoCurrent location/statusLive tracking
LogRecordGPS breadcrumbsHistorical routes
StatusDataSensor readingsEngine diagnostics
ExceptionEventRule violationsSafety monitoring
FaultDataEngine fault codesMaintenance — varies by demo database
ZoneGeofencesLocation monitoring
GroupOrganizational hierarchyVehicle grouping

See API_QUICKSTART.md for the complete list of 34 entity types.

Getting Started

  1. Create demo account: my.geotab.com/registration.html (click "Create a Demo Database")
  2. Set up .env file: Store credentials safely
  3. Install dependencies: pip install mygeotab python-dotenv
  4. Read your first skill: Start with API_QUICKSTART.md

Resources

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

AI review pending.

Metadata

Licenseunknown
Version-
Updated2/13/2026
Publisherfhoffa

Tags

apici-cddatabasegithubobservabilitysecuritytesting