Skip to main content
REST API reference
A newer release of this product is available.

ONTAP REST API Application containers endpoints

Overview

Application containers provision one or more storage objects. Currently, only NAS volumes are supported. Application containers allow you to specify the policies and rules for enabling and managing client access to storage. FlexCache volumes can also be provisioned.

Examples

Creating a FlexVol with NAS (NFS and CIFS access) along with S3 NAS bucket with S3 access policies

# The API:
/api/application/containers

# The call:
curl -X POST 'https://<mgmt-ip>/api/application/containers' -d '{ "svm": { "name": "vs0" }, "volumes": [ { "name": "vol1", "space": { "size": "100mb" }, "scale_out": "false", "nas": { "path": "/vol1", "export_policy": { "name": "vol1", "rules": [ { "clients": [ { "match": "0.0.0.0/0" } ], "rw_rule": [ "any" ], "ro_rule": [ "any" ] } ] }, "cifs": { "shares": [ { "name": "vol1", "acls": [ { "type": "windows", "permission": "full_control", "user_or_group": "everyone" } ] } ] } }, "s3_bucket": { "name": "vol1", "nas_path": "/vol1", "policy": { "statements": [ { "actions": [ "ListBucket" ], "effect": "allow", "principals": [ "user1", "group/grp1" ], "resources": [ "vol1", "vol1/*" ] } ] } } } ] }'

#### Response:
{
"job": {
  "uuid": "9c9cabf3-0a88-11ec-a449-005056bbcf9f",
  "_links": {
    "self": {
      "href": "/api/cluster/jobs/9c9cabf3-0a88-11ec-a449-005056bbcf9f"
    }
  }
}
}