Skip to content

A link to read a result’s file from the project’s bucket

GET
/v1/files/{id}/link
curl --request GET \
--url https://beta-api.plune.ai/v1/files/example/link \
--header 'Authorization: Bearer <token>'

For a file with storage: bucket (ADR 0041): Plune looks in the bucket (HEAD, through its guarded request) and, if the object is there, signs a GET link that lives 10 minutes. The link carries the stored type and name (inline for the types a browser may show in place, attachment for anything else). If the bucket cannot be reached (a network error, a timeout of 2 seconds) the link is given all the same: only a 404 or a 403 from the bucket is a verdict. The answer is Cache-Control: no-store, and Plune writes the link to no log; do not write it to yours. Someone else’s file, an invented id and a file still waiting for complete are the same 404. A file Plune keeps itself (storage: db) has no link: 409 not_in_bucket, read it with GET /v1/files/{id}.

id
required
string

The link

Media type application/json

Where to read a file of the project’s bucket from, and until when. A right, not a name: never cache it, never write it to a log.

object
url
required

A signed GET link to the object in the bucket. Needs no Authorization header. A page reads a picture or a video from it with a tag; to fetch a text the bucket needs a CORS rule for the page’s address.

string
expiresAt
required

Ten minutes from the call. Ask again when it is close, not before.

string format: date-time
Example generated
{
"url": "example",
"expiresAt": "2026-04-15T12:00:00Z"
}
Cache-Control
string
Allowed values: no-store

No / invalid token or session

Not found or not yours

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

code: not_in_bucket (the file is in Plune’s database), storage_disconnected (the project has no bucket connected any more), object_missing (the bucket answered 404 to the HEAD: the object is no longer there; the file row stays, and it is not an error of the project’s connection) or bucket_refused (the bucket answered 403 to it: the key saved for the project cannot read the object, and the browser would be refused too. On AWS S3 a key without s3:ListBucket is answered 403, not 404, for an object that is not there, so a file removed by a lifecycle rule can end here: the answer cannot tell a missing object from a key that cannot read it)

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

The project has a bucket and the server cannot open its key (code: platform_not_configured)

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}