Retrieval of shared disks (v2)
Available from 9.2.12. You use the GET
operation on the api/sam/v2/shared_disks
element to request information about
shared disks that are used in your infrastructure.
Prerequisites
Before you can retrieve information about shared disks by using the REST API, discover the shared disks in your infrastructure. For more information, see: Step 1: Discovering remote shared disks.
Permissions
You must have the View Shared Disks permissions to use this API.
Resource URL
https://hostname:port/api/sam/v2/shared_disks?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 | Shared Disks element |
Response format | application/json |
Response codes |
|
Schema description
GET api/sam/v2/schemas/shared_disk.json?token=<token>
Available columns
Column | Description | Displayed by default | Type |
---|---|---|---|
id | Identifier of the shared disk instance. | ✓ | Integer |
status | Indicates the status of the computer that is designated to scan the shared disk instance.
Possible values are:
|
✓ | Integer |
parent_id | Identifier of the parent of the shared disk instance. | ✓ | Integer |
top_level | Indicates whether the shared disk is a top-level directory in the shared disk structure.
Possible values are:
|
Boolean | |
exported_directory | Exported directory of the shared disk. | ✓ | String |
type | Type of the shared disk. Possible values are:
|
✓ | Integer |
computers_count | Number of computers on which the shared disk is mounted. | ✓ | Integer |
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 product name and
release
|
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 computer 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. Example: Retrieve
software instances whose product name contains "BigFix" OR the discovery start is within a specific
date range
For columns that use the date and time values, 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. Example: Retrieve software instances
that were first reported within the last 7
days
|
String |
Example conversation - default columns
- Request
-
GET api/sam/v2/shared_disks?token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623 Host: localhost:9081 Accept: application/json Accept-Language: en-US
- Response body
-
[{ "id":"5", "status":"0"' "type":"0" "designated_computer_id":"29" "parent_id":"3" "computers_count":"10" "exported_directory":"192.0.2.24:/file_server/tlcm/ISO/RHEL"
Example conversation - all columns
- Request
-
GET api/sam/v2/shared_disks?columns[]=id&columns[]=status &columns[]=parent_id&columns[]=top_level&columns[]=exported_directory &columns[]=type&columns[]=computers_count&columns[]=designated_copmuter_id &token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623
- Response body
-
[{ "id":"1", "status":"0", "parent_id":"5", "top_level":"0", "exported_directory":"192.0.2.24:/file_server/tlcm/HOME" "type":"0", "computers_count":"10", "designated_computer_id":"29"
Example conversation - association
- Request
-
GET api/sam/v2/shared_disks?columns[]=exported_directory &columns[]=computers_count&columns[]=shared_disk_members.computer_id &columns[]=shared_disk_members.mount_point&token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623 Host: localhost:9081 Accept: application/json Accept-Language: en-US
- Response body
-
[{ "exported_directory":"192.0.2.24:/file_server/tlcm/HOME", "computers_count":"1", "members": { "computer_id":"5", "mount_point":"/mnt/fs" } }]