Navigation
Export an investigation as PDF
Render an investigation as a PDF report: the decision, verdict and confidence, the indicators, the evidence rows with their sources, the recommendation, what was supplied, the images with what the agent read from them, the details and the activity log. Use it to attach a record of the check to your own case file or to hand to a reviewer.
The report reflects the investigation at the moment you call it. While it still runs, the PDF carries the status and the activity recorded so far and no report sections.
Parameters
No parameters
Returns
The PDF file as
application/pdf with a Content-Disposition attachment header, or 404 when no investigation with that ID exists in the environment of your project secret. Images attached as WebP are listed but not embedded; JPEG and PNG images are.
GET/v3/investigations/:id/pdf
import axios from 'axios';
import { writeFile } from 'node:fs/promises';
const { data } = await axios.get(
'https://api.rupt.dev/v3/investigations/INVESTIGATION_ID/pdf',
{
headers: { Authorization: `Bearer ${API_SECRET}` },
responseType: 'arraybuffer',
}
);
await writeFile('investigation.pdf', data);
Response
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename="rupt-investigation-67160f3e1c9d440012a8b1f4.pdf"
Content-Length: 184302