Filesystems/{filesystemName}/filesets/{filesetsName}/cos/policy: GET

Gets the policy details.

Availability

Available on all IBM Storage Scale editions.

Description

The GET Filesystems/{filesystemName}/filesets/{filesetsName}/cos/policy request gets information about the policy. For more information about the fields in the data structures that are returned, see mmafmcosctl command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/filsystems/filesystemName/filesets/filesetName/cos/policy
where:
filesystem/filesystemName
Specifies the name of the file system to which the filesets belong. Required.
policy
Specifies that resource for which the request is sent. Required.

Request headers

Accept: application/json

Request parameters

The following parameters can be used in the request URL to customize the request:
Table 1. List of request parameters
Parameter name Description and applicable keywords Required/optional
filesystemName The file system name. You can also use keywords such as :all:, :all_local:, or :all_remote: Required.
filesetName The fileset name. This is the path of the fileset. Required.
path The file path relative to file system's mount point. The path of the file or directory is specified with forward slashes (/). For example: mnt/gpfs0/rest01. The forward slashes in the path are encoded to %2F in the request URL. Required.

Request data

No request data.

Response data

{
  "status": {
      "code":ReturnCode,
      "message":"ReturnMessage"
   },
 "paging": 
  {
    "next": "URL",
    "fields": "Fields",
    "filter": "Filters",
    "baseUrl": "Base URL",
    "lastId": "ID of the last element",
  },
     
}
"status:
Return status.
"message": "ReturnMessage",
The return message.
"code":"ReturnCode"
The return code.
"paging":
Paging details.
"next": "URL",
The URL to retrieve the next page. Paging is enabled when more than 1000 objects would be returned by the query.
"fields": "Fields",
The fields used in the original request.
"filter": "Filters",
The filter used in the original request.
"baseUrl": "Base URL",
The URL of the request without any parameters.
"lastId": "ID of the last element",
The ID of the last element that can be used to retrieve the next elements.

Examples

The following example gets information about the policy for the fileset afmkagui.

Request data:
curl -k -u admin:admin001 -X GET --header 'accept:application/json' 
'https://198.51.100.1:443/scalemgmt/v2/filesystems/fs1/filesets/afmkagui/cos/policy'
The request URL with no field or filter parameter returns only the details that uniquely identify the object.Response data:
Note: In the JSON data that is returned, the return code indicates whether the command is successful. The response code 200 indicates that the command successfully retrieved the information. Error code 400 represents an invalid request and 500 represents internal server error.
{
  "policy": "RULE EXTERNAL LIST 'dirtyFiles'\nRULE 'dirtyFilesRule' LIST 'dirtyFiles' DIRECTORIES_PLUS\nWHERE NAME LIKE '%pdf%' AND\nPATH_NAME NOT LIKE '$filesetPath/.pconflicts/%' AND\nPATH_NAME NOT LIKE '$filesetPath/.afm/%' AND\nPATH_NAME NOT LIKE '$filesetPath/.ptrash/%'\n",
  "status": {
    "code": 200,
    "message": "The request finished successfully."
  }
}