Retrieval of software components (v2)
Available from 9.2.14. You use the GET
operation on the api/sam/v2/software_components
element to request information
about software components in your catalog. The API returns details of existing components as well as
historical data about components that were removed.
Permissions
You must have the View Software Catalog and Signatures permission to perform this task.
Resource URL
https://hostname:port/api/sam/v2/software_components?token=token
Resource information
Operation details | Description |
---|---|
HTTP method | GET |
Request headers |
Negotiates the language of the response. If the header is not specified, the content is returned in the server language. |
Request format | application/json |
Response headers |
Specifies the content type of the response. |
Specifies the language of the response content. If the header is not specified, the content is returned in the server language. |
|
Response payload | Software Components element |
Response format | application/json |
Response codes |
|
Schema description
GET api/sam/v2/schemas/software_component.json?token=<token>
Available columns
Column | Description | Displayed by default | Type |
---|---|---|---|
id | Identifier of the component instance. | ✓ | Numeric |
name | Name of the component. | ✓ | String |
release | Release of the component. | ✓ | String |
guid | Component GUID. | ✓ | String |
is_BigFix | Information whether the component is provided by BigFix. | Boolean |
Applicable associations
Query parameters
Parameter | Description | Required | Value |
---|---|---|---|
columns[] | Specify which columns to retrieve. If you do not specify this parameter, only
default columns are retrieved. Example: Retrieve component name and
id
|
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 component ID
descending
|
Alphanumeric | |
limit | Specify the number of rows to retrieve. If you omit this parameter, all rows
are retrieved. Example: Retrieve 100 records
|
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
|
Numeric | |
token | A unique user authentication identifier. 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. | ✓ | Alphanumeric |
criteria | Retrieve records which match specific conditions. The parameter should have the following
structure, written in one line:
For more information about operators, see: Common connectors and operators. |
String |
Example conversation - default columns
- Request
-
GET api/sam/v2/software_components?token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623 Host: localhost:9081 Accept: application/json Accept-Language: en-US
- Response body
-
[{ "id":1, "name":"DB2 8.1", "release":8, "guid":"XYZ", "is_ibm":1, }]
Example conversation - association
- Request
-
GET api/sam/v2/software_components?columns[]=id&columns[]=name &columns[]=tags.name &token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623 Host: localhost:9081 Accept: application/json Accept-Language: en-US
- Response body
-
[{ "id":1, "name":"DB2 8.1", "tags": [{"name":"ibm"}] }]