Filesystems/{filesystemName}/filesets/{filesetName}/cos/downloadStats: POST
Displays details about the progress of the download task that is run by using the mmafmcosctl download command.
Availability
Available on all IBM Storage Scale editions.
Description
The POST Filesystems/{filesystemName}/filesets/{filesetName}/cos/downloadStats request displays details about the progress of the download task that is run by using the mmafmcosctl download command. The details displayed includes all tasks that were run previously or is currently running. For more information about the fields in the data structures that are returned, see mmafmcosctl command.
Request URL
https://<IP address or host name of API server>:<port>/scalemgmt/v2/filesystems/{filesystemName}/filesets/{filesetName}/cos/downloadStats
where- filesystems/{filesystemName}/filesets/{filesetName}/cos/downloadStats
- Specifies the action to be performed.
Request headers
Accept: application/json
Parameters
The following parameters can be used in the request URL to customize the
request:
Parameter name | Description and applicable keywords | Required/optional |
---|---|---|
filesetName | The fileset name. This is the path of the fileset. | Required. |
filesystemName | The file system name. You can also use keywords such as :all:, :all_local:, or :all_remote: | 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",
}
],
}
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.
- "jobs":
- An array of elements that describe jobs. Each element describes one job.
- "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. A nonzero value 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 download files from object store.
Request data:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json' 'https://198.51.100.1:443/scalemgmt/v2/filesystems/fs1/filesets/sw1/cos/downloadStats'
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.
{
"jobs": [
{
"jobId": 1000000000002,
"status": "COMPLETED",
"submitted": "2022-03-23 04:33:48,573",
"completed": "2022-03-23 04:33:51,783",
"runtime": 3210,
"request": {
"type": "POST",
"url": "/scalemgmt/v2/filesystems/fs1/filesets/sw1/cos/downloadStats"
},
"result": {
"progress": [],
"commands": [
"mmafmcosctl 'fs1' 'sw1' --download-stats "
],
"stdout": [
"mmafmcosctl: Statistics of last or currently running download are as follows:",
"Fileset Name Pending Failed Already cached Total Total data(Bytes) Throughput(KB/s)",
"------------ ------------ ------------ --------------- ------------ -------------------- ---------------",
"sw1 0 0 0 0 0 0 ",
"info: Fileset Name Pending Failed Already cached Total Total data(Bytes) Throughput(KB/s)\n------------ ------------ ------------ --------------- ------------ -------------------- ---------------\nsw1 0 0 0 0 0 0 \n"
],
"stderr": [],
"exitCode": 0
},
"pids": []
}
],
"status": {
"code": 200,
"message": "The request finished successfully."
}
}