Group Tree for an Inventory
get
/api/v2/inventories/{id}/tree/
Make a GET request to this resource to retrieve a hierarchical view of groups associated with the selected inventory.
The resulting data structure contains a list of root groups, with each group also containing a list of its children.
Results
Each group data structure includes the following fields:
id
: Database ID for this group. (integer)type
: Data type for this group. (choice)url
: URL for this group. (string)related
: Data structure with URLs of related resources. (object)summary_fields
: Data structure with name/description for related resources. The output for some objects may be limited for performance reasons. (object)created
: Timestamp when this group was created. (datetime)modified
: Timestamp when this group was last modified. (datetime)name
: Name of this group. (string)description
: Optional description of this group. (string)inventory
: (id)variables
: Group variables in JSON or YAML format. (json)children
: (field)
Request
Supported Media Types
- application/json
Path Parameters
Back to Top
Response
Supported Media Types
- application/json
200 Response
Root Schema : GroupTree
Type:
Show Source
object
-
children:
string
Title:
Children
Read Only:true
-
created:
string
Title:
Created
Read Only:true
-
description:
string
Title:
Description
-
id:
integer
Title:
ID
Read Only:true
-
inventory(required):
integer
Title:
Inventory
-
modified:
string
Title:
Modified
Read Only:true
-
name(required):
string
Title:
Name
Minimum Length:1
Maximum Length:512
- related: string
-
summary_fields:
string
Title:
Summary fields
Read Only:true
-
type:
string
Title:
Type
Read Only:true
-
url:
string
Title:
Url
Read Only:true
-
variables:
string
Title:
Variables
Group variables in JSON or YAML format.