Skip to content

Cloud Connections

The MASV API allows authorized users to connect their Portals to an external cloud storage provider by way of Cloud Connect. The connection details are entered once and can be reused across multiple Portals. Each Portal can have one or more connections attached, and as new uploads are received they are transferred automatically to each external cloud storage account.

You can create cloud connections for storage device integrations by installing the MASV Agent on the device and configuring a storage gateway. See Provider examples for information about specific storage devices.

MethodRoute
POST/teams/{team_id}/cloud_connections
NameTypeRequiredDescription
X-API-KEYStringYesAPI key
Content-TypeStringYesMust be application/json
NameTypeRequiredDescription
nameStringNoName of the connection
providerStringYesCloud storage provider
directionStringNomasv_to_cloud or cloud_to_masv. Default: masv_to_cloud
authorizationObjectYesAuthorization credentials, specific to each provider
target_directory_idStringNoCustom directory path for package files (masv_to_cloud only)
source_directory_idsString[]NoSource directories for filepicker (cloud_to_masv only)
upload_transfer_manifestBooleanNoGenerate a JSON manifest file for transfers (S3 and S3-compatible only)
Terminal window
curl -d '{"name": "$NAME", "provider": "$PROVIDER", "direction": "masv_to_cloud", "authorization": {"$KEY1":"$VALUE1"}, "target_directory_id":"$TARGET_DIR"}' \
-H "X-API-KEY: $API_KEY" \
-H "Content-Type: application/json" \
-X POST https://api.massive.app/v1/teams/$TEAM_ID/cloud_connections

For the cloud_to_masv direction, your application can send from the amazon_s3 and wasabi_s3 providers.

Terminal window
curl -d '{"name": "$NAME", "provider": "$PROVIDER", "direction": "cloud_to_masv", "authorization": {"$KEY1":"$VALUE1"}, "source_directory_ids":["$SOURCE_DIR"]}' \
-H "X-API-KEY: $API_KEY" \
-H "Content-Type: application/json" \
-X POST https://api.massive.app/v1/teams/$TEAM_ID/cloud_connections

Returns 201 Created:

{
"created_at": "2020-10-06T12:44:19.369Z",
"direction": "masv_to_cloud",
"id": "01EKYZ1VH9GTS9GYMCMSR4NR9G",
"name": "Sample Connection",
"provider": "amazon_s3",
"state": "ok",
"updated_at": "2020-10-06T12:44:19.369Z"
}

MASV integrates with a growing list of cloud storage providers. All provider authorization fields are required unless noted otherwise.

Provider value: amazon_s3

MASV supports transfers to or from an Amazon S3 bucket in any region. You must create an IAM policy with the required permissions.

masv_to_cloud permissions: s3:PutObject, s3:AbortMultipartUpload, s3:ListBucket, s3:DeleteObject, s3:GetBucketLocation

cloud_to_masv permissions: s3:GetObject, s3:ListBucket

Attach the IAM policy to an IAM user and create an access key.

Attach the IAM policy to an IAM role with a trust policy allowing MASV to assume the role. This model does not require routine key rotation.

NameTypeDescription
client_idStringAccess key ID (key-based access only)
client_secretStringAccess key secret (key-based access only)
role_arnStringARN of the IAM role (role-based access only)
external_idStringExternal ID in trust policy (role-based access only)
destinationStringBucket name
regionStringAWS region (e.g., us-east-1)
storage_classStringS3 storage class: STANDARD, INTELLIGENT_TIERING, STANDARD_IA, ONEZONE_IA, GLACIER_IR, GLACIER, or DEEP_ARCHIVE. Default: STANDARD

Provider value: amazon_efs_sg

Create a cloud connection with Amazon EBS or EFS storage that has the MASV Agent installed via a storage gateway.

Provider value: azure

MASV supports uploading to an Azure storage container using a Shared Access Signature (SAS) URI with Blob service access on Object and Container resource types.

NameTypeDescription
blob_service_sas_urlStringA Blob service SAS URL
destinationStringName of the container

Provider value: backblazeb2

NameTypeDescription
client_idStringKey ID with access to the bucket
client_secretStringApplication key
destinationStringBucket name

Provider value: box

NameTypeDescription
client_idStringClient ID from Box keypair JSON
client_secretStringClient secret from Box keypair JSON
public_key_idStringPublic key ID
private_keyStringPrivate key (full PEM format)
passphraseStringPassphrase
enterprise_idStringEnterprise ID

Provider value: desktop_sg

Connect via MASV Desktop App with a storage gateway.

Provider value: digital_ocean_s3

NameTypeDescription
client_idStringAccess key ID
client_secretStringAccess key secret
destinationStringBucket name
endpointStringRegion URL (e.g., sfo2.digitaloceanspaces.com)
regionStringRegion (e.g., sfo2)

Provider value: frameio_v4

NameTypeDescription
auth_strategyStringMust be server
client_idStringAdobe S2S project client ID
client_secretStringAdobe S2S project client secret
account_idStringFrame.io account ID
workspace_idStringFrame.io workspace ID
project_idStringFrame.io project ID

Provider value: frameio

NameTypeDescription
developer_tokenStringFrame.io developer token
account_idStringFrame.io account ID
team_idStringFrame.io team ID
project_idStringFrame.io project ID

Provider value: google_cloud_storage

NameTypeDescription
client_emailStringClient email of the GCS Service Account
private_keyStringPrivate key (full PEM format)
destinationStringBucket name

Provider value: ibm_cloud_s3

NameTypeDescription
client_idStringAccess key ID
client_secretStringAccess key secret
destinationStringBucket name
endpointStringRegion URL
regionStringRegion (e.g., us-east)

Provider value: iconik

NameTypeDescription
application_idStringIconik application ID
application_tokenStringIconik application token
storage_idStringIconik storage account ID

Provider value: jellyfish_sg

Connect via MASV Agent with a storage gateway.

Provider value: minio_s3

NameTypeDescription
client_idStringAccess key ID
client_secretStringAccess key secret
destinationStringBucket name
endpointStringURL for the bucket
regionStringRegion (typically default)
force_s3_path_styleStringWhether to use path-style URLs

Provider value: object_matrix_s3

NameTypeDescription
client_idStringAccess key ID
client_secretStringAccess key secret
destinationStringBucket name
endpointStringURL (e.g., spacename.matrixstore.cloud:12323)
regionStringMust be eu

Provider value: opendrives_sg

Connect via MASV Agent with a storage gateway.

Provider value: postlab

NameTypeDescription
team_idStringPostLab team key

Provider value: qnap_sg

Connect via MASV Agent with a storage gateway.

Provider value: lyve_cloud_s3

NameTypeDescription
client_idStringAccess key ID
client_secretStringAccess key secret
destinationStringBucket name
endpointStringRegion URL
regionStringRegion

Provider value: storj_s3

NameTypeDescription
client_idStringAccess key ID
client_secretStringAccess key secret
destinationStringBucket name
endpointStringURL (e.g., https://gateway.storjshare.io)
regionStringShould be default

Provider value: synology_sg

Connect via MASV Agent with a storage gateway.

Provider value: wasabi_s3

NameTypeDescription
client_idStringAccess key ID
client_secretStringAccess key secret
destinationStringBucket name
endpointStringRegion URL (e.g., s3.us-east-1.wasabisys.com)
regionStringRegion

Provider value: generic_s3

NameTypeDescription
client_idStringAccess key ID
client_secretStringAccess key secret
destinationStringBucket name
endpointStringURL for the bucket
regionStringRegion (use default if none)
force_s3_path_styleStringWhether to use path-style URLs

Provider value: storage_gateway

Connect any NAS or SAN with the MASV Agent installed via a storage gateway.

MethodRoute
GET/teams/{team_id}/cloud_connections
Terminal window
curl -H "X-API-KEY: $API_KEY" \
-X GET https://api.massive.app/v1/teams/$TEAM_ID/cloud_connections

Returns 200 OK with an array of connection objects.

MethodRoute
PUT/cloud_connections/{connection_id}
NameTypeRequiredDescription
nameStringNoName of the connection
authorizationObjectNoAuthorization credentials

Any authorization properties not provided will be assumed unchanged.

Terminal window
curl -d '{"name": "$NAME", "authorization": {"$KEY1":"$VALUE1"}}' \
-H "X-API-KEY: $API_KEY" \
-H "Content-Type: application/json" \
-X PUT https://api.massive.app/v1/cloud_connections/$CONNECTION_ID

Returns 200 OK with the updated connection object.

MethodRoute
DELETE/cloud_connections/{connection_id}
Terminal window
curl -H "X-API-KEY: $API_KEY" \
-X DELETE https://api.massive.app/v1/cloud_connections/$CONNECTION_ID

Returns 204 No Content. In-progress transfers will complete normally.

Manage cloud connections by updating the Portal with a list of connections to enable.

MethodRoute
PUT/portals/{portal_id}
NameTypeRequiredDescription
cloud_connectionsObject[]NoList of connections with id, target_action, and optional filter_id
configure_cloud_connectionsBooleanYesMust be true to update connections
Terminal window
curl -d '{"name": "$NAME", "subdomain": "$SUBDOMAIN", "configure_cloud_connections": true, "cloud_connections": [{"id":"$ID1", "target_action":"transfer"}], "active": true, "has_access_code": false}' \
-H "X-API-KEY: $API_KEY" \
-H "Content-Type: application/json" \
-X PUT https://api.massive.app/v1/portals/$PORTAL_ID
MethodRoute
POST/packages/{package_id}/transfer
NameTypeRequiredDescription
X-Package-TokenStringYesPackage JSON Web Token
NameTypeRequiredDescription
cloud_connection_idStringYesID of the cloud connection
notify_emailStringNoEmail to notify when transfer completes
filesObject[]NoFiles/directories to transfer (cloud_to_masv only)
Terminal window
curl -H "X-Package-Token: $PACKAGE_TOKEN" \
-H "Content-Type: application/json" \
-X POST https://api.massive.app/v1/packages/$PACKAGE_ID/transfer \
-d '{"notify_email": "$EMAIL", "cloud_connection_id": "$CONNECTION_ID"}'