Filesystems/{filesystemName}/filesets/{filesetName}/cos: DELETE

Deletes an AFM to Cloud Object storage fileset.

Availability

Available on all IBM Storage Scale editions.

Description

The DELETE Filesystems/{filesystemName}/filesets/{filesetName}/cos request deletes an AFM to cloud object storage fileset. 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/cos
where
Filesystems/{filesystemName}
Specifies the file system to which the AFM to cloud object storage fileset belongs.

Request headers


Accept: application/json

Parameters

The following parameters can be used in the request URL to customize the request:
Table 1. List of parameters
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.
filesetName The fileset name. This is the path of the fileset. 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": "fileset path ",
  "fromCache": "true | false",
  "fromTarget": "true | false",
  ""
}
For more information about the fields in the following data structures, see the links at the end of this topic.
"path": "Fileset path"
The path to a dedicated directory in a fileset. You can also provide the default link path of your fileset.
"fromCache": "true | false"
Reclaims or cleans up the inodes of the files that are already deleted locally from the fileset.
"fromTarget": "true | false"
Reclaims or cleans up the inodes of the files that are already deleted from the MU mode fileset. It also queues up the ones that are to be deleted from the cloud object storage.

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, 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 deletes an AFM to cloud object storage fileset.

Request data:
 curl -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/html' -d '{ \ 
   "path": "/fs1/myfset/mydirectory", \ 
   "fromCache": false, \ 
   "fromTarget": false \ 
 }' 'https://198.51.100.1:443/scalemgmt/v2/filesystems/fs1/filesets/afm-test3/cos'
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": "..."
  },
  "job": [
    {
      "result": {
        "commands": "[]",
        "progress": "[''(2/3) Linking fileset'']",
        "exitCode": "0",
        "stderr": "['''',  ...]",
        "stdout": "['''', ...]"
      },
      "request": {
        "type": "DELETE",
        "url": "/scalemgmt/v2/filesystems/fs1/filesets/afm-test3/cos",
        "data": "",
      },
      "jobId": "12345",
      "submitted": "2016-11-14 10.35.56",
      "completed": "2016-11-14 10.35.56",
      "status": "COMPLETED"
    }
  ]
}