Skip to content

A run’s report as an XLSX or PDF file

GET
/v1/runs/{id}/export
curl --request GET \
--url 'https://beta-api.plune.ai/v1/runs/example/export?format=xlsx' \
--header 'Authorization: Bearer <token>'

The run’s report as a file (#1265): ?format=xlsx or ?format=pdf, and no other (CSV and JSON are not offered). The workbook has three sheets: Summary first (#1680: title, environment, branch and commit, times, the five statuses and muted, the share passed as n / N, the first failed cases with their errors, what the file holds, the attachment-link term), then Results with one row a result with every column of the report, then Attachments; the platform’s own XLSX import reads the sheet named Results. The PDF opens with the same summary. A result row has: test case, suite, status, whether it is muted, sub-status, time in ms, who executed it, the error (cut at 2000 characters), the attachments and when it was recorded. Text is written as text, so a title that begins with = is never a formula. The PDF is A4 landscape with the same columns wrapped inside their cells and the header row on every page, in a font that has Latin, Cyrillic and Greek (CJK and emoji come out as boxes). Attachments are never embedded: each is a line name: address in the workbook and a link in the PDF. A file the platform keeps is linked to the dashboard page of its result (<dashboard>/runs/<run>#result-<id>), which opens only for a signed-in member of the project, so the file holds no secret; the link does NOT expire (AC-05 asks for a term and this is not met: a presigned link would be dead in a saved file; operator decision pending). When the server does not know the dashboard’s address such a file is named and not linked. Links a reporter attached are included as given when they are http(s) addresses. Up to 5 000 results the answer is the file. The platform files of a result are listed as links, never embedded (AC-05, #1643): GET /public/files/<token>, signed, openable without a sign-in, valid 7 days from the moment the file is made (the report says until when, in UTC, in its Summary sheet / first PDF page); the file itself is kept 24 hours, so a link outlives it. Without a server secret and a public API address the links are the result pages, which need a sign-in. Past that (AC-03) the answer is 202 with the queue’s job (kind run-export) and fileId: the file is built in the background, the person may leave the page, and when the job is completed the file is GET /v1/run-exports/<fileId> for 24 hours. The same run in the same format already waiting or done answers with that job, not a second; a project holds at most 3 exports (and 256 MiB of finished ones) at a time, past which the answer is 429. A run with more than 100 000 results (XLSX) or 20 000 (PDF) is refused with 413. Every export is written to the audit log (entity run, action event, export with the format and the count). The project’s owner only.

id
required
string
format
required
string
Allowed values: xlsx pdf

The file, as an attachment

string format: binary
Content-Disposition
string

attachment with the file name (the run’s title and the day)

A large run: the file is being built in the background

Media type application/json
object
job
required

One long AI operation. Seven states: in_progress, action_needed (waits for a person — reason says for what), paused (the quota is spent; Resume, or it resumes by itself), blocked (an outside service failed — reason names it; no button), completed, failed (reason is the raw error; a person may Dismiss it), cancelled (a person’s Cancel — reason is «Cancelled by »; not an error, no button, listed for 24 hours like completed). progress is null while the operation does not know its size — never 0 / 0.

object
id
required
string format: uuid
kind
required

Which operation: ingest, sync, auto-analysis, and bin-empty — the Bin emptied by the server (#1388) — and runs-delete — runs deleted in the background (#1423) — today; open-ended.

string
>= 1 characters <= 64 characters
state
required
string
Allowed values: in_progress action_needed paused blocked completed failed cancelled
subjectId
required

What it works on — a run id, an import id.

string
nullable
subjectName
required

Its name as people know it — shown after the kind.

string
nullable <= 200 characters
progress
required

How far it got; null while the size is not known yet.

object
done
required
integer
total
required
integer
>= 1
reason
required

Why it stopped — only on action_needed, paused, blocked, failed, cancelled. A cancel reads «Cancelled by ».

string
nullable <= 2000 characters
cursor
required

The producer’s own token for where it resumes; null — a Retry starts from the beginning.

string
nullable <= 2000 characters
attempt
required

Which try this is: 1, and one more for each Retry. A producer sends it back in its reports (attempt), and a report of an earlier try is 409 stale_attempt.

integer
>= 1
createdAt
required
string format: date-time
startedAt
required
string format: date-time
nullable
finishedAt
required

Set on completed, failed and cancelled, and only there.

string format: date-time
nullable
runId

Only on a run-export job in GET /v1/jobs and in the answer of GET /v1/runs/{id}/export (202): the run the file is of, so «Export again» works from any browser. A completed export stays in the list 7 days (its file goes after 24 hours).

string
updatedAt
required
string format: date-time
fileId
required

Download it with GET /v1/run-exports/{fileId} once the job is completed.

string
Example
{
"job": {
"state": "in_progress"
}
}

The format is not xlsx or pdf

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

No / invalid token or session

Not the project’s owner (project owner only)

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

No such run in your projects

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

More results than a file of that format takes; the body names max and total

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

Rate limit exceeded (six a minute), or the project already holds 3 exports / 256 MiB of finished ones