/scalemgmt/v3/filesystems/{filesystem}/policy: PATCH
Updates the file system policy.
Availability
Available on all IBM Storage Scale editions.
Description
The PATCH filesystems/{filesystem}/policy: PATCH request updates the file system policy.
Request URL
https://<IP address or host name of API server>:<port>/scalemgmt/v3/filesystems/{filesystem}/policy
where- {filesystem}
- Specifies the file system name.
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 |
---|---|---|
filesystem | The name of the file system | Required. |
policy | The name of the policy. | Required. |
test_only | Tests only the validity of the policy file without installing. | Optional |
X-StorageScaleDomain | The domain to be authorized against for the request. The default value is StorageScaleDomain. | Optional |
Request data
No request data.
Response data
- A successful response displays the updated policy contents.
- default: An unexpected error response.
{ "code": 0, "details": [ { "@type": "string", "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" } ], "message": "string" }
Examples
The following example updates the policy contents for the fs1:
Request data:
curl -X 'PATCH' \
'https://localhost:46443/scalemgmt/v3/filesystems/fs1/policy?test_only=false' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"policy_contents": "UlVMRSAnZGVsMScgREVMRVRFIEZST00gUE9PTCAnc3lzdGVtJyBXSEVSRSAoREFZUyhDVVJSRU5UX1RJTUVTVEFNUCkgLSBEQVlTKEFDQ0VTU19USU1FKSA+IDMwKSBBTkQgKGxvd2VyKE5BTUUpIExJS0UgJyUudG1wJyBPUiBQQVRIX05BTUUgTElLRSAnJS90bXAvJScpCg=="
}' -k -n
Response data: {
"policy_contents": "LyogbW1sc3BvbGljeTpmczE6cm9vdEBsYW5jZWxvdC00MS5vcGVuc3RhY2tsb2NhbDpNb24gTWFyICAzMSAyMSUzQTU3JTNBMDYgMjAyNTpuYXRpdmVfcmVzdF9hcGk6ICovCgoKClJVTEUgJ2RlbDEnIERFTEVURSBGUk9NIFBPT0wgJ3N5c3RlbScgV0hFUkUgKERBWVMoQ1VSUkVOVF9USU1FU1RBTVApIC0gREFZUyhBQ0NFU1NfVElNRSkgPiAzMCkgQU5EIChsb3dlcihOQU1FKSBMSUtFICclLnRtcCcgT1IgUEFUSF9OQU1FIExJS0UgJyUvdG1wLyUnKQo="
}