Location
There are many places in the Hybrik API where you refer to file locations. The basic parameters you need to provide are where the storage is located (such as Amazon S3, Google Storage, or an HTTP location) and a path. The default credentials will be the credentials used to launch the machine group the job is executing on. There are a number of advanced parameters you can provide, such as access credentials, encryption settings, etc. Access credentials can be stored in the Credentials Vault and referenced by name, rather than by explicitly including credentials in the JSON.
Name | Type | Description |
---|---|---|
storage_provider | enum ftp sftp s3 gs as box akamains swift swiftstack http relative | Select the type of location, such as S3, FTP, etc. default: s3 |
url | string | Describes the location of a single file. If you need to refer to a folder, use the path parameter instead. The full pathname of the file must be used. Example: s3://my_bucket/my_path/my_file.mov |
path | string | Describes the location of a folder. If you need to refer to a file, use the url parameter instead. The full pathname of the folder must be used. Example: s3://my_bucket/my_path |
access | anyOf ftp sftp http s3 gs as box akamains swift swiftstack ssh | This contains credentials granting access to the location. |
permissions | anyOf | This contains access permissions to be applied to objects in the location upon creation. |
encryption | anyOf | This contains encryption settings to be applied to objects on retrieval or creation. |
attributes | array | This contains attributes, such as CacheControl headers, to be applied to objects in the location upon creation. |
Location Example
{
"name": "Hybrik Locations",
"payload": {
"elements": [
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_url",
"payload": {
"storage_provider": "s3",
"url": "s3://my_bucket/my_input_folder/my_file.mp4",
"access": {
"credentials_key": "my_aws_creds",
"max_cross_region_mb": -1
}
}
}
},
{
"uid": "transcode_task",
"kind": "transcode",
"payload": {
"location": {
"storage_provider": "s3",
"path": "s3://my_other_bucket/my_output_folder",
"access": {
"credentials_key": "my_other_aws_creds"
}
},
"targets": [
// targets are here
]
}
}
],
"connections": [
// connections are here
]
}
}
FTP
Destination can be an FTP location.
Name | Type | Description |
---|---|---|
username | string | The login user name. |
password | string | The login password. |
passive_mode | boolean | Sets FTP Passive Mode. |
credentials_key | string | Use API Key to reference credentials inside the Hybrik Credentials Vault. |
FTP Example
"location": {
"storage_provider": "ftp",
"path": "ftp://my_server/my_folder",
"access": {
"username": "my_username",
"password": "my_password"
}
}
SFTP
Destination can be an SFTP location.
Name | Type | Description |
---|---|---|
username | string | The login user name. |
password | string | The login password. |
key | string | SSH private key. |
credentials_key | string | Use API Key to reference credentials inside the Hybrik Credentials Vault. |
SFTP Example
"location": {
"storage_provider": "sftp",
"path": "sftp://my_server/my_folder/my_file",
"access": {
"credentials_key": "my_sftp_creds"
}
}
HTTP
Source or destination can be an HTTPS location.
Name | Type | Description |
---|---|---|
username | string | The HTTP basic authentication user name. |
password | string | The HTTP basic authentication password. |
HTTP Example
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_url",
"payload": {
"storage_provider": "http",
"url": "https://my_server/my_folder/my_file.mp4",
"access": {
"username": "my_username",
"password": "my_password"
}
}
}
}
S3
Source or destination can be an Amazon AWS S3 location.
Name | Type | Description |
---|---|---|
credentials_key | string | Use the specified credentials from the Credentials Vault |
max_cross_region_mb | number | This sets the maximum amount of data (in MB) that can be transferred across regions. The default is set to 10MB to avoid excessive inter-region transfer costs. Set this to -1 to allow unlimited transfers. |
S3 Example
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_url",
"payload": {
"storage_provider": "s3",
"url": "s3://my_bucket/my_folder/my_file.mp4",
"access": {
"credentials_key": "my_other_aws_creds"
}
}
}
}
GS
Source or destination can be a Google Storage location.
Name | Type | Description |
---|---|---|
credentials_key | string | Use the specified credentials from the Credentials Vault |
max_cross_region_mb | number | This sets the maximum amount of data (in MB) that can be transferred across regions. The default is set to 10MB to avoid excessive inter-region transfer costs. Set this to -1 to allow unlimited transfers. |
GS Example
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_url",
"payload": {
"storage_provider": "gs",
"url": "gs://my_bucket/my_folder/my_file.mp4",
"access": {
"credentials_key": "my_google_creds"
}
}
}
}
AS
Source or destination can be a Microsoft Azure location.
Name | Type | Description |
---|---|---|
credentials_key | string | Use the specified credentials from the Credentials Vault |
max_cross_region_mb | number | This sets the maximum amount of data (in MB) that can be transferred across regions. The default is set to 10MB to avoid excessive inter-region transfer costs. Set this to -1 to allow unlimited transfers. |
AS Example
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_url",
"payload": {
"storage_provider": "as",
"url": "as://my_bucket/my_folder/my_file.mp4",
"access": {
"credentials_key": "my_azure_creds"
}
}
}
}
Box
Source or destination can be an Box location.
Name | Type | Description |
---|---|---|
credentials_key | string | Use the specified credentials from the Credentials Vault. |
access_token | string | The Box access token. |
refresh_token | string | The Box refresh token. |
Box Example
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_url",
"payload": {
"storage_provider": "box",
"url": "box://132242089072",
"access": {
"credentials_key": "my_box_creds"
"refresh_token": "28AeDxCqGkyCnlKjltBQAGCjHZvMholuQKrErV8ctSnc555ARY4a33Y4ctdHfXs"
}
}
}
}
AkamaiNS
Source or destination can be an Akamai Network Storage location.
Name | Type | Description |
---|---|---|
keyname | string | The public key name. |
key | string | The secret key. |
cp_code | string | The secret key. |
credentials_key | string | Use API Key to reference credentials inside the Hybrik Credentials Vault. |
AkamaiNS Example
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_url",
"payload": {
"storage_provider": "akamains",
"url": "http://me.akamai.com",
"access": {
"keyname": "my_keyname",
"key": "my_secret_key"
}
}
}
}
Swift
Source or destination can be an Swift-compatible location.
Name | Type | Description |
---|---|---|
username | string | The authentication user name. |
password | string | The authentication password. |
Swift Example
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_url",
"payload": {
"storage_provider": "swift",
"url": "https://my_swift_server/my_folder/my_file.mp4",
"access": {
"username": "my_username",
"password": "my_password"
}
}
}
}
SwiftStack
Source or destination can be an SwiftStack compatible location.
Name | Type | Description |
---|---|---|
username | string | The authentication user name. |
password | string | The authentication password. |
SwiftStack Example
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_url",
"payload": {
"storage_provider": "swiftstack",
"url": "s3://my_swiftstack_server/my_folder/my_file.mp4",
"access": {
"username": "my_username",
"password": "my_password"
}
}
}
}
SSH
Source or destination can be an SSH location.
Name | Type | Description |
---|---|---|
key | string | SSH private/public key. |
SSH Example
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_url",
"payload": {
"storage_provider": "swiftstack",
"url": "s3://my_swiftstack_server/my_folder/my_file.mp4",
"access": {
"username": "my_username",
"password": "my_password"
}
}
}
}
Attributes
Name | Type | Description |
---|---|---|
name | string | Name of the parameter. |
value | string | Value of the parameter. |
Attributes Example
{
"uid": "hls_single_ts",
"kind": "package",
"payload": {
"uid": "main_manifest",
"kind": "hls",
"location": {
"storage_provider": "s3",
"path": "{{destination_hls_manifests}}",
"attributes": [
{
"name": "ContentType",
"value": "application/x-mpegURL"
}
]
},
"file_pattern": "master_manifest.m3u8",
"segmentation_mode": "single_ts",
"media_location": {
"storage_provider": "s3",
"path": "{{destination_hls_media}}",
"attributes": [
{
"name": "ContentType",
"value": "video/MP2T"
}
]
},
"hls": {
"media_playlist_location": {
"storage_provider": "s3",
"path": "{{destination_hls_manifests}}"
}
}
}
}