Skip to main content
Connect a storage provider once, then point a sync at a folder or prefix so new and changed files land in a Mixpeek bucket and get processed. Your files stay where they are; Mixpeek reads them with the credentials you give it. A sync has two parts:

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 admin permission 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 only write and read.

Connect and sync

The steps use Amazon S3 with an IAM role. Every other provider differs only in the provider_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

The sync request rejects unknown top-level fields with 422. Filters go inside file_filters.
3

Run the first pass

Trigger the sync now
After this, a 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.
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.
  • region defaults to us-east-1 and must match the bucket’s region.
  • To read object tags in a schema mapping, also grant s3:GetObjectTagging.
Use provider_type: "s3" with access-key credentials and the store’s endpoint_url:
provider_config for R2
A key scoped to one bucket usually cannot call ListBuckets, so send "test_before_save": false.
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.
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.
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_id only for a shared drive.
  • impersonate_user reads files as a Workspace user and needs domain-wide delegation.
  • source_path is the folder ID, the last segment of the folder’s URL. List what the connection can see with GET /v1/organizations/connections/{id}/folders and /files.
  • Mixpeek only reads from Drive.
Register an Azure AD app with Microsoft Graph Sites.Read.All and Files.Read.All and grant admin consent. client_credentials (app-only, for production) takes tenant_id, client_id and client_secret. delegated acts as one user and adds refresh_token; tenant_id can be common for a multi-tenant app.
provider_config
Omit site_id for personal OneDrive, drive_id for the site’s default library, and folder_path for the library root. Find the IDs with Graph: GET /v1.0/sites/contoso.sharepoint.com:/sites/Marketing, then GET /v1.0/sites/SITE_ID/drives.
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.
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.
provider_config
endpoint_url defaults to https://fly.storage.tigris.dev and region to auto.
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.
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_renditions on the asset.
  • Only assets in ready status with a playback ID sync.
  • Each object carries source_metadata with asset_id, playback_id, playback_url, thumbnail_url, duration, resolution_tier and aspect_ratio. It passes through to documents, so search results can render in a Mux player directly.
  • Filter on asset fields such as passthrough with file_filters.metadata_filters.
  • For instant deletes and updates, see Source webhooks.
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_filters takes collection_ids (traversed up to 10 levels), status, media_type and path_patterns (case-insensitive globs on the collection path). The collection path lands in source_metadata.directory_path.
  • Custom metadata from every metadata view is flattened into source_metadata. Limit it to one view with metadata_view_id, or set it to none to skip view calls.
  • NLE_PROJECT assets (Premiere .prproj, .fcpxml, xmeml) get uses_footage and uses_media edges to the footage they use, with clip order and timeline ticks when the project file parses. Follow them with the traverse_edge stage.
  • reconcile.on_update: true (the default) repeats every per-asset call on every walk. For libraries over 10,000 assets, set it to false unless you need edits that leave date_modified unchanged.

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
On S3 and S3-compatible stores, 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

The reconcile 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 with queue_follow_up=true. A trigger during a run queues one follow-up run, however many uploads arrive.
  1. aws s3api put-bucket-notification-configuration --bucket YOUR_BUCKET --notification-configuration '{"EventBridgeConfiguration": {}}'
  2. Create an EventBridge connection of type API_KEY with header Authorization: Bearer MIXPEEK_KEY and an X-Namespace invocation header. Use a dedicated key with write on the namespace.
  3. Create an API destination for https://api.mixpeek.com/v1/buckets/BUCKET_ID/syncs/SYNC_ID/trigger?queue_follow_up=true, method POST. Keep --invocation-rate-limit-per-second at or under your plan’s data rate limit divided by 60, for example 2 on Build.
  4. 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 needs events:InvokeApiDestination.
  5. Keep the sync continuous with polling_interval_seconds: 3600, so an hourly pass catches dropped events and deletes.
Each triggered run still lists the prefix, about 4 seconds for 20,000 objects, so events suit prefixes up to about that size. A 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.
To push files from your own code instead, create objects through the API with a presigned 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 as credentials.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