Prerequisites
- A bucket whose schema has a blob field for the files, such as
{"video": {"type": "video"}}. See Bucket schema. - A collection sourced from that bucket, if you want the files processed as they arrive.
- An API key with the
adminpermission to create the connection, because connections hold credentials. The Studio key presets stop at read, write and delete; tick Admin in the key’s Edit dialog. Syncs, and reading connections, need onlywriteandread.
Connect and sync
The steps use Amazon S3 with an IAM role. Every other provider differs only in theprovider_type and provider_config of step 1 and the source_path format of step 2; see Providers.
1
Create the storage connection
Mixpeek’s production API assumes your role from AWS account
931340738373. Create a role that trusts that account, requires an external ID you choose (8 to 128 characters), and has s3:ListBucket on the bucket and s3:GetObject on its objects. The S3 accordion has the exact policies.test_before_save defaults to true. For S3 the test calls ListBuckets, which needs s3:ListAllMyBuckets on *, a permission a read-only role usually lacks. With false, the first sync run is the test. You can test a saved connection any time with POST /v1/organizations/connections/{id}/test.2
Create the sync on your bucket
422. Filters go inside file_filters.3
Run the first pass
Trigger the sync now
continuous sync polls on its own every polling_interval_seconds.Check that it worked
GET /v1/buckets/{bucket_id}/syncs/{sync_config_id} returns the sync’s status and counters:
Each run is a sync job:
POST .../syncs/{sync_config_id}/jobs lists them. When filters exclude every file a run finds, the run’s warning says so, and the job’s metadata.files_excluded_by_filter counts the files each filter dropped, with example paths. New objects then follow the object states PENDING to COMPLETED.
Providers
Every secret is encrypted at rest. Reading a connection back returns
provider_config.credentials with only its type. Databases, warehouses, RTSP cameras, RSS, HTTP APIs, social accounts and email use the same connection and sync calls and are covered in Streams, databases and the web.
Amazon S3
Amazon S3
Read policy for the role. To limit Mixpeek to a prefix, add
"Condition": {"StringLike": {"s3:prefix": ["videos/*"]}} to the first statement and use arn:aws:s3:::YOUR_BUCKET/videos/* in the second.Read policy
Trust policy
- To trust only Mixpeek’s API user, set the principal to
arn:aws:iam::931340738373:user/mixpeek-platform-prod. - Mixpeek requests a 1-hour session per sync run. CloudTrail shows each session as
mixpeek-storage-sync-<timestamp>. - Access keys also work:
{"type": "access_key", "access_key_id": "...", "secret_access_key": "..."}. A role keeps the secret in your account. regiondefaults tous-east-1and must match the bucket’s region.- To read object tags in a schema mapping, also grant
s3:GetObjectTagging.
Cloudflare R2, Wasabi, STRG and other S3-compatible stores
Cloudflare R2, Wasabi, STRG and other S3-compatible stores
Use A key scoped to one bucket usually cannot call
provider_type: "s3" with access-key credentials and the store’s endpoint_url:provider_config for R2
ListBuckets, so send "test_before_save": false.Google Cloud Storage
Google Cloud Storage
Create a service account with Storage Object Viewer and Storage Legacy Bucket Reader on the bucket, download a JSON key, and pass the whole key object. Mixpeek uses the native GCS API, so you do not need HMAC interoperability keys.
provider_config
bucket takes the name without gs://. The sync’s source_path is a prefix under the connection’s prefix; / syncs the whole connection scope.Azure Blob Storage
Azure Blob Storage
The provider type is
azure_blob; a bare azure returns 422.provider_config
managed_identity credentials authenticate as the Azure identity the Mixpeek workload runs under, so they apply when Mixpeek runs inside your Azure tenant (customer-hosted). Grant that identity Storage Blob Data Reader, and set client_id only to pick one of several user-assigned identities.Google Drive
Google Drive
With a service account, share the Drive folder or shared drive with the account’s
client_email (Viewer is enough). That share is what grants access. For one user’s Drive, use OAuth with client_id, client_secret and a long-lived refresh_token.provider_config
- Set
shared_drive_idonly for a shared drive. impersonate_userreads files as a Workspace user and needs domain-wide delegation.source_pathis the folder ID, the last segment of the folder’s URL. List what the connection can see withGET /v1/organizations/connections/{id}/foldersand/files.- Mixpeek only reads from Drive.
Box
Box
Create a Custom App at developer.box.com. For production use Client Credentials Grant (
ccg: client_id, client_secret, enterprise_id), and authorize the app in Admin Console > Apps > Custom Apps Manager. jwt takes client_id, client_secret, enterprise_id, jwt_key_id and private_key. oauth with a developer token expires after 60 minutes and cannot refresh, so use it only for testing.provider_config
folder_id is the number at the end of the folder URL (app.box.com/folder/123456789); 0 is the root. A CCG app acts as a service account, so grant it access to the folders you sync.Backblaze B2
Backblaze B2
Create an application key with
listBuckets, listFiles and readFiles, ideally scoped to one bucket. Mixpeek discovers the regional endpoint from the B2 authorization API.provider_config
source_path accepts b2://bucket/prefix, s3://bucket/prefix, bucket/prefix or bucket. A connection test can pass with listBuckets while the sync gets Access Denied; the key also needs listFiles and readFiles on that bucket.Tigris
Tigris
provider_config
endpoint_url defaults to https://fly.storage.tigris.dev and region to auto.Supabase Storage
Supabase Storage
Generate S3 access keys in Project Settings > Storage > S3 Access Keys. Mixpeek derives the endpoint from
project_ref, the short hash in https://<ref>.supabase.co.provider_config
session_token credentials (anon_key and service_role_key from Project Settings > API) work when you cannot mint S3 keys, but service_role has full access to Storage. A 403 or SignatureDoesNotMatch usually means general API keys were used instead of S3 keys, or region does not match the project.Mux
Mux
Create an access token with Mux Video read permission and pass
access_token_id and access_token_secret (type: "access_token").- Mixpeek downloads MP4 static renditions. Assets with only HLS are skipped, so enable
static_renditionson the asset. - Only assets in
readystatus with a playback ID sync. - Each object carries
source_metadatawithasset_id,playback_id,playback_url,thumbnail_url,duration,resolution_tierandaspect_ratio. It passes through to documents, so search results can render in a Mux player directly. - Filter on asset fields such as
passthroughwithfile_filters.metadata_filters. - For instant deletes and updates, see Source webhooks.
Iconik
Iconik
Create an application in Admin > Integrations > Applications and pass
app_id and auth_token (type: "app_token"). Set base_url for an on-premise Iconik.- Mixpeek downloads the proxy file, or the original when there is no proxy.
provider_filterstakescollection_ids(traversed up to 10 levels),status,media_typeandpath_patterns(case-insensitive globs on the collection path). The collection path lands insource_metadata.directory_path.- Custom metadata from every metadata view is flattened into
source_metadata. Limit it to one view withmetadata_view_id, or set it tononeto skip view calls. NLE_PROJECTassets (Premiere.prproj,.fcpxml, xmeml) getuses_footageanduses_mediaedges to the footage they use, with clip order and timeline ticks when the project file parses. Follow them with thetraverse_edgestage.reconcile.on_update: true(the default) repeats every per-asset call on every walk. For libraries over 10,000 assets, set it tofalseunless you need edits that leavedate_modifiedunchanged.
Sync options
file_filters narrows files on Mixpeek’s side; all filters must match. include_patterns and exclude_patterns are globs: without a / they match the file name at any depth (*.mp4), with a / they match the path from the sync root (videos/*.mp4). The other filters are min_size_bytes, max_size_bytes, modified_after, modified_before, mime_types, and metadata_filters, which compare provider metadata with equals, not_equals, contains, not_contains, gt, lt, gte, lte or exists.
Map file metadata to bucket fields
schema_mapping fills bucket fields from each file. Keys are bucket schema fields. A blob entry takes the file itself; a field entry reads a value from a source such as metadata, tag, filename_regex, folder_path or constant.
schema_mapping for S3 user metadata
metadata reads the x-amz-meta-* headers, keyed in lowercase without the prefix, with one HeadObject per file. tag reads object tags with one GetObjectTagging per file; other providers leave tag mappings empty. Each read happens only when a mapping uses that source.
How changes in the source arrive
Thereconcile object decides how the bucket follows the source. All four switches default to true.
On S3, a poll picks up anything that moves
LastModified:
S3 user metadata cannot change in place. Copy the object onto itself with
--metadata-directive REPLACE and every key, not only the changed one.
Run a sync on upload instead of polling
On S3, send bucket events to EventBridge and point an API destination at the sync’s trigger withqueue_follow_up=true. A trigger during a run queues one follow-up run, however many uploads arrive.
EventBridge setup
EventBridge setup
aws s3api put-bucket-notification-configuration --bucket YOUR_BUCKET --notification-configuration '{"EventBridgeConfiguration": {}}'- Create an EventBridge connection of type
API_KEYwith headerAuthorization: Bearer MIXPEEK_KEYand anX-Namespaceinvocation header. Use a dedicated key withwriteon the namespace. - Create an API destination for
https://api.mixpeek.com/v1/buckets/BUCKET_ID/syncs/SYNC_ID/trigger?queue_follow_up=true, methodPOST. Keep--invocation-rate-limit-per-secondat or under your plan’sdatarate limit divided by 60, for example 2 on Build. - Add a rule matching
"source": ["aws.s3"],"detail-type": ["Object Created"]and your bucket and prefix, targeting the destination with a retry policy and a dead-letter queue. The target’s role needsevents:InvokeApiDestination. - Keep the sync
continuouswithpolling_interval_seconds: 3600, so an hourly pass catches dropped events and deletes.
429 is retried by EventBridge. A sync sharded across several bucket_prefixes cannot queue a follow-up and answers 400. Job metadata.triggered_by reads manual_api_trigger or queued_follow_up.GetObject URL valid for at least an hour; see Objects and blobs. For a large existing library, run an initial_only sync and then bulk-submit.
Source webhooks for Mux and Iconik
Mux and Iconik can push deletes and updates so the bucket does not wait for the next poll. Store a random string of 32 or more characters ascredentials.webhook_secret on the connection, then register the endpoint in the provider with the same secret.
A delete removes every object synced from the asset and its documents. An update re-checks the asset against
metadata_filters and removes it if on_filter_drift is on. The endpoint answers 400 when the connection has no webhook_secret and 401 when the signature does not match.
Pause, resume and recover
A lock stops two runs of one sync at once, and a resume cursor lets an interrupted run continue where it stopped. Source tracking means a retried run never creates a duplicate object.
To restore a namespace snapshot to the exact files it saw, turn on object versioning in your bucket and keep old versions at least as long as your snapshots (30 days by default). Without it, a restored document points at the current file, or at nothing. See Storage, tiering and backups.
What goes wrong
Related
- Buckets and objects: schemas, object states, duplicates and batch sizing
- Streams, databases and the web: Postgres, Snowflake, RTSP, RSS, social and email sources
- Create storage connection API and Create sync API

