Change the settings of a section
Changes the settings of one section of a report: its title, what its header shows, how its pages are laid out in the PDF, and the period its widgets read.
IT IS PARTIAL. The body carries only the fields it changes and every other column of the section is kept -- including the temporary filter a client portal may be showing the report through, which no partial body names. The answer carries a before with the previous value of each field it touched, and sending those values back is what undoes the call.
show_previous_period DEPENDS ON show_date_range: the period a section is compared against is drawn under the date range of its header, so a section that hides the range cannot show the comparison. A body that asks for both writes show_previous_period false and says so in warnings, which is what the settings window of the application does with its two controls.
date_range moves THIS section, and with it every widget of the section that carries no period of its own; the cached results of those widgets are dropped. The date_range of /v1/reports/update is the one that moves every section at once.
The thirteen global filters of a section, its Analytics segment and the account that segment is read from are NOT written by this version: capabilities lists them under sections_update.not_yet_available.
It does not touch the list of sections, so it takes no if_version and raises no version. A report built on a template is refused with 400 APPEND_NOT_ALLOWED, reason template_based: its sections belong to its template, where a change reaches every report built on it.
Refusals: 400 for the framework and the body, 400 VALIDATION_FAILED, 400 INVALID_VALUE, 400 APPEND_NOT_ALLOWED, 403 WRITE_ACCESS_DISABLED, 404 NOT_FOUND, 409 SECTION_CHANGED when the settings of the section changed after the call read them, in which case nothing is written and the call can be retried after reading the section again, 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/update
- 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.