Nodes/afm/mapping/{mappingName}: GET

Lists details of a node mapping for AFM and Cloud Object Storage (COS).

Availability

Available on all IBM Storage Scale editions.

Description

The GET nodes/afm/mapping/{mappingName} request lists all node mappings for AFM and Cloud Object Storage. For more information about the fields in the data structures that are returned, see mmafmconfig command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/nodes/afm/mapping/{mappingName}
where
nodes/afm/mapping
Specifies the target of the request.
mappingName
Name of the map.

Request headers


Accept: application/json

Parameters

The following parameters can be used in the request URL to customize the request:
Table 1. List of parameters
Parameter name Description and applicable keywords Required/optional
mappingName Node mapping name. Required
fields Comma separated list of fields to be included in response. ':all:' selects all available fields. Optional.

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",
  },
   mappings: [
      {
      "mapName": Map name,
      "exportMap": "Export server or gateway node map details",
      }
      ],
}
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.
"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.
"mappings":
An array of elements that describe one mapping.
"mapName" : "Map name"
Name of the mapping.
"exportMap" : "Export server and gateway node map details"
Lists the export server and gateway node maps.

Examples

The following example gets the details of the node mapping for AFM and Cloud Object Storage.

Request data:
curl -k -u admin:admin001 -X GET --header 'accept:application/json' 
'https://198.51.100.1:443/scalemgmt/v2/node/afm/mapping/myMap'
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.
{
  "status": {
    "code": 200,
    "message": "..."
  },
  "paging": {
    "next": "https://localhost:443/scalemgmt/v2/filesystems/gpfs0/filesets?lastId=10001",
    "fields": "period,restrict,sensorName",
    "filter": "usedInodes>100,maxInodes>1024",
    "baseUrl": "/scalemgmt/v2/nodes/afm/mapping/myMap",
    "lastId": 10001
  },
   "mappings": [
    {
      "mapName": "myMap",
      "exportMap": "[ testnode-11/node-13, testnode-11/node-14]"
    }
  ]
}