/storage/buckets/{bucketName}/objects/signCreate Signed URL
Mints a pre-authenticated GET URL for one object in the bucket.
expiresIn is required (no default, R-15) and is accepted from 1 to 604800 seconds (7 days); a value outside that range is 400 K9O_INVALID_FIELD_VALUE.
The URL itself is valid for at most 900 seconds: a longer request is clamped to 900, not refused.
The response's expiresIn is the effective lifetime, so read it from the response rather than assuming the requested value.
A URL minted with an extension token never outlives that token.
A read role on the bucket suffices.
| bucketName * | path | The bucket's name. It is unique within the project. |
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
| path * | string | The object's path in the bucket, 1 to 1024 characters. It may contain slashes. |
| expiresIn * | integer | Requested lifetime in seconds (required, no default). Accepted 1..604800; the URL is clamped to 900 s, and the response's expiresIn is the effective value. |
| download | boolean | True to have the URL serve the object as an attachment ( Default false. |
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 400 | K9O_INVALID_FIELD_VALUE | expiresIn is required and must be an integer in 1..604800 seconds (R-15: no default expiry). |
| 401 | K9O_UNAUTHENTICATED | Authentication is required. |
| 403 | K9O_RBAC_DENY | The caller's project role does not permit this object operation. |
| 403 | K9O_ACCESS_DENIED | The bucket's storage policy does not allow read (signed URL) for this caller (context.reason storage_policy_denied). Checked after the role and IAM checks; a bucket with no policy is unaffected. |
| 404 | K9O_BUCKET_NOT_FOUND | No bucket with this name exists in the project. |
| 404 | K9O_NOT_FOUND | The object is past the bucket's deleteAfterDays age (counted from its last upload), so it reads as not found. |
| data * | object | The signed URL and how long it lasts. |
| signedUrl * | string | A URL that reads the object without other credentials until it expires. Scoped to this one object. |
| expiresIn * | integer | Seconds the URL is valid for: the requested |
| meta * | any | Request metadata: cost, timing and correlation ids. |
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.from('<collection>').createSignedUrl()Showing example in TypeScript
{
"path": "string",
"expiresIn": 0,
"download": false
}{
"data": {
"signedUrl": "string",
"expiresIn": 0
}
}