Make a GET request to this resource to retrieve the list of groups.
GET /api/v1/groups/
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, POST, HEAD, OPTIONS
X-API-Time: 0.049s
The resulting data structure contains:
{
"count": 99,
"next": null,
"previous": null,
"results": [
...
]
}
The count
field indicates the total number of groups found for the given query. The next
and previous
fields provides links to additional results if there are more than will fit on a single page. The results
list contains zero or more group records.
Each group data structure includes the following fields:
id
: Database ID for this group. (integer)type
: Data type for this group. (multiple choice)group
: Groupurl
: URL for this group. (string)related
: Data structure with URLs of related resources. (object)summary_fields
: Data structure with name/description for related resources. (object)created
: Timestamp when this group was created. (datetime)modified
: Timestamp when this group was last modified. (datetime)name
: (string)description
: (string)inventory
: (field)variables
: Group variables in JSON or YAML format. (string)has_active_failures
: Flag indicating whether this group has any hosts with active failures. (boolean)total_hosts
: Total number of hosts directly or indirectly in this group. (integer)hosts_with_active_failures
: Number of hosts in this group with active failures. (integer)total_groups
: Total number of child groups contained within this group. (integer)groups_with_active_failures
: Number of child groups within this group that have active failures. (integer)has_inventory_sources
: Flag indicating whether this group was created/updated from any external inventory sources. (boolean)Make a POST request to this resource with the following group fields to create a new group:
name
: (string, required)description
: (string, default=””)inventory
: (field, required)variables
: Group variables in JSON or YAML format. (string, default=””)The Options Endpoint table offers a view of the Options for this endpoint. When viewing the endpoint in the browsable API, clicking the “Options” button gives you the raw JSON for the following:
name | Group List | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
description | # List Groups: Make a GET request to this resource to retrieve the list of groups. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
renders |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
parses |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
added_in_version | 1.2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
actions |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
types |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
search_fields |
|