Skip to main content

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.

NameTypeDescription
storage_providerenum                          
ftp
sftp
s3
gs
as
box
akamains
swift
swiftstack
http
relative
Select the type of location, such as S3, FTP, etc.
default: s3
urlstring
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
pathstring
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
accessanyOf         
ftp
sftp
http
s3
gs
as
box
akamains
swift
swiftstack
ssh
This contains credentials granting access to the location.
permissionsanyOf         This contains access permissions to be applied to objects in the location upon creation.
encryptionanyOf         This contains encryption settings to be applied to objects on retrieval or creation.
attributesarrayThis 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.

NameTypeDescription
usernamestring
The login user name.
passwordstring
The login password.
passive_modebooleanSets FTP Passive Mode.
credentials_keystring
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.

NameTypeDescription
usernamestring
The login user name.
passwordstring
The login password.
keystring
SSH private key.
credentials_keystring
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.

NameTypeDescription
usernamestring
The HTTP basic authentication user name.
passwordstring
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.

NameTypeDescription
credentials_keystring
Use the specified credentials from the Credentials Vault
max_cross_region_mbnumber
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.

NameTypeDescription
credentials_keystring
Use the specified credentials from the Credentials Vault
max_cross_region_mbnumber
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.

NameTypeDescription
credentials_keystring
Use the specified credentials from the Credentials Vault
max_cross_region_mbnumber
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.

NameTypeDescription
credentials_keystring
Use the specified credentials from the Credentials Vault.
access_tokenstring
The Box access token.
refresh_tokenstring
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.

NameTypeDescription
keynamestring
The public key name.
keystring
The secret key.
cp_codestring
The secret key.
credentials_keystring
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.

NameTypeDescription
usernamestring
The authentication user name.
passwordstring
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.

NameTypeDescription
usernamestring
The authentication user name.
passwordstring
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.

NameTypeDescription
keystring
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

NameTypeDescription
namestringName of the parameter.
valuestringValue 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}}"
}
}
}
}