Skip to main content

Container Object

This section outlines the Container object.

Container Object Attributes

The fields listed in the table below will be returned in a JSON object when a successful request has been made.

AttributeData TypeDescription
allow_publishbooleanWhether or not the files in the container can be published. The default value is true.
allowed_classificationsarray

Any file with a classification not appearing on this list will be rejected. Values accepted in this field are:

  • archive
  • document
  • executable
  • media
  • unknown
available_bytes_percent
read only
integerThe percentage of bytes available.
available_files_percent
read only
integerThe percentage of files available.
blocked_classificationsarray

Any file with a classification on this list will be rejected. Values accepted in this field are:

  • archive
  • document
  • executable
  • media
  • unknown
container_sid
read only
stringThe container secure ID.
default_file_lifecycle_actionstringThe value for the lifecycle_action attribute of the File object that will be applied by default when uploading files to the container. The default value is no_action.
default_file_lifecycle_ttlintegerThe value for the lifecycle_ttl attribute of the File object that will be applied by default when uploading files to the container. The default value is -1.
default_file_publishstringThe value for the publish attribute of the File object that will be applied by default when uploading files to the container. The default value is file_sid.
default_file_threshold_includebooleanThe value for the threshold_include attribute of the File object that will be applied by default when uploading files to the container. The default value is true.
default_file_uniquebooleanThe value for the unique attribute of the File object that will be applied by default when uploading files to the container. The default value is false.
durability_class
read only
stringHow the data is stored. At this time, only the default unassigned value is available.
encryptedbooleanWhether or not the data is stored on an encrypted disk. The default value for this field is false. Note that this value cannot be changed after the Container object has been created.
external_attributesobjectThe set of the attributes necessary to access the external container if the type is set to aws, azure, or gcp. Refer to the section below for more information on this attribute.
integer_key_1integerA user-defined integer key.
integer_key_2integerA user-defined integer key.
namestringThe container name.
parent_container_sidstringThe parent container secure ID. If set, and referenced file no longer exists, the container will be deleted.
partner_sidstringThe secure ID of the partner associated with the container.
publish_domainstringThe domain URL that will be used to publish the files.
quota_bytesintegerThe maximum number of bytes that can be stored in the container. The default value is 1073741824.
quota_filesintegerThe maximum number of files that can be stored in the container. The default value is 100.
string_key_1stringA user-defined string key.
string_key_2stringA user-defined string key.
string_key_3stringA user-defined string key.
string_key_4stringA user-defined string key.
threshold_actionstring

The action to be performed when the threshold is exceeded (either the number of files or size in bytes). Values accepted in this field are:

  • delete_lru to trigger the storage cleanup job every 2 minutes and delete least recently used files with the threshold_include attribute set to true. The cleanup job runs until the number of files is below threshold_files_target and threshold_bytes_target values. The job also updates the counters for total_bytes/ total_files and available_bytes_percent/ available_files_percent.
  • no_action to trigger no action when the threshold is exceeded.
  • reject to reject the upload of the files which number or size exceeds the threshold set.

The default value is no_action.

threshold_available_bytes_percent
read only
integerThe size of files in bytes which are included into the threshold calculation in relation to the threshold_bytes value.
threshold_available_files_percent
read only
integerThe number of files which are included into the threshold calculation in relation to the threshold_files value.
threshold_bytesintegerWhen this size of files in bytes is exceeded, the system will trigger the storage cleanup job if the threshold_action is set to delete_lru. The value must be less or equal to the quota_bytes attribute value.
threshold_bytes_targetintegerThe target size of files in bytes which the system must reach after the storage cleanup job runs. The value must be less or equal to threshold_bytes attribute value.
threshold_filesintegerWhen this number of files is exceeded, the system will trigger the storage cleanup job if the threshold_action is set to delete_lru. The value must be less or equal to the quota_files attribute value.
threshold_files_targetintegerThe target number of files which the system must reach after the storage cleanup job runs. The value must be less or equal to threshold_files attribute value.
threshold_grace_periodintegerThe time in seconds during which the system allows uploading files when the limit is reached. This attribute is used when the threshold_action is set to reject. The default value is 0.
threshold_total_bytes
read only
integerThe total size of files in bytes which are included into the threshold calculation, i.e., the files with the threshold_include attribute set to true.
threshold_total_files
read only
integerThe total number of files which are included into the threshold calculation, i.e., the files with the threshold_include attribute set to true.
total_bytes
read only
integerThe total size of files in bytes that are stored in the container.
total_files
read only
integerThe total number of files that are stored in the container.
typestring

The type of the container, either CarrierX hosted container or one of the supported external storage services. Values accepted in this field are:

The default value for this field is internal.

uniquebooleanWhether or not the container key set (integer_key_1, integer_key_2, string_key_1, string_key_2, string_key_3, and string_key_4) must be unique. If you create a container with the unique attribute set to true, other unique containers (that also have unique set to true) with the same container key set will not be created. Please set this field when the Container object is initially created to avoid errors. The default value for this field is false.

Sample 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": null,
"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
}

Supported External Storage

CarrierX allows you to use not only the standard containers hosted with CarrierX, but also several types of external storage. For this, set the container type to either aws, or azure, or gcp.

warning

When you specify one of the external storage services as a container, the following limitations are applied:

  • The system will not check for the external container limits (containers quantity limit, total space limit).
  • You cannot upload files to the external containers using CarrierX API or portal.

The following external storage services are supported for containers:

You will need to provide the credentials and specify the storage location for each of the external storage used. You can use only one external storage at a time for a single container. Refer to the tables below to learn what parameters you need to specify for each storage type.

Amazon Simple Storage Service

AttributeData TypeDescription
aws_access_key
required
stringThe access key used to access AWS S3.
aws_bucket_name
required
stringThe bucket name where the container is stored.
aws_secret_key
required
stringThe secret key used to access AWS S3.

The following request creates an external container with the data stored in Amazon Simple Storage Service:

curl -X POST \
'https://api.carrierx.com/core/v2/storage/containers' \
-H 'Content-Type: application/json' \
--data-binary '{"type":"aws","external_attributes":{"aws_access_key":"_AWS_ACCESS_KEY_","aws_bucket_name":"_AWS_BUCKET_NAME_","aws_secret_key":"_AWS_SECRET_ACCESS_KEY_"}}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Google Cloud Platform

AttributeData TypeDescription
gcp_access_token
stringThe access token used to access Google Cloud Platform. This attribute is only required if you do not specify gcp_refresh_token, gcp_client_id, and gcp_client_secret.
gcp_bucket_name
required
stringThe bucket name where the container is stored.
gcp_client_id
stringThe client ID used to access Google Cloud Platform. This attribute is only required if you do not specify gcp_access_token.
gcp_client_secret
stringThe client secret used to access Google Cloud Platform. This attribute is only required if you do not specify gcp_access_token.
gcp_project
required
stringThe project that will be used to store the recording.
gcp_refresh_token
stringThe refresh token used to access Google Cloud Platform. This attribute is only required if you do not specify gcp_access_token.
note

Not all the Google Cloud Platform attributes are required. You need to specify either:

  • Set 1: gcp_bucket_name and gcp_project and gcp_access_token

or

  • Set 2: gcp_bucket_name and gcp_project and gcp_refresh_token and gcp_client_id and gcp_client_secret

All the parameters from at least one of the sets above must be provided for the access to Google Cloud Platform.

The following request creates an external container with the data stored in Google Cloud Platform:

curl -X POST \
'https://api.carrierx.com/core/v2/storage/containers' \
-H 'Content-Type: application/json' \
--data-binary '{"type":"gcp","external_attributes":{"gcp_bucket_name":"_GCP_BUCKET_NAME_","gcp_project":"_GCP_PROJECT_","gcp_access_token":"_GCP_ACCESS_TOKEN_"}}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

This request also creates an external container with the data stored in Google Cloud Platform but uses a different attributes set:

curl -X POST \
'https://api.carrierx.com/core/v2/storage/containers' \
-H 'Content-Type: application/json' \
--data-binary '{"type":"gcp","external_attributes":{"gcp_bucket_name":"_GCP_BUCKET_NAME_","gcp_project":"_GCP_PROJECT_","gcp_refresh_token":"_GCP_REFRESH_TOKEN_","gcp_client_id":"_GCP_CLIENT_ID_","gcp_client_secret":"_GCP_CLIENT_SECRET_"}}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Microsoft Azure Blob Storage

AttributeData TypeDescription
azure_account_key
stringThe account key used to access Microsoft Azure Blob storage. This attribute is only required if you do not specify azure_sas_token.
azure_account_name
required
stringThe account name used to access Microsoft Azure Blob storage.
azure_container_name
required
stringThe container name where the container is stored.
azure_sas_token
stringThe SAS token used to access Microsoft Azure Blob storage. This attribute is only required if you do not specify azure_account_key.
note

Not all the Microsoft Azure Blob storage attributes are required. You need to specify either:

  • Set 1: azure_account_name and azure_container_name and azure_account_key

or

  • Set 2: azure_account_name and azure_container_name and azure_sas_token

All the parameters from at least one of the sets above must be provided for the access to Microsoft Azure Blob storage.

The following request creates an external container with the data stored in Microsoft Azure Blob storage:

curl -X POST \
'https://api.carrierx.com/core/v2/storage/containers' \
-H 'Content-Type: application/json' \
--data-binary '{"type":"azure","external_attributes":{"azure_account_name":"_AZURE_ACCOUNT_NAME_","azure_container_name":"_AZURE_CONTAINER_NAME_","azure_account_key":"_AZURE_ACCOUNT_KEY_"}}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

This request also creates an external container with the data stored in Microsoft Azure Blob storage but uses a different attributes set:

curl -X POST \
'https://api.carrierx.com/core/v2/storage/containers' \
-H 'Content-Type: application/json' \
--data-binary '{"type":"azure","external_attributes":{"azure_account_name":"_AZURE_ACCOUNT_NAME_","azure_container_name":"_AZURE_CONTAINER_NAME_","azure_sas_token":"_AZURE_SAS_TOKEN_"}}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'