Add a section to a report
Adds one empty section at the END of a report and raises the version of its sections structure.
The section is born with the defaults of the product -- the date range a new section gets, the flags of its header, its page orientation and every global filter set to none -- which are the same ones every section of a new report is created with. Only name and page_break are asked for; everything else is changed afterwards with /v1/sections/update.
IT GOES AT THE END and there is no way to ask for another position, which is what the application offers too: move it with /v1/sections/reorder. It starts EMPTY -- widgets go in with /v1/widgets/create, or a whole section with its widgets is written in one call with /v1/reports/append.
There is no ceiling on the sections of a report. It accepts if_version and answers the new one.
A report built on a template is refused with 400 APPEND_NOT_ALLOWED, reason template_based: its sections belong to its template.
Refusals: 400 for the framework and the body, 400 VALIDATION_FAILED, 400 APPEND_NOT_ALLOWED, 403 WRITE_ACCESS_DISABLED, 404 NOT_FOUND, 409 VERSION_MISMATCH and 409 REPORT_IN_TRASH.
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/sections/create
- 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.