GET api/Groups?includeUnitSerials={includeUnitSerials}&maxDepth={maxDepth}

Returns your group and all its children

Request Information

URI Parameters

NameDescriptionTypeAdditional information
includeUnitSerials

Optional. if true, will return the serialnumbers of units in the groups

boolean

Default value is False

maxDepth

Optional. If not null and positive, will only return this many layers down the group hierarchy - else will return all child groups. Default is null

integer32

None.

Body Parameters

None.

Response Information

Resource Description

Returns your group and all its children

Collection of GroupModel
NameDescriptionTypeAdditional information
Id

Id of the group

integer32

None.

Name

Name of the group

string

None.

Units

A list of units in this group. Will be an empty array if no units are directly in this group, and the request for this model requested UnitSerialNumbers. Will be null if the request for this model did not request UnitSerialNumbers.

Collection of string

Null values possible.

ParentId

the Id of this groups parent

integer32

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "Id": 1,
    "Name": "sample string 2",
    "Units": [
      "sample string 1",
      "sample string 2"
    ],
    "ParentId": 3
  },
  {
    "Id": 1,
    "Name": "sample string 2",
    "Units": [
      "sample string 1",
      "sample string 2"
    ],
    "ParentId": 3
  }
]

application/xml, text/xml

Sample:
<ArrayOfGroupModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">
  <GroupModel>
    <Id>1</Id>
    <Name>sample string 2</Name>
    <ParentId>3</ParentId>
    <Units xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </Units>
  </GroupModel>
  <GroupModel>
    <Id>1</Id>
    <Name>sample string 2</Name>
    <ParentId>3</ParentId>
    <Units xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </Units>
  </GroupModel>
</ArrayOfGroupModel>