Retrieval of clusters
You use the GET
operation on the api/sam/clusters
element
to request information about clusters that group your host computer
systems. This information represents the current state of your environment
and does not include any historical data.
After you retrieve the IDs of your clusters, compare them
with the cluster_id
column retrieved by API for computer systems to recognize which
of these systems belong to which clusters. This information can also
be viewed on the Hardware Inventory report in the user interface.
https://hostname:port/api/sam/clusters?token=token
- To use this API, you must be assigned to the All Computers group and have the View Hardware Inventory permission.
- Each API request must be authenticated with the token parameter. You can retrieve it by using REST API for retrieving authentication token. You can also log in to BigFix Inventory, hover over the User icon , and click Profile. Then, click Show token.
- By default, the retrieved data is sorted by
id
.
Operation details | Description |
---|---|
Operation | GET /api/sam/clusters |
Purpose | Returns a list of clusters. |
HTTP method | GET |
Resource URI | https://server_host_name:port_number/api/sam/clusters |
URL link relation | n/a |
URI query parameters | For a list of applicable query parameters, see: Query parameters. |
Request headers |
Used to negotiate the language of the response. If this header is not specified, the content is returned in the server language. |
Request payload | n/a |
Request Content-Type |
|
Response headers |
Specifies the content type of the response. |
Specifies the language of the response content. If this header is not specified, the content is returned in the server language. |
|
Specifies the data import status. |
|
Specifies the percentage progress of a data import. |
|
Specifies the status of the last data import. |
|
Specifies the time of the last successful data import. |
|
Response payload | Clusters element |
Response Content-Type |
|
Normal HTTP response codes |
|
Error HTTP response codes |
Message body includes an error message with details. |
Query parameters
api/sam/clusters
element.Parameter | Description | Required | Value |
---|---|---|---|
columns | Specify which columns to retrieve. If you do not specify this
parameter, a set of default columns is retrieved. For available columns, see Response body. Example: Retrieve the name and id
columns:
|
No | String |
order | Specify how to sort the returned data. The default direction for
sorting columns is ascending. If you want to specify a descending sort, append
desc to the column name. Example: Order by type
descending:
|
No | String |
limit | Specify the number of rows to retrieve. If you omit this parameter, all rows are retrieved. | No | Numeric |
offset | Specify the number of rows to skip for retrieving results. You can use
it together with the limit parameter to paginate results. Example: Retrieve 50 records
starting after record
150:
|
No | Numeric |
token | A unique user authentication identifier. You can view your token in the Profile preferences of BigFix Inventory. | Yes | Alphanumeric |
Example HTTP conversation
- Request
GET api/sam/clusters ?token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623 Host: localhost:9081 Accept: application/json Accept-Language: en-US
- Response header
HTTP/1.1 200 OK Content-Type: application/json Content-Language: en-US
- Response body (JSON)
{ "id": 1, "name": "Production Cluster 1", "cores_count": 24, "vm_manager_url": "https://198.51.100/sdk", }
- Example about adding a vm_manager_status column to the result
- API:
/api/sam/clusters?columns[]=name&columns[]=cores_count&columns[]=vm_manager_url&columns[]=vm_manager_status
Response:{ { { "id": 1, "name": "Production Cluster 1", "cores_count": 24, "vm_manager_url": "https://198.51.100/sdk", "vm_manager_status": "98" } } }
- Example about filtering out data from inactive VM Managers
- API:
api/sam/clusters?criteria=\
{ "and": [ [ "vm_manager_status","!=","98" ] ] }
For description of other VM Managers statuses, see Retrieval of VM managers.