Skip to Content
We are live but in Staging 🎉

dodil k3 object

Manage objects in a K3 bucketcreate (upload), show, list, url (presign), remove. All object subcommands take a required -b/--bucket flag (persistent on the group).

dodil k3 object create uploads 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.

FlagShortTypeDescription
--bucket-bstringRequired. Target bucket name.
--key-kstringObject 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.pdf

dodil k3 object show

dodil k3 object show [key] -b BUCKET

Returns 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 json

dodil k3 object list

dodil k3 object list -b BUCKET

Lists 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).

FlagShortTypeDefaultDescription
--bucket-bstringRequired. Target bucket name.
--expiresint643600URL 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 json

dodil k3 object remove

dodil k3 object remove [key] -b BUCKET

Deletes 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-prod

See also