List all the vehicles of a group

Purpose: Use this API to find all the associated vehicles of a particular group. You must specify the ID of the group for which you want to view the associated vehicles.

require 'uri'
require 'net/http'

url = URI('https://api.gmotive.com/v1/groups/<id>/vehicles')

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

Response Parameters

Vehicle

  • Type: Object
  • Description: Details of a specific vehicle.

id

  • Type: Integer
  • Description: The unique identifier for the vehicle.

number

  • Type: String
  • Description: The vehicle number.

status

  • Type: String
  • Description: The status of the vehicle.

make

  • Type: String
  • Description: The make of the vehicle.

model

  • Type: String
  • Description: The model of the vehicle.

Path Params
int32
required

Specify the ID of the group for which you want to view the associated vehicles.

Query Params
date

Specify a date after which you want to view the associated vehicles.

Headers
string

Specify the timezone for formatting the timestamps.

boolean

Specify if you want to use the Metric units or the Imperial units. TRUE: Metric units. FALSE: Imperial Units

int32

Specify the ID of the Fleet Admin or the Fleet Manager who is accessing this endpoint.

Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json