In addition to the Cloud Object Storage API method and format to access containers in
Container Mode, the system offers a Service API to provision and configure containers.
- Create container
- Create a container with container vault and storage account information
-
curl -X PUT "http://<Accesser IP>:8337/container/<bucket.name>"
-u <user name>:<password>
-d ’{"storage_location":"<vault provisioning code>", "service_instance":"<storage account id>"}’
-H "Content-Type: application/json"
- Retrieve container metadata
- Returns all container metadata including ACL, IP access control, quota, storage location,
storage account, CORS, and retention policies.
-
curl http://<Accesser IP>:8337/container/<bucket.name> -u user:password
- Modify container metadata
- Modify authorized IP addresses
-
curl -X PATCH "http://<accesser ip>:8337/container/<bucket.name>"
-u <user name>:<password>
-d ’{"firewall":{"allowedIp": ["<IP1>", "<IP2>"]}}’
-H "Content-Type: application/json"
- Modify quota
-
curl -X PATCH "http://<accesser ip>:8337/container/<bucket.name>"
-u <user name>:<password>
-d ’{"hardQuota":"<hard quota bytes>"}’
-H "Content-Type: application/json"
- Modify authorization
-
curl -X PATCH "http://<accesser ip>:8337/container/<bucket.name>"
-u <user name>:<password>
-d ’{"acl":{"user1":["write"]}}’
-H "Content-Type: application/json"
- Delete container
-
curl -X DELETE "http://<accesser ip>:8337/container/<bucket.name>" -u user:password
Note: The API method and format to access buckets and objects in Container Mode is no different from
Vault Mode.