Start of change

Filesystems/{filesystemName}/afm/state: GET

Gets the Active File Management (AFM) state in a file system.

Availability

Available on all IBM Spectrum Scale™ editions.

Description

The GET filesystems/{filesystemName}/afm/state request gets AFM state in a file system. For more information about the fields in the data structures that are returned, see the topics mmafmconfig command, mmafmctl command, and mmafmlocal command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/afm/state
where
filesystems/filesetName
Specifies the file system to which the AFM fileset belongs. Required.
afm/state
Specifies AFM as the resource of this GET call. Required.

Request headers

Content-Type: application/json
Accept: application/json

Request data

No request data.

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
fields Comma separated list of fields to be included in response. ':all:' selects all available fields. Optional.
filter Filter objects by expression. For example, 'status=HEALTHY,entityType=FILESET' Optional.
filesystemName The file system name. You can also use keywords such as :all:, :all_local:, or :all_remote: Required.

Response data

{
  "status": {
    "code": 200,
    "message": "..."
  },
  "paging": {
    "next": "https://localhost:443/scalemgmt/v2/filesystems/gpfs0/filesets?lastId=1001"
  },
  "filesetAfmStateList": "null"
  "filesetAfmState" {
          "filesystemName: "File system name"
          "filesetName": "Fileset name" 
          "filesetId": "Fileset ID"
          "filesetTarget": "Fileset target"
          "cacheState": "Cache state"      
          "gatewayNodeName": Gateway node name"
          "queueLength": "Queue length" 
          "drState": "DR state"
          "oid": "OID"
}
}
For more information about the fields in the following data structures, see the links at the end of this topic.
"status":
Return status.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.
"filesetAfmstateList"
"filesetAfmState":"AFM state of the fileset"
Status of AFM filesets that belong to the file system.
"filesystemName": "File system name"
Name of the file system to which the AFM fileset belongs.
"filesetName": "Fileset name"
Name of the AFM fileset.
"filesetId": "Fileset ID"
Unique identifier of the AFM fileset.
"filesetTarget": "Fileset target"
The target fileset in the AFM and AFM DR configuration.
"cacheState": "Cache state"
The status of the cache site in the AFM configuration.
"gatewayNodeName": "Gateway node name"
The name of the gateway node that manages I/O in the AFM configuration.
"queueLength": "Queue length"
The length of the AFM queue.
"drState": "DR state"
The DR status of the AFM fileset.
"oid": "OID"
Internal identifier of the AFM fileset state.

Examples

The following example gets the details of the call home configuration in the system.

Request URL:
curl -k -u admin:admin001 -X GET --header 'accept:application/json' 
'https://198.51.100.1:443/scalemgmt/v2/filesystems/gpfs0/afm/state'
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.
{
"filesetAfmStateList" : [ {
"cacheState" : "Active",
"filesetName" : "primary_rpo",
"filesystemName" : "gpfs0"
}, {
"cacheState" : "Active",
"filesetName" : "primary",
"filesystemName" : "gpfs0"
}, {
"cacheState" : "Active",
"filesetName" : "ind_writer_mapped",
"filesystemName" : "gpfs0"
}, {
"cacheState" : "Active",
"filesetName" : "ind_writer_dnsmap",
"filesystemName" : "gpfs0"
}, {
"cacheState" : "Active",
"filesetName" : "ind_writer_cache",
"filesystemName" : "gpfs0"
} ],
"status" : {
"code" : 200,
"message" : "The request finished successfully"
}
}
End of change