A run’s report as an XLSX or PDF file
const url = 'https://beta-api.plune.ai/v1/runs/example/export?format=xlsx';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Query Parameters
Section titled “Query Parameters ”Responses
Section titled “ Responses ”The file, as an attachment
Headers
Section titled “Headers ”attachment with the file name (the run’s title and the day)
A large run: the file is being built in the background
object
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 completed). progress is null while the operation does not know its size — never 0 / 0.
object
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.
What it works on — a run id, an import id.
Its name as people know it — shown after the kind.
How far it got; null while the size is not known yet.
object
Why it stopped — only on action_needed, paused, blocked, failed, cancelled. A cancel reads «Cancelled by
The producer’s own token for where it resumes; null — a Retry starts from the beginning.
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.
Set on completed, failed and cancelled, and only there.
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).
Download it with GET /v1/run-exports/{fileId} once the job is completed.
Example
{ "job": { "state": "in_progress" }}The format is not xlsx or pdf
object
Example generated
{ "error": "example"}No / invalid token or session
Not the project’s owner (project owner only)
object
Example generated
{ "error": "example"}No such run in your projects
object
Example generated
{ "error": "example"}More results than a file of that format takes; the body names max and total
object
Example generated
{ "error": "example"}Rate limit exceeded (six a minute), or the project already holds 3 exports / 256 MiB of finished ones