Filesystems/{filesystemName}/filesets/{filesetName}/cos/evict: POST
Evicts files from object store.
Availability
Available on all IBM Storage Scale editions.
Description
The POST Filesystems/{filesystemName}/filesets/{filesetName}/cos/evict request evicts files from object store. For more information about the fields in the data structures that are returned, see mmafmcosaccess command.
Request URL
https://<IP address or host name of API server>:<port>/scalemgmt/v2/filesystems/{filesystemName}/filesets/{filesetName}/cos/evict
where- filesystems/{filesystemName}/filesets/{filesetName}/cos/evict
- 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. |
body | Body of the request that contains the required parameters to be passed on to the IBM Storage Scale system to perform the requested operation. | Required. |
Request data
{
"path": "Path",
"objectList": "List of files",
"all": "true | false",
"useMetadata": "true | false",
}
For
more information about the fields in the following data structures, see the links at the end of this
topic.- "path": "Path"
- Path to a dedicated directory in a fileset. You can skip this parameter to use default link path of your fileset.
- "objectList": "List of files"
- List of files to be evicted from COS.
- "all": "true | false"
- Whether to evict all files from COS.
- "useMetadata": "true | false"
- Whether to evict only metadata.
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 evict files from object store.
Request data:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json' -d '{ \
"path": "/fs1/myfset/mydirectory", \
"objectList": "[file1, file2]", \
"all": true, \
"useMetadata": false \
}' 'https://198.51.100.1:443/scalemgmt/v2/filesystems/gpfs0/filesets/mfset1/cos/evict
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" : 1000000000016,
"status" : "FAILED",
"submitted" : "2020-09-29 20:38:44,349",
"completed" : "2020-09-29 20:38:45,203",
"runtime" : 854,
"request" : {
"data" : {
"all" : true,
"path" : "cosdir1",
"useMetadata" : false
},
"type" : "POST",
"url" : "/scalemgmt/v2/filesystems/gpfs0/filesets/mfset1/cos/evict"
},
"result" : {
"progress" : [ ],
"commands" : [ "mmafmcosctl 'gpfs0' 'mfset1' 'cosdir1' evict --all " ],
"stdout" : [ ],
"stderr" : [ "EFSSG0053C Failed to execute command:\nmmafmctl: Fileset mfset1 is not an AFM fileset.\nmmafmctl: Command failed. Examine previous error messages to determine cause.\nmmafmcosctl: Evict cmd: \"/usr/lpp/mmfs/bin/mmafmctl gpfs0 evict -j mfset1 --list-file /var/mmfs/tmp/evict-1601404724\" failed with error 1\nmmafmcosctl: Command failed. Examine previous error messages to determine cause.\n." ],
"exitCode" : 8
},
"pids" : [ ]
} ],
"status" : {
"code" : 200,
"message" : "The request finished successfully."
}
}