Filesystems/{filesystemName}/owner/{path}: GET
Gets information about owner of a file or directory.
Availability
Available on all IBM Spectrum Scale™ editions.
Description
The GET filesystems/filesystemName/owner/path request gets information about owner of files or directories within a particular file system.
Request URL
https://<IP address of API server>:<port>/scalemgmt/v2/filesystems/filesystemName/owner/path
where- filesystems/filesystemName
- The file system about which you want to get the information. Required.
- owner/path
- The path of the file or directory about which you want to get the owner information. 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 |
---|---|---|
filesystemName | The file system name. You can also use keywords such as :all:, :all_local:, or :all_remote: | Required. |
fields | Comma separated list of fields to be included in response. ':all:' selects all available fields. | Optional. |
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"
},
"owner": [
"user":"User name",
"uid":"User ID",
"group":"Group name",
"gid":"Group ID",
],
}
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.
- "Owner":"Owner details"
- "user":"User name"
- Name of the owner.
- "uid":"User ID"
- Unique identifier of the owner.
- "group":"Group name"
- Name of the user group that owns the file or directory.
- "gid":"Group ID"
- Unique identifier of the user group that owns the file or directory.
Examples
The following example gets owner information for the files and directories of the file system gpfs0.
Request URL:
curl -k -u admin:admin001 -X GET --header 'accept:application/json'
'https://198.51.100.1:443/scalemgmt/v2/filesystems/gpfs0/owner/2Fmnt%2Fgpfso%2Fxaz'
Response
URL: 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": "..."k
},
"owner": {
"user": "testuser55",
"uid": "1234",
"group": "mygroup",
"gid": "4711"
}
}