List all the groups

Purpose: Use this API to fetch a list of all the available groups in your organisation.

require 'uri'
require 'net/http'

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

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

Groups

  • Type: Array of Objects
  • Description: Contains a list of groups.

id

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

name

  • Type: String
  • Description: The name of the group.

company_id

  • Type: Integer
  • Description: The unique identifier for the company associated with the group.

parent_id

  • Type: Integer
  • Description: Denotes the ID of the group's parent.

creator

  • Type: Object or null
  • Description: The creator of the group, if available.

user

  • Type: Object
  • Description: Details about the user associated with the group.

id

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

first_name

  • Type: String
  • Description: The first name of the user.

last_name

  • Type: String
  • Description: The last name of the user.

username

  • Type: String or null
  • Description: The username of the user, if available.

email

  • Type: String
  • Description: The email address of the user.

driver_company_id

  • Type: Integer
  • Description: The unique identifier for the company associated with the driver.

status

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

role

  • Type: String
  • Description: The role of the user within the company.

Query Params
date

Specify a date to fetch the groups that were updated after that date.

int32
Defaults to 25

Number of records to return per page.

string
Defaults to 1

Denotes the current page number.

Headers
string

Time zone used to format 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.

Response

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