Update masks in IBM Storage Scale native REST API

Describes the update masks option used in the IBM Storage Scale native REST API.

Update masks specify the fields to update in an update request. When updating a resource, you might want only to update a subset of the fields. API update requests accept the resource to be updated as part of the body. By using update masks, you can instruct the server to ignore certain fields even if they are modified.

Examples

The following examples show the usage of update mask where the request is sent to update only the fileset name:
  1. To get the details of the fileset fset1, run the following request:
    curl -X 'GET' \ 'https://example.com:8000/scalemgmt/v3/filesystems/fs0/filesets/fset1?view=ATTRIBUTES' \ -H 'accept: application/json'
    A sample output is as follows:
    {
    	"name": "fset1",
    	"id": 1,
    	"root_inode": "106496",
    	"status": "FILESETSTATUS_UNLINKED",
    	"path": "--",
    	"create_time": "2023-10-23T21:32:56Z",
    	"comment": "12345",
    	"inode_space": 0,
    	"alloc_inodes": "0",
    	"perm_change_flag": "PERMCHANGEFLAG_CHMODANDSETACL",
    	"perm_inherit_flag": "PERMINHERITFLAG_INHERIT_ACL_ONLY",
    	"iam_mode": "IAMMODE_OFF",
    	"afm_associated": false,
    	"inode_space_designation": "root"
    }
  2. To update the fileset name from fset1 to fset2, run the following request:
    curl -X 'PATCH'   'https://example.com:8000/scalemgmt/v3/filesystems/fs0/filesets/fset1'?fields=name   -H 'accept: application/json'   -H 'Content-Type: application/json'   -d '{
      "comment": "",
      "name": "fset2"
    }'
    A sample output is as follows:
    
    {
    	"name": "fset2",
    	"fs_name": "fs0",
    	"id": 1,
    	"root_inode": "106496",
    	"status": "FILESETSTATUS_UNLINKED",
    	"path": "--",
    	"create_time": "2023-10-23T21:32:56Z",
    	"comment": "sample comment",
    	"inode_space": 0,
    	"is_inode_space_owner": false,
    	"alloc_inodes": "0",
    	"perm_change_flag": "PERMCHANGEFLAG_CHMODANDSETACL",
    	"prevent_snapshot_restore": false,
    	"perm_inherit_flag": "PERMINHERITFLAG_INHERIT_ACL_ONLY",
    	"fal_status": "FALSTATUS_DEFAULT",
    	"iam_mode": "IAMMODE_OFF",
    	"inode_space_designation": "root"
    }