Skip to content

The files attached to a bug

GET
/v1/bugs/{id}/files
curl --request GET \
--url https://beta-api.plune.ai/v1/bugs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/files \
--header 'Authorization: Bearer <token>'

The finished files a person attached to a bug (#1066), newest first, and what the budget would send away for one more picture (budget.evicts). Not the bug’s copies of the pictures of its evidence: those are the card’s files. Anyone who reads the bug reads them; a bug of another project, or in the Bin, is a 404.

id
required
string format: uuid
X-Plune-Project
string

Which of your projects to act in — an id from GET /v1/projects. Absent, your default project. A project you are not a member of answers 404, the same as one that does not exist. Ignored under a bearer token, which is bound to the project it was minted in.

The files and the budget

Media type application/json
object
files
required

Only finished files. A case’s own, newest first; those waiting on the case being marked, in the order they were added.

Array

A file a person added — to a case of its own, or to the case being marked in a manual run (#1234). Everything but its bytes, and who added it and when.

object
id
required
string
name
required

The last segment of the name it was uploaded with, cleaned of credentials as a text is.

string
contentType
required

In the database (storage: db): image/png, image/jpeg, image/webp, application/json or text/plain — a log is text/plain. In the bucket (storage: bucket): the media type it was announced with, lower case and without parameters, any type.

string
size
required

Bytes as kept: in the database a picture at most 2 MiB and a text at most 512 KiB, counted after its credentials are cleaned, so it can differ from what was sent; in the bucket the size that was announced and found there.

integer
storage
required

db: Plune keeps the bytes, GET /v1/files/{id} returns them. bucket: they are in the project’s own bucket, and GET /v1/files/{id} answers 409 in_bucket (the way to read them is GET /v1/files/{id}/link).

string
Allowed values: db bucket
createdAt
required
string format: date-time
createdBy
required

The user who added it; null once that account is gone.

string
nullable
budget
required

What the project’s files take of its budget, and what one more picture would cost (#1234), so a person is told before an upload, not only after. A project with a bucket sends a person’s files there: nothing of the budget is spent and evicts is null.

object
bucket
required

The project has its own bucket connected.

boolean
usedBytes
required

The bytes of the files kept in the database, the Bin’s included.

integer
limitBytes
required

The budget: 1 GiB.

integer
evicts
required

What an upload of a picture at the 2 MiB ceiling would send away now — the oldest files, oldest first — or null when it fits. An estimate for a smaller file: the answer of the upload says what really went.

object
count
required
integer
>= 1
bytes
required
integer
>= 1
newestAt
required

When the newest of them was added: everything added before it goes.

string format: date-time
Example
{
"files": [
{
"id": "3f0c2a7e-1b5d-4c8e-9a61-2d7f4e8b0c15",
"name": "price-list-eur.png",
"contentType": "image/png",
"size": 48213,
"storage": "db",
"createdAt": "2026-10-13T09:00:00.000Z",
"createdBy": "6f1c2b3a-0000-4000-8000-0000000000a2"
}
],
"budget": {
"bucket": false,
"usedBytes": 48213,
"limitBytes": 1073741824,
"evicts": null
}
}

No / invalid token or session

No such bug in this project

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