dodil k3 object
Manage objects in a K3 bucket — create (upload), show, list, url (presign), remove. All object subcommands take a required -b/--bucket flag (persistent on the group).
dodil k3 object createuploads via HTTP PUT to<api-endpoint>/<bucket>/<key>. There is no gRPC equivalent for object bytes — see Objects — byte plane.
dodil k3 object create
dodil k3 object create [file-path] -b BUCKET [-k KEY]Uploads a local file as an object. If --key is omitted, the object key defaults to the file’s base name.
| Flag | Short | Type | Description |
|---|---|---|---|
--bucket | -b | string | Required. Target bucket name. |
--key | -k | string | Object key (defaults to filepath.Base(file-path)). |
Examples:
# Key defaults to "sample.pdf"
dodil k3 object create ./sample.pdf -b kb-prod
# Explicit key with prefix
dodil k3 object create ./contract.pdf -b kb-prod -k docs/contract.pdf
# Override the upload endpoint (the upload uses HTTP, not gRPC)
dodil k3 --api-endpoint "https://k3.dev.dodil.io" \
object create ./sample.pdf -b kb-prod -k docs/sample.pdfdodil k3 object show
dodil k3 object show [key] -b BUCKETReturns object metadata (ObjectInfo — size, etag, content-type, per-pipeline index status). See Core Concepts → Object for the type signature.
Example:
dodil k3 object show docs/contract.pdf -b kb-prod --output jsondodil k3 object list
dodil k3 object list -b BUCKETLists objects in the bucket. Filtering by prefix / delimiter / pagination exists on the ListObjects API but is not surfaced as CLI flags today.
dodil k3 object url
dodil k3 object url [key] -b BUCKET [--expires SECS]Generates a pre-signed URL for an object — mirrors GetObjectUrl. Default output prints just the URL on stdout (pipe-friendly); --output json returns the full GetObjectUrlResponse (url + expiresAt).
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--bucket | -b | string | — | Required. Target bucket name. |
--expires | — | int64 | 3600 | URL expiry in seconds. Server caps at 86400 (24h). |
Examples:
# 1h URL (default) — pipe-friendly, just the URL is printed
URL=$(dodil k3 object url docs/contract.pdf -b kb-prod)
curl "$URL" --output contract.pdf
# 15 minutes
dodil k3 object url docs/contract.pdf -b kb-prod --expires 900
# Full response (url + expiresAt) for clients that need the timestamp
dodil k3 object url docs/contract.pdf -b kb-prod --output jsondodil k3 object remove
dodil k3 object remove [key] -b BUCKETDeletes an object from a bucket. This hits the admin delete route (DELETE /:bucket/objects/:key); the S3-protocol delete (DELETE /:bucket/:key, no /objects/ segment) goes through the gateway proxy.
Example:
dodil k3 object remove docs/contract.pdf -b kb-prodSee also
- Objects — API Reference — byte-plane (PUT/GET/HEAD via S3) + admin contracts
- Core Concepts → Object —
ObjectInfotype dodil k3 bucket·dodil k3 bucket policy·dodil k3 bucket cors·dodil k3 mount