Skip to main content

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 PATCH request can be used to update one or more attribute values. When using a PATCH request, 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 PUT request 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

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.manage
  • storage.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

ParameterData TypeDescription
container_sid requiredstringThe container secure ID.

Body Arguments

JSON representation of the fields and values to be updated.

Fields that can be modified are:

  • allow_publish
  • allowed_classifications
  • blocked_classifications
  • default_file_lifecycle_action
  • default_file_lifecycle_ttl
  • default_file_publish
  • default_file_threshold_include
  • default_file_unique
  • external_attributes
  • integer_key_1
  • integer_key_2
  • name
  • parent_container_sid
  • partner_sid
  • publish_domain
  • quota_bytes
  • quota_files
  • string_key_1
  • string_key_2
  • string_key_3
  • string_key_4
  • threshold_action
  • threshold_bytes
  • threshold_bytes_target
  • threshold_files
  • threshold_files_target
  • threshold_grace_period

Refer to this table to view all fields that appear in the Container object.