Ask for a snapshot of a report
Asks the platform to file a snapshot of a report: the PDF of it as it is right now, kept with the report and listed by /v1/snapshots/list.
THE FILE IS NOT PRODUCED BY THIS CALL. What the call writes is the request -- a one-off delivery the platform picks up on its next pass -- and the answer is that request, with status queued and the schedule_key of the row. The snapshot appears in /v1/snapshots/list minutes later, when the report has been generated; there is no endpoint that reports its progress. While it has not been taken, /v1/schedules/delete with that key cancels it.
IT SPENDS AI CREDITS. The report is generated in full, so every AI summary in it is written again and billed exactly as a scheduled delivery would be. ai_summaries says how many the report carries, both in the preview and in the answer, and a SPENDS_AI_CREDITS warning accompanies it when there is at least one. It sends no email to anybody, so it does not count against the daily budget of calls that do.
IT IS NOT QUEUED TWICE. A report that already has a snapshot waiting answers 409 ALREADY_QUEUED with details.schedule_key: asking twice would generate the report twice and spend the credits twice. A call you are not sure went through is retried with the SAME idempotency_key -- which is also the only thing that makes the guard exact: the check and the write are two steps, so two confirmed calls landing in the same instant with DIFFERENT idempotency keys can still both go through.
The format is always PDF, and a report keeps its 13 newest snapshots: filing a new one deletes the oldest. Every kind of report is accepted, templates included, exactly as the settings window of the application offers the button on all of them. This endpoint ALWAYS asks for a confirmation. if_version is not accepted.
Refusals: 400 for the framework and the body, 403 WRITE_ACCESS_DISABLED, 404 NOT_FOUND, 409 REPORT_IN_TRASH and 409 ALREADY_QUEUED (details = {schedule_key, report_key}).
Every write endpoint reads dry_run and idempotency_key; see the Write guarantees section of the introduction.
Request
- Base URL: https://api.reportingninja.com/v1
- URL: https://api.reportingninja.com/v1/reports/take-snapshot
- Auth: HTTP bearer
Request body
Response
The call succeeded. This endpoint reports its errors with a real HTTP status, so a 200 always carries status=ok.
Changes
No recorded changes to this operation across all 1 revision of this API.