日本語は機械翻訳による参考訳です。内容に矛盾や不一致があった場合には、英語の内容が優先されます。 
        
        
      ONTAP REST APIを使用してファイルに新しい権限を適用する
新しいセキュリティ記述子を特定のファイルまたはフォルダに適用できます。
手順1:新しい権限を適用する
HTTPメソッドとエンドポイント
このREST API呼び出しでは、次のメソッドとエンドポイントを使用します。
| HTTP メソッド | パス | 
|---|---|
投稿( Post )  | 
/api/protocols/file-security/permissions/{svm.uuid}/{path}  | 
処理のタイプ
非同期
curlの例の追加入力パラメータ
この手順のcurlの例では、すべてのREST API呼び出しに共通のパラメータに加えて、次のパラメータも使用しています。
| パラメータ | を入力します | 必須 | 説明 | 
|---|---|---|---|
$SVM_ID  | 
パス  | 
はい。  | 
これは、ファイルが含まれているSVMのUUIDです。  | 
$file_path  | 
パス  | 
はい。  | 
ファイルまたはフォルダへのパスです。  | 
カールの例
curl --request POST --location "https://$FQDN_IP/api/protocols/file-security/permissions/$SVM_ID/$FILE_PATH?return_timeout=0" --include --header "Accept */*" --header "Authorization: Basic $BASIC_AUTH" --data '{ \"acls\": [ { \"access\": \"access_allow\", \"advanced_rights\": { \"append_data\": true, \"delete\": true, \"delete_child\": true, \"execute_file\": true, \"full_control\": true, \"read_attr\": true, \"read_data\": true, \"read_ea\": true, \"read_perm\": true, \"write_attr\": true, \"write_data\": true, \"write_ea\": true, \"write_owner\": true, \"write_perm\": true }, \"apply_to\": { \"files\": true, \"sub_folders\": true, \"this_folder\": true }, \"user\": \"administrator\" } ], \"control_flags\": \"32788\", \"group\": \"S-1-5-21-2233347455-2266964949-1780268902-69700\", \"ignore_paths\": [ \"/parent/child2\" ], \"owner\": \"S-1-5-21-2233347455-2266964949-1780268902-69304\", \"propagation_mode\": \"propagate\"}'
JSON 出力例
{
  "job": {
    "uuid": "3015c294-5bbc-11eb-9c4e-0050568e8682",
    "_links": {
      "self": {
        "href": "/api/cluster/jobs/3015c294-5bbc-11eb-9c4e-0050568e8682"
      }
    }
  }
}
手順2:ジョブのステータスを取得する
ワークフローを実行 "ジョブインスタンスの取得" をクリックし、 state 値は success。