Retrieval of computer systems (deprecated)
You use the GET
operation on the
api/sam/computer_systems
element to request information about computer systems in
your infrastructure.
api/sam/v2/computers
REST API. If you have
custom tools or internal processes that are based on api/sam/computer_systems
REST
API, it is best to adjust the tools to use the new version of the API. For information, see: Mapping columns between computer_systems and v2/computers REST API.This API retrieves information about physical and virtual computer systems. Apart from computers that have an BigFix® client installed, it also includes host systems on which the client is not deployed because some virtualization types do not allow for software to be installed on the host level (VMware ESXi, IBM PowerVM, and so on). Data related to such host computer systems must however be retrieved to build a proper hierarchy between the server and its virtual machines and to correctly report the PVU and RVU utilization.
The type
property determines whether a computer system is a host computer or a
virtual one. A host can be, for example, a virtualization server, ESX hypervisor, or a laptop with
agent installed. A virtual machine refers only to virtual machines that can be deployed on a host.
Because of this, you should not compare the outcome of the REST API with single reports, especially
with the Computers, and Hardware Inventory reports.
https://hostname:port/api/sam/computer_systems
- To use this API, you must be assigned to the All Computers group and have the View Hardware Inventory permission.
- By default, the retrieved data is sorted by
id
.
Before you begin
Starting from application update 9.2.34, this REST API is disabled by default. To enable it, change the value of the expose_deprecated_api parameter on the Advanced Server Settings panel to true. For more information, see: Advanced server settings.
Resource URL
https://server_host_name:port_number/api/sam/computer_systems
Resource information
Operation details | Description |
---|---|
Purpose | Returns a list of computer systems. |
HTTP method | GET |
Resource URI | https://server_host_name:port_number/api/sam/computer_systems |
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 |
|
Response payload | Computer Systems element |
Response Content-Type |
|
Normal HTTP response codes |
|
Error HTTP response codes |
Message body includes an error message with details. |
Query parameters
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 version
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 |
criteria | Retrieve records which match specific
conditions. The parameter should have the following structure, written on one line:
For more information about operators, see Common connectors and operators. Example: Retrieve
computer systems whose operating system contains "AIX" OR the last seen date within a specific date
range:
For columns that use
the date and time values, such as Last Seen, you can retrieve data also for a period instead of a
specific date. To do so, use last or next as
<operator>, and then specify the time value in the following convention:
PxD/PxW/PxM/PxY, where x is a number in the 1-999 range, and D, W, M, or Y is a designator that
represents days, weeks, months, or years respectively. For example, to retrieve computer systems
that reported within last 7 days, use the following API request:
|
Example HTTP conversation
- Request
-
GET https://hostname:port/api/sam/computer_systems
- Request header
-
Accept: application/json Accept-Language: en-US Token: <token>
- Response header
-
HTTP/1.1 200 OK Content-Type: application/json Content-Language: en-US
- Response body (JSON)
- If a particular entry is hidden by default, it is not retrieved by using the general URL. To
retrieve such data, you must use query parameters to specify the name of the hidden column. For
example, you can retrieve the
server_id
anddatasource_id
columns by using the columns[] parameter:URL?columns[]=server_id&columns[]=datasource_id
{ "id": 25, "parent_id"=9,//ID of a host for a VM "computer_id": 2,//hidden by default "computer_remote_id": 123,//hidden by default "server_id": 24,//hidden by default "datasource_name"="Data source",//hidden by default "datasource_id"=1,//hidden by default "type"="virtual",//type: virtual or host "os": "Linux Red Hat Enterprise Server 6.2)", "host_name": "<name>", "dns_name": "<name>", "ip_address": [ "<ip_address>", "<ip_address>" ], "last_seen": "2014-04-08T14:33:41Z", "hardware_manufacturer": "IBM", "hardware_model": "System x3550 M2 -[794662G]-", "hardware_serial_number": "99B7166", "hardware_type": "7946",//hidden by default "hardware_name": "IBM Corp. 7946",//hidden by default "processor_brand_string": "Intel(R) Xeon(R) CPU E7-3400 @ 2.40GHz", "processor_type": "Multi-core", "processor_brand": "Xeon(R)", "processor_vendor": "Intel(R)", "processor_model": "3400-3699 or 5500-5699", "partition_cores" : 1,//null for host serves "server_processors": 1, "server_cores": 8, "pvu_per_core": 70,//hidden by default "uuid":"50305bd3-1f09-7294-7033-b903767d4605" //hidden by default "cluster_id":"1"// hidden by default } //ID of the cluster to which the computer system belongs. Available only for type: host.