NFS/exports/{exportPath}: GET
Gets information about an NFS export that is configured in the system.
Availability
Available on all IBM Spectrum Scale™ editions.
Description
The GET nfs/exports/exportPath request gets information about an NFS export. For more information about the fields in the data structures that are returned, see mmnfs command.
Request URL
https://<IP address or host name of API server>:<port>/scalemgmt/v2/nfs/exports
where- nfs/exports
- Specifies NFS export as the resource. Required.
- exportPath
- Specifies the NFS export about which you need the details. Required.
Request headers
Accept: application/json
Request parameters
The following parameters can be used in the request URL to customize the
request:
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. |
exportPath | The path of the NFS export. The export path is 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
The following list of attributes are available in the response data:
{
"status":
{
"code": ReturnCode
"message": "ReturnMessage",
}
"exports":
{
"config":[
{
"filesystemName": "FileSystemName"
"path": "Path",
"delegations": "Delegations",
}],
nfsClients":[
{
"clientName": "String"
"exportID": "Path",
"access_type": "none | RW | RO | MDONLY | MDONLY_RO",
"squash": "root | root_squash | all | all_squash | allsquash | no_root_squash | none"
"anonUid": "ID",
"anonGid": "ID",
"privilegedPort": "True | False"
"sectype": "sys | krb5 | krb5i | krb5p | None",
"protocols": "NFS3 | NFS4",
"transportProtocol": "TCP | UDP"
"delegations": "none | read | write | readwrite",
"manageGids": "True | False"
"nfsCommit": "True | False",
}
}
- "status":
- Return status.
- "code": ReturnCode,
- The HTTP status code that was returned by the request.
- "message": "ReturnMessage"
- The return message.
- "exports":
- An array of information about NFS exports. The array contains elements that describe the NFS
exports. For more information about the fields in this structure, see the links at the end of this topic.
- config":
- Manages NFS configuration in a cluster.
- "filesystemName": "FileSystemName"
- The name of the file system to which the export belongs.
- "path": "Path",
- Specifies the path for the export.
- "delegations": "Delegations"
- Specifies what delegate file operations are permitted.
- nfsClients
- "clientName": "String"
- The host name or IP address of the NFS server to be accessed.
- "exportID": "Path"
- The internal unique ID of the export.
- "access_type": "none | RW | RO | MDONLY | MDONLY_RO"
- Specifies the type of the access for the client.
- "squash": "root | root_squash | all | all_squash | allsquash | no_root_squash | none"
- Specifies whether the squashing mechanism is applied to the connecting client.
- "anonUid": "ID"
- This option explicitly sets the UID of the anonymous account.
- "anonGid": "ID"
- This option explicitly sets the GID of the anonymous account.
- "privilegedPort": "True | False"
- This option to specify whether a client that uses an ephemeral port must be rejected.
- "sectype": "sys | krb5 | krb5i | krb5p | None"
- The supported authentication method for the client.
- "protocols": "NFS3 | NFS4 "
Supported NFS protocol version.
- "transportProtocol": "TCP | UDP"
- Specifies the transport layer.
- "delegations": "none | read | write | readwrite"
- Specifies what delegate file operations are permitted.
- "manageGids": "True | False"
- Whether this NFS client is allowed to manage GIDs.
- "nfsCommit": "True | False"
Whether to commit the transmitted data on the server side.
Examples
The following example gets information about the NFS export /mnt/gpfs0/fset1 that is configured in the system.
Request URL:
curl -k -u admin:admin001 -X GET --header 'accept:application/json'
'https://198.51.100.1:443/scalemgmt/v2/nfs/exports/%2Fmnt%2Fgpfs0%2Ffset1
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/nfs/exports/mnt%2Fgpfs0%2Ffset1?lastId=1001"
},
"exports": [
{
"config": {
"filesystemName": "gpfs0",
"path": "/mnt/gpfs0/fset1",
"delegations": "NONE"
},
"nfsClients": [
{
"clientName": "198.51.100.8",
"exportid": "1",
"access_type": "RO",
"squash": "root_squash",
"anonUid": "1",
"anonGid": "1",
"privilegedPort": "false",
"sectype": "sys",
"protocols": "NFS4",
"transportProtocol": "TCP",
"delegations": "none",
"manageGids": "yes",
"nfsCommit": "This is a comment"
}
]
}
]
}