Reports
Create report
Create a report over a repository or a set of files, optionally with columns, and optionally start it.
POST
Creates a report: a grid with one row per document and one column per question. Each cell holds the AI’s answer to that column’s question for that row’s document.
Choose where the rows come from:
repository_id: the rows follow the repository. A document added to it gets a row, and a document removed from it loses its row. The rows fill in the background, and their cells compute as they arrive, as in the app. If your organisation does not have reports that follow a repository, the repository’s documents are imported once instead: the report has a row for each document it holds now, and later changes to the repository do not change the report. Documents from a confidential source are never copied into a report, whoever creates it.file_ids: one row per file. Each file is copied into the report. Add more later with Add rows.- Neither: the report starts with no rows. Add them with Add rows.
empty until a run computes them. Set run: true to start the first run straight away, or call Run report when you are ready.
Authentication
Requires an API key, or an OAuth token withreports:write. Passing repository_id also needs repositories:read, and passing file_ids also needs files:read. The caller’s role must allow creating reports.
Headers
A unique string for this request, such as a UUID. Honoured when the request starts an operation: with
run: true, or with repository_id when the documents are imported once. A repeat with the same key within 30 days returns the same report with 200, so a retry never creates a second report or starts a second run or import. Otherwise the key is ignored: after a timeout, list your reports before you retry.Body parameters
A repository whose documents become the rows, and stay the rows as it changes. Without reports that follow a repository, its documents are imported once instead. Cannot be combined with
file_ids or run.Files that become the rows, from
1 to 10 ids. Each must be a .pdf, .docx, .doc, .pptx or .png file. Cannot be combined with repository_id.Start computing every cell as soon as the report is created. Needs
file_ids and at least one column. The cells’ credit cost is checked against your organisation’s per-operation limit before anything is created.Response
Returns201 with the new report and its columns. The response also carries operation_id:
- With
run: true,operation_idis thereport_runoperation. Wait for it with Get operation, as described in Long-running operations. - With
repository_id, when the documents are imported once,operation_idis thereport_importoperation. - Otherwise
operation_idisnull.
repository_id, row_count starts at 0. The repository’s documents are added in the background, and each new row’s cells are computed without a run.
- When the rows follow the repository,
repository_idis the repository andsync_statusissyncing. The report is filled whensync_statusissyncedand no cell from List cells isempty,pendingorcomputing. - When the documents are imported once,
repository_idandsync_statusarenull, because the rows do not follow the repository. Wait for thereport_importoperation with Get operation: it succeeds once every document has been imported, withrows_addedandrows_failedin itsresult. The report is filled when the operation has succeeded and no cell isempty,pendingorcomputing. Columns you add later also compute without a run.