---
agentTools:
  projectIndex: https://developer-docs.gomotive.com/llms.txt
---

# View the idle events of your drivers

**Purpose**: Use this API to view the idle time or idle events of the drivers in your fleet.

```ruby Ruby (OAuth 2.0)
require 'uri'
require 'net/http'

url = URI('https://api.gomotive.com/v1/idle_events')

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"

response = http.request(request)
puts response.read_body
```

<br />

<br />

## Response Parameters

### idle\_event

* **Type**: Object
* **Description**: Details of an idle event for a specific vehicle.

***

### id

* **Type**: Integer
* **Description**: Unique identifier for the idle event (e.g., 35040).

***

### start\_time

* **Type**: String (Date-Time)
* **Description**: The start time of the idle event in ISO 8601 format (e.g., "2018-05-29T09:53:57Z").

***

### end\_time

* **Type**: String (Date-Time)
* **Description**: The end time of the idle event in ISO 8601 format (e.g., "2018-05-29T09:58:10Z").

***

### veh\_fuel\_start

* **Type**: String
* **Description**: The vehicle's fuel level at the start of the idle event (e.g., 323326.5 liters).

***

### veh\_fuel\_end

* **Type**: String
* **Description**: The vehicle's fuel level at the end of the idle event (e.g., 323326.8091 liters).

***

### lat

* **Type**: String
* **Description**: Latitude coordinate of the vehicle during the idle event (e.g., 42.9744623).

***

### lon

* **Type**: String
* **Description**: Longitude coordinate of the vehicle during the idle event (e.g., -78.9293763).

***

### city

* **Type**: String
* **Description**: City where the idle event took place (e.g., "Tonawanda").

***

### state

* **Type**: String
* **Description**: State where the idle event took place (e.g., "NY").

***

### rg\_brg

* **Type**: String
* **Description**: Registration bearing during the idle event (e.g., 226.923888332155).

***

### rg\_km

* **Type**: String
* **Description**: Registration kilometers during the idle event (e.g., 6.4759410773022 km).

***

### rg\_match

* **Type**: Boolean
* **Description**: Indicates if the registration matches (e.g., true).

***

### end\_type

* **Type**: String
* **Description**: The reason why the idle event ended (e.g., "vehicle\_moving").

***

### driver

* **Type**: Object
* **Description**: Information about the driver during the idle event. Null if not applicable.

***

### vehicle

* **Type**: Object
* **Description**: Information about the vehicle involved in the idle event.

### id

* **Type**: Integer
* **Description**: Unique identifier for the vehicle (e.g., 4052).

### number

* **Type**: String
* **Description**: Vehicle number or identifier (e.g., "F335ca\_00795348").

### year

* **Type**: String
* **Description**: Year of the vehicle's manufacture (if available).

### make

* **Type**: String
* **Description**: Manufacturer of the vehicle (e.g., "Ford").

### model

* **Type**: String
* **Description**: Model of the vehicle.

### vin

* **Type**: String
* **Description**: Vehicle Identification Number (VIN).

### metric\_units

* **Type**: Boolean
* **Description**: Indicates whether metric units are used (e.g., false for imperial units).

***

### eld\_device

* **Type**: Object
* **Description**: Information about the vehicle gateway associated with the idle event.

### id

* **Type**: Integer
* **Description**: Unique identifier for the vehicle gateway (e.g., 21186).

### identifier

* **Type**: String
* **Description**: Identifier for the vehicle gateway (e.g., "00795348").

### model

* **Type**: String
* **Description**: Model of the vehicle gateway (e.g., "lbb-3.35ca").

### location

* **Type**: String
* **Description**: Description of the location where the idle event occurred (e.g., "Tonawanda, NY").

***

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Motive",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.gomotive.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/idle_events": {
      "get": {
        "summary": "View the idle events of your drivers",
        "description": "",
        "operationId": "view-the-idle-events-of-your-drivers",
        "parameters": [
          {
            "name": "driver_ids[]",
            "in": "query",
            "description": "Specify 1 or more driver IDs for fetching the idle events for those corresponding drivers.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "X-Time-Zone",
            "in": "header",
            "description": "Specify the timezone for formatting the timestamps.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vehicle_ids[]",
            "in": "query",
            "description": "Specify 1 or more vehicle IDs for filtering the idle events of the drivers.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "X-Metric-Units",
            "in": "header",
            "description": "Specify if you want to use the Metric units or the Imperial units. TRUE: Metric units. FALSE: Imperial Units",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Specify the start date from when you want to fetch the utilization. Default: TODAY - 7 DAYS AGO",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "X-User-Id",
            "in": "header",
            "description": "Specify the ID of the Fleet Admin or the Fleet Manager who is accessing this endpoint.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Specify the end date till when you want to view the idle time.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "The number of records to display per page.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "page_no",
            "in": "query",
            "description": "Denotes the current page number.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Fetch the driver's idle events": {
                    "value": "  {\n      \"idle_event\": {\n        \"id\": 35040,\n        \"start_time\": \"2018-05-29T09:53:57Z\",\n        \"end_time\": \"2018-05-29T09:58:10Z\",\n        \"veh_fuel_start\": 323326.5,\n        \"veh_fuel_end\": 323326.8091,\n        \"lat\": 42.9744623,\n        \"lon\": -78.9293763,\n        \"city\": \"Tonawanda\",\n        \"state\": \"NY\",\n        \"rg_brg\": 226.923888332155,\n        \"rg_km\": 6.4759410773022,\n        \"rg_match\": true,\n        \"end_type\": \"vehicle_moving\",\n        \"driver\": null,\n        \"vehicle\": {\n          \"id\": 4052,\n          \"number\": \"F335ca_00795348\",\n          \"year\": \"\",\n          \"make\": \"\",\n          \"model\": \"\",\n          \"vin\": \"\",\n          \"metric_units\": false\n        },\n        \"eld_device\": {\n          \"id\": 21186,\n          \"identifier\": \"00795348\",\n          \"model\": \"lbb-3.35ca\"\n        },\n        \"location\": \"Tonawanda, NY\"\n      }"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "66acf64a829e88001980fbf2:66c4d0fb112e140044a26963"
}
```