Skip to content

The files of a test case

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

The finished files of a test case of its own (the case page’s Files, #1234), and what the project’s 1 GiB budget would send away for one more picture (budget.evicts) — what the dashboard warns about before an upload. Someone else’s is a 404.

id
required
string

The test case.

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

Not found or not yours

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