List Instance Groups
/api/v2/instance_groups/
Make a GET request to this resource to retrieve the list of instance groups.
The resulting data structure contains:
{
"count": 99,
"next": null,
"previous": null,
"results": [
...
]
}
The count
field indicates the total number of instance 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 instance group records.
Results
Each instance group data structure includes the following fields:
id
: Database ID for this instance group. (integer)type
: Data type for this instance group. (choice)url
: URL for this instance group. (string)related
: Data structure with URLs of related resources. (object)name
: Name of this instance group. (string)created
: Timestamp when this instance group was created. (datetime)modified
: Timestamp when this instance group was last modified. (datetime)capacity
: (field)consumed_capacity
: (field)percent_capacity_remaining
: (field)jobs_running
: (field)max_concurrent_jobs
: Maximum number of concurrent jobs to run on a group. When set to zero, no maximum is enforced. (integer)max_forks
: Maximum number of forks to execute concurrently on a group. When set to zero, no maximum is enforced. (integer)jobs_total
: Count of all jobs that target this instance group (integer)instances
: (field)is_container_group
: Indicates whether instances in this group are containerized.Containerized groups have a designated Openshift or Kubernetes cluster. (boolean)credential
: (id)policy_instance_percentage
: Minimum percentage of all instances that will be automatically assigned to this group when new instances come online. (integer)policy_instance_minimum
: Static minimum number of Instances that will be automatically assign to this group when new instances come online. (integer)policy_instance_list
: List of exact-match Instances that will be assigned to this group (json)pod_spec_override
: (string)summary_fields
: Data structure with name/description for related resources. The output for some objects may be limited for performance reasons. (object)
Sorting
To specify that instance groups are returned in a particular
order, use the order_by
query string parameter on the GET request.
?order_by=name
Prefix the field name with a dash -
to sort in reverse:
?order_by=-name
Multiple sorting fields may be specified by separating the field names with a
comma ,
:
?order_by=name,some_other_field
Pagination
Use the page_size
query string parameter to change the number of results
returned for each request. Use the page
query string parameter to retrieve
a particular page of results.
?page_size=100&page=2
The previous
and next
links returned with the results will set these query
string parameters automatically.
Searching
Use the search
query string parameter to perform a case-insensitive search
within all designated text fields of a model.
?search=findme
(Added in Ansible Tower 3.1.0) Search across related fields:
?related__search=findme
Request
- application/json
-
page: integer
A page number within the paginated result set.
-
page_size: integer
Number of results to return per page.
-
search: string
A search term.
Response
- application/json
200 Response
object
-
capacity:
string
Title:
Capacity
Read Only:true
-
consumed_capacity:
string
Title:
Consumed capacity
Read Only:true
-
created:
string
Title:
Created
Read Only:true
-
credential:
integer
Title:
Credential
-
id:
integer
Title:
ID
Read Only:true
-
instances:
string
Title:
Instances
Read Only:true
-
is_container_group:
boolean
Title:
Is container group
Indicates whether instances in this group are containerized.Containerized groups have a designated Openshift or Kubernetes cluster. -
jobs_running:
string
Title:
Jobs running
Read Only:true
-
jobs_total:
integer
Title:
Jobs total
Read Only:true
Count of all jobs that target this instance group -
max_concurrent_jobs:
integer
Title:
Max Concurrent Jobs
Minimum Value:0
Maximum number of concurrent jobs to run on a group. When set to zero, no maximum is enforced. -
max_forks:
integer
Title:
Max Forks
Minimum Value:0
Maximum number of forks to execute concurrently on a group. When set to zero, no maximum is enforced. -
modified:
string
Title:
Modified
Read Only:true
-
name(required):
string
Title:
Name
Minimum Length:1
Maximum Length:250
-
percent_capacity_remaining:
string
Title:
Percent capacity remaining
Read Only:true
-
pod_spec_override:
string
Title:
Pod spec override
-
policy_instance_list:
array policy_instance_list
List of exact-match Instances that will be assigned to this group
-
policy_instance_minimum:
integer
Title:
Policy Instance Minimum
Minimum Value:0
Static minimum number of Instances that will be automatically assign to this group when new instances come online. -
policy_instance_percentage:
integer
Title:
Policy Instance Percentage
Minimum Value:0
Maximum Value:100
Minimum percentage of all instances that will be automatically assigned to this group when new instances come online. - 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
array
-
Array of:
string
Minimum Length:
1