GET api/v4/usergroups?userID={userID}&token={token}&userIDQueried={userIDQueried}

Get all groups for a queried user

Request Information

URI Parameters

NameDescriptionTypeAdditional information
userID

The ID returned from a successful login

unsigned integer

Required

token

The authentication token returned from a successful login

string

Required

userIDQueried

Specify the user id we want to pull groups for

unsigned integer

Required

Body Parameters

None.

Response Information

Resource Description

Collection of GroupResponse
NameDescriptionTypeAdditional information
ID

The unique id of the group

unsigned integer

None.

Name

The name of the group

string

None.

ParentID

The parent group id

unsigned integer

None.

HasVehicles

Indicates if there are vehicles in the group

boolean

None.

HasGroups

Indicates if there are child groups

boolean

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "ID": 1,
    "Name": "sample string 2",
    "ParentID": 3,
    "HasVehicles": true,
    "HasGroups": true
  },
  {
    "ID": 1,
    "Name": "sample string 2",
    "ParentID": 3,
    "HasVehicles": true,
    "HasGroups": true
  }
]

application/xml, text/xml

Sample:
<ArrayOfGroupResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <GroupResponse>
    <ID>1</ID>
    <Name>sample string 2</Name>
    <ParentID>3</ParentID>
    <HasVehicles>true</HasVehicles>
    <HasGroups>true</HasGroups>
  </GroupResponse>
  <GroupResponse>
    <ID>1</ID>
    <Name>sample string 2</Name>
    <ParentID>3</ParentID>
    <HasVehicles>true</HasVehicles>
    <HasGroups>true</HasGroups>
  </GroupResponse>
</ArrayOfGroupResponse>