Filesystems/{filesystemName}/file/{path}: GET
Gets the details on a specific file in a file system or the entire file system, as required.
Availability
Available with IBM Storage Scale Erasure Code Edition only.
Description
The GET filesystems/{filesystemName}/file/{path} request gets the details on a specific file in a file system or the entire file system, based on the requested parameters included in the endpoint.
Request URL
https://IP address of API server:<port>/scalemgmt/v2/filesystems /filesystemName/file /path
where - file/{path}
- Specifies the resource of this GET call. Required.
Request headers
Content-Type: application/json
Accept: application/json
Request data
No request data.
Parameters
| Parameter name | Description and applicable keywords | Required/Optional |
|---|---|---|
| filesystemName | The name of the file system where the file belongs. | Required. |
| path | The directory location. The path that is provided is relative to the file system's mount point. | Required. |
Response data
{
"status": {
"code": Return Code,
"message": "Return message"
},
"result": {
"progress": [],
"commands": [
"String' "
],
"stdout": [
"info: Request details"
],
"request": {
"type": "POST| GET | PUT | DELETE",
"url": "Request URL",
},
}
- "status":
- Return status.
- "message": "ReturnMessage"
- The return message.
- "code": ReturnCode
- The return code.
- "jobs"
- An array that comprises details on the jobs that were run.
- "result":
- Specifies the job results.
- "commands": commands issued
- Specifies the commands that were issued for the job.
- "progress":"Job progress "
- Specifies the progress of the job.
- "exitCode":"exit codes"
- Specifies the exit code of the command. A value zero indicates success while any other zero indicates failure.
- "stderr":"CLI messages"
- Specifies the CLI messages received from stderr.
- "stdout":"CLI messages"
- Specifies the CLI messages from stdout.
- "info: Request details
- The details of the file or file system that is requested.
- result
- Specifies the job results.
- "type": "GET | POST | PUT| DELETE
- Specifies the HTTP request type.
- "URL" : "URL"
- Specifies the URL through which the job is submitted.
Examples
The following example gets information on the file system cacheFS located in the path 122Fmyfile.
Request
data:
curl -k -u admin:admin001 -X GET --header 'accept:application/json'
'https://198.51.100.1:443/scalemgmt/v2/filesystems/CacheFS/file/122Fmyfile 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": "..."
},
"request": {
"type": "GET",
"url": "/scalemgmt/v2/filesystems/cacheFS/file/122Fmyfile"
},
"result": {
"progress": [],
"commands": [
"stat '/afm/cacheFS/122Fmyfile' "
],
"stdout": [
"info: File: /afm/cacheFS/122Fmyfile\n Size: 1073741824\tBlocks: 2097152 IO Block: 262144 regular file\nDevice: 2eh/46d\tInode: 6208 Links: 1\nAccess: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)\nAccess: 2021-05-28 06:09:12.596707000 +0000\nModify: 2021-05-28 06:09:12.597668000 +0000\nChange: 2021-05-28 06:09:12.597668000 +0000\n Birth: -\n"
],
}