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 (BigFix scenario).
Permissions
You must have the View Shared Disks permissions to use this API.
Resource URL
https://hostname:port/api/sam/v2/shared_disks
Resource information
Operation details | Description |
---|---|
HTTP method | GET |
Request headers |
|
Request format | application/json |
Response headers |
|
Response payload | Shared Disks element |
Response format | application/json |
Response codes |
|
Schema description
GET https://hostname:port/api/sam/v2/schemas/shared_disk.json
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 | |
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 https://hostname:port/api/sam/v2/shared_disks
- Request header
-
Accept: application/json Accept-Language: en-US Token: <token>
- Response body
-
[{ "id":"5", "status":"0"' "type":"0" "designated_computer_id":"29" "parent_id":"3" "computers_count":"10" "exported_directory":"<ip_address>:/file_server/tlcm/ISO/RHEL"
Example conversation - all columns
- Request
-
GET https://hostname:port/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
- Request header
-
Accept: application/json Accept-Language: en-US Token: <token>
- Response body
-
[{ "id":"1", "status":"0", "parent_id":"5", "top_level":"0", "exported_directory":"<ip_address>:/file_server/tlcm/HOME" "type":"0", "computers_count":"10", "designated_computer_id":"29"
Example conversation - association
- Request
-
GET https://hostname:port/api/sam/v2/shared_disks ?columns[]=exported_directory&columns[]=computers_count&columns[]=shared_disk_members.computer_id &columns[]=shared_disk_members.mount_point
- Request header
-
Accept: application/json Accept-Language: en-US Token: <token>
- Response body
-
[{ "exported_directory":"<ip_address>:/file_server/tlcm/HOME", "computers_count":"1", "members": { "computer_id":"5", "mount_point":"/mnt/fs" } }]