Update Container
This request updates a container, targeted by secure ID.
| patch | /storage/containers/{container_sid} |
| put | /storage/containers/{container_sid} |
Sample
A sample PATCH request to update the Container object, targeted by secure ID, with the values in the request body:
curl -X PATCH \
'https://api.carrierx.com/core/v2/storage/containers/a291fe99-43d6-446f-a63e-91f93030dc7e' \
-H 'Content-Type: application/json' \
--data-binary '{"integer_key_1":"39984"}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response
200 status code with a serialized copy of the updated Container object:
{
"allow_publish": true,
"allowed_classifications": [],
"available_bytes_percent": 100,
"available_files_percent": 100,
"blocked_classifications": [],
"container_sid": "a291fe99-43d6-446f-a63e-91f93030dc7e",
"default_file_lifecycle_action": "no_action",
"default_file_lifecycle_ttl": -1,
"default_file_publish": "file_sid",
"default_file_threshold_include": true,
"default_file_unique": false,
"durability_class": "unassigned",
"encrypted": false,
"external_attributes": {},
"integer_key_1": 39984,
"integer_key_2": null,
"name": "N/A",
"parent_container_sid": null,
"partner_sid": "e00430c3-a7d0-4666-ab5c-f7202448382f",
"publish_domain": "https://storage.carrierx.com",
"quota_bytes": 1073741824,
"quota_files": 100,
"string_key_1": null,
"string_key_2": null,
"string_key_3": null,
"string_key_4": null,
"threshold_action": null,
"threshold_available_bytes_percent": null,
"threshold_available_files_percent": null,
"threshold_bytes": null,
"threshold_bytes_target": null,
"threshold_files": null,
"threshold_files_target": null,
"threshold_grace_period": 0,
"threshold_total_bytes": 0,
"threshold_total_files": 0,
"total_bytes": 0,
"total_files": 0,
"type": "internal",
"unique": false
}
A Container object can be updated using either a PATCH or PUT request.
-
A
PATCHrequest can be used to update one or more attribute values. When using aPATCHrequest, only the attributes specified in the request payload will be updated, all other attributes and values will remain the same. The container secure ID is passed in the query URL, and the values to be modified are passed in the request body. -
A
PUTrequest can be used to update an entire Container object. The container secure ID is passed in the query URL, and the entire Container object is passed in the request body.
Note, while all the fields must be present in a PUT request, not all the attribute values may be modified after the initial creation, because when created, some of them become read-only.
Required Scopes
To update a Container object, the partner must have one of the following scopes enabled:
storage.managestorage.update
To modify the publish_domain attribute value for the storage container, the partner must additionally have the storage.allow_container_publish_domain_update scope enabled.
Path Arguments
| Parameter | Data Type | Description |
|---|---|---|
| container_sid required | string | The container secure ID. |
Body Arguments
JSON representation of the fields and values to be updated.
Fields that can be modified are:
allow_publishallowed_classificationsblocked_classificationsdefault_file_lifecycle_actiondefault_file_lifecycle_ttldefault_file_publishdefault_file_threshold_includedefault_file_uniqueexternal_attributesinteger_key_1integer_key_2nameparent_container_sidpartner_sidpublish_domainquota_bytesquota_filesstring_key_1string_key_2string_key_3string_key_4threshold_actionthreshold_bytesthreshold_bytes_targetthreshold_filesthreshold_files_targetthreshold_grace_period
Refer to this table to view all fields that appear in the Container object.