/scalemgmt/v3/filesystems/{filesystem}/filesets/{fileset}/afmcos/delete: POST

Deletes objects from cloud object storage for an AFM fileset in an IBM Storage Scale file system.

Availability

Available on all IBM Storage Scale editions.

Description

The POST filesystems/{filesystem}/filesets/{fileset}/afmcos/delete request deletes objects from cloud object storage for an AFM fileset. This operation removes specified files or directories from the cloud storage bucket while optionally retaining them in the local cache. To run this request, you must have the RBAC permission for the post action on the /scalemgmt/v3/filesystems/{filesystem}/filesets/{fileset}/afmcos/delete resource.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v3/filesystems/{filesystem}/filesets/{fileset}/afmcos/delete
where
{filesystem}
Specifies the name of the file system.
{fileset}
Specifies the name of the AFM fileset.

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
filesystem The name of the filesystem. Required.
fileset The name of the AFM fileset. Required.
delete_objects The body of the request that contains following parameters:
{
  "add_policy": "string",
  "fromcache_delete": false,
  "fromtarget_delete": true,
  "gateway_node": "string",
  "list_policy": false,
  "path_for_delete": "string",
  "policy_path": "string",
  "remove_policy": false
}
Required.
X-StorageScaleDomain The domain to be authorized against for the request. The default value is X-StorageScaleDomain. Optional.

Request data

The request body contains the list of objects to delete in JSON format:
{
  "add_policy": "string",
  "fromcache_delete": false,
  "fromtarget_delete": true,
  "gateway_node": "string",
  "list_policy": false,
  "path_for_delete": "string",
  "policy_path": "string",
  "remove_policy": false
}

Response data

  • 200: A successful response and delete operation is completed.
    {
      "done": true,
      "error": {
        "details": [
          {
            "@type": "string",
            "additionalProp1": "string",
            "additionalProp2": "string",
            "additionalProp3": "string"
          }
        ],
        "httpcode": 0,
        "message": "string",
        "status": "CANCELLED"
      },
      "metadata": {
        "@type": "string",
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "name": "string",
      "response": {
        "@type": "string",
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      }
    }
  • 202: The request has been accepted for processing, but the processing has not been completed.
    {
      "done": true,
      "error": {
        "details": [
          {
            "@type": "string",
            "additionalProp1": "string",
            "additionalProp2": "string",
            "additionalProp3": "string"
          }
        ],
        "httpcode": 0,
        "message": "string",
        "status": "CANCELLED"
      },
      "metadata": {
        "@type": "string",
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "name": "string",
      "response": {
        "@type": "string",
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      }
    }
  • default: An unexpected error response.
    {
      "code": 0,
      "details": [
        {
          "@type": "string",
          "additionalProp1": "string",
          "additionalProp2": "string",
          "additionalProp3": "string"
        }
      ],
      "message": "string"
    }

Examples

The following example deletes objects from cloud storage for the test-mos-fset-mu1 fileset in the fs1 file system:

Request data:
curl -X 'POST' \
  'https://localhost:46443/scalemgmt/v3/filesystems/fs1/filesets/test-mos-fset-mu1/afmcos/delete' \
  -H 'accept: application/json' \
  -H 'authorization: Basic cm9vdDpXZWxjb21lMmlibTEyM0A=' \
  -H 'Content-Type: application/json' \
  -d '{
  "add_policy": "",
  "fromcache_delete": false,
  "fromtarget_delete": true,
  "gateway_node": "afm-sanity2",
  "list_policy": false,
  "path_for_delete": "/gpfs/fs1/test-mos-fset-mu1/",
  "policy_path": "",
  "remove_policy": false
}'
Response data:
{
	"name":  "MTo2MmJlNDFmNi0wZjZhLTQ4MjMtOWFiMC02ZThkOWMxMmM2NTg=",
	"metadata":  {
		"@type":  "type.googleapis.com/generic.v3.LongRunningOperationMetadata",
		"job_id":  "MTo2MmJlNDFmNi0wZjZhLTQ4MjMtOWFiMC02ZThkOWMxMmM2NTg=",
		"operation_details":  {
			"@type":  "type.googleapis.com/afmcosctl.v3.DeleteFilesetObjectsRequest",
			"filesystem":  "fs1",
			"fileset":  "test-mos-fset-mu1",
			"delete_objects":  {
				"path_for_delete":  "/gpfs/fs1/test-mos-fset-mu1/",
				"policy_path":  "",
				"add_policy":  "",
				"remove_policy":  false,
				"list_policy":  false,
				"gateway_node":  "afm-sanity2",
				"fromcache_delete":  false,
				"fromtarget_delete":  true
			}
		},
		"status":  "RUNNING",
		"check_point":  "",
		"request_time":  "2026-04-08T08:48:17.932433176Z",
		"completion_time":  null,
		"last_update_time":  "2026-04-08T08:48:17.933213157Z",
		"output":  "",
		"domain_ids":  [
			0
		]
	},
	"done":  false
}