Backblaze B2 Indexing API
Captain indexes Backblaze B2 through B2’s S3-compatible API. You create one read-only application key scoped to the bucket you want indexed, and Captain uses it to read the whole bucket, a directory (recursively), or a single file. No Backblaze account access beyond that key is involved.
What you provide
One-time setup
- Sign in at secure.backblaze.com and go to Application Keys.
- Click Add a New Application Key and name it (for example
captain-indexing). - Under Allow access to Bucket(s), pick the one bucket you want indexed.
- Set Type of Access to Read Only.
- Click Create New Key. Copy both the keyID and the applicationKey right away; the applicationKey is shown only once.
- Find your endpoint: open Buckets, and copy the Endpoint shown on
the bucket (for example
s3.us-west-004.backblazeb2.com). The region is the middle segment (us-west-004).
The account’s master application key does not work with the S3-compatible API. Always create a regular application key as above.
Indexing
All three endpoints take the same credential fields and differ only in scope.
A whole bucket
A directory (recursively)
Subdirectories are indexed too.
A single file
file_uri is the object key within the bucket.
Every response is { "job_id": "...", "status": "pending" }. Poll
GET /v2/collections/{name}/jobs/{job_id} for progress, then query the
collection with POST /v2/collections/{name}/query.
Troubleshooting
Security notes
- Create the key Read Only and scoped to the single bucket; Captain never needs write access.
- The applicationKey is a credential: treat it like a password. Revoke it any time from the Application Keys page.
- Captain uses the key per job; nothing durable is stored beyond the request.