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.
Attribute | Data Type | Description |
---|---|---|
allow_publish | boolean | Whether or not the files in the container can be published. The default value is true . |
allowed_classifications | array | Any file with a classification not appearing on this list will be rejected. Values accepted in this field are:
|
available_bytes_percent read only | integer | The percentage of bytes available. |
available_files_percent read only | integer | The percentage of files available. |
blocked_classifications | array | Any file with a classification on this list will be rejected. Values accepted in this field are:
|
container_sid read only | string | The container secure ID. |
default_file_lifecycle_action | string | The 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_ttl | integer | The 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_publish | string | The 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_include | boolean | The 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_unique | boolean | The 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 | string | How the data is stored. At this time, only the default unassigned value is available. |
encrypted | boolean | Whether 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_attributes | object | The 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_1 | integer | A user-defined integer key. |
integer_key_2 | integer | A user-defined integer key. |
name | string | The container name. |
parent_container_sid | string | The parent container secure ID. If set, and referenced file no longer exists, the container will be deleted. |
partner_sid | string | The secure ID of the partner associated with the container. |
publish_domain | string | The domain URL that will be used to publish the files. |
quota_bytes | integer | The maximum number of bytes that can be stored in the container. The default value is 1073741824 . |
quota_files | integer | The maximum number of files that can be stored in the container. The default value is 100 . |
string_key_1 | string | A user-defined string key. |
string_key_2 | string | A user-defined string key. |
string_key_3 | string | A user-defined string key. |
string_key_4 | string | A user-defined string key. |
threshold_action | string | 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:
The default value is |
threshold_available_bytes_percent read only | integer | The 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 | integer | The number of files which are included into the threshold calculation in relation to the threshold_files value. |
threshold_bytes | integer | When 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_target | integer | The 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_files | integer | When 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_target | integer | The 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_period | integer | The 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 | integer | The 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 | integer | The 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 | integer | The total size of files in bytes that are stored in the container. |
total_files read only | integer | The total number of files that are stored in the container. |
type | string | 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 |
unique | boolean | Whether 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
.
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
Attribute | Data Type | Description |
---|---|---|
aws_access_key required | string | The access key used to access AWS S3. |
aws_bucket_name required | string | The bucket name where the container is stored. |
aws_secret_key required | string | The 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
Attribute | Data Type | Description |
---|---|---|
gcp_access_token | string | The 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 | string | The bucket name where the container is stored. |
gcp_client_id | string | The client ID used to access Google Cloud Platform. This attribute is only required if you do not specify gcp_access_token . |
gcp_client_secret | string | The client secret used to access Google Cloud Platform. This attribute is only required if you do not specify gcp_access_token . |
gcp_project required | string | The project that will be used to store the recording. |
gcp_refresh_token | string | The refresh token used to access Google Cloud Platform. This attribute is only required if you do not specify gcp_access_token . |
Not all the Google Cloud Platform attributes are required. You need to specify either:
- Set 1:
gcp_bucket_name
andgcp_project
andgcp_access_token
or
- Set 2:
gcp_bucket_name
andgcp_project
andgcp_refresh_token
andgcp_client_id
andgcp_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
Attribute | Data Type | Description |
---|---|---|
azure_account_key | string | The 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 | string | The account name used to access Microsoft Azure Blob storage. |
azure_container_name required | string | The container name where the container is stored. |
azure_sas_token | string | The SAS token used to access Microsoft Azure Blob storage. This attribute is only required if you do not specify azure_account_key . |
Not all the Microsoft Azure Blob storage attributes are required. You need to specify either:
- Set 1:
azure_account_name
andazure_container_name
andazure_account_key
or
- Set 2:
azure_account_name
andazure_container_name
andazure_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'