Filesystems/{filesystemName}/directory/{path}: GET
Gets detailed information on a GPFS file system directory located in the specified path.
Availability
Available on all IBM Storage Scale editions.
Description
The GET filesystems/{filesystemName}/directory/{path} request gets the information for a GPFS file system directory that is located in a specific path.
Request URL
https://management API host:port/scalemgmt/v2/filesystems/filesystemName/directory/path
where:- filesystems/filesystemName
- Specifies the name of the file system to which the directory belongs. Required.
- directory/path
- The directory path.
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. | Required. |
path | The directory path relative to the file system's mount point. | Required. |
Request data
No request data.
Response data
{
"status": {
"code":ReturnCode",
"message":"ReturnMessage"
},
"jobs": [
{
"result":"",
{
"commands":"String",
"progress":"String,
"exitCode":"Exit code",
"stderr":"Error",
"stdout":"String",
},
"request":" ",
{
"type":"{GET | POST | PUT | DELETE}",
"url":"URL",
"data":""",
}
"jobId":"ID",
"submitted":"Time",
"completed":Time",
"status":"Job status",
}
],
}
- "jobs":
- An array of elements that describe jobs. Each element describes one job.
- "status":
- Return status.
- "message": "ReturnMessage",
- The return message.
- "code": ReturnCode
- The return code.
- "result"
-
- "commands":"String'
- Array of commands that are run in this job.
- "progress":"String'
- Progress information for the request.
- "exitCode":"Exit code"
- Exit code of command. Zero is success, nonzero denotes failure.
- "stderr":"Error"
- CLI messages from stderr.
- "stdout":"String"
- CLI messages from stdout.
- "request"
-
- "type":"{GET | POST | PUT | DELETE}"
- HTTP request type.
- "url":"URL"
- The URL through which the job is submitted.
- "data":" "
- Optional.
- "jobId":"ID",
- The unique ID of the job.
- "submitted":"Time"
- The time at which the job was submitted.
- "completed":Time"
- The time at which the job was completed.
- "status":"RUNNING | COMPLETED | FAILED"
- Status of the job.
Examples
The following example shows how to get information on a directory in the file system FS1.
Request data:
curl -k -u admin:admin001 -X GET --header 'accept:application/json'
'https://198.51.100.1:443/scalemgmt/v2/filesystems/FS1/directory/myDir1'
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.
{
"jobs": [
{
"jobId": 1000000000006,
"status": "COMPLETED",
"submitted": "2022-02-04 07:36:23,848",
"completed": "2022-02-04 07:36:23,972",
"runtime": 124,
"request": {
"type": "GET",
"url": "/scalemgmt/v2/filesystems/FS1/directory/mydir1%2Fdir2"
},
"result": {
"progress": [],
"commands": [
"stat '/gpfs/FS1/mydir1/dir2' "
],
"stdout": [
"info: File: /gpfs/FS1/mydir1/dir2\n Size: 4096 \tBlocks: 1 IO Block: 262144 directory\nDevice: 33h/51d\tInode: 40448 Links: 2\nAccess: (0700/drwx------) Uid: ( 1234/ UNKNOWN) Gid: ( 4711/ UNKNOWN)\nContext: system_u:object_r:unlabeled_t:s0\nAccess: 2022-02-04 07:35:06.950000000 +0100\nModify: 2022-02-04 07:35:06.572966000 +0100\nChange: 2022-02-04 07:35:07.400518000 +0100\n Birth: -\n"
],
"stderr": [],
"exitCode": 0
}
}
],
"status": {
"code": 200,
"message": "The request finished successfully."
}
}