Sections

Delete a section of a report

Deletes one section with every widget it holds, and moves the version of the report's sections structure. A report keeps at least one section: deleting the last one is refused with 400 INVALID_VALUE. There is no undo. This endpoint ALWAYS asks for a confirmation, and its preview lists the widgets that would go, how many sections would be left and whether the deletion reaches the reports built on this one. Deleting a section of a TEMPLATE does reach them: the section, with its widgets, disappears from every report built on that template. A report built on a template has no sections of its own -- they belong to its template -- and is refused with 400 APPEND_NOT_ALLOWED, reason template_based. It accepts if_version, and the guard is checked again inside the deleting transaction, so a section appended in between cannot be deleted by mistake. Refusals: 400 INVALID_VALUE, 400 APPEND_NOT_ALLOWED or the framework ones, 403 WRITE_ACCESS_DISABLED, 404 NOT_FOUND, 409 VERSION_MISMATCH plus the confirmation and idempotency conflicts.

Every write endpoint reads dry_run and idempotency_key; see the Write guarantees section of the introduction.

post/sections/delete

Request

  • Base URL: https://api.reportingninja.com/v1
  • URL: https://api.reportingninja.com/v1/sections/delete
  • Auth: HTTP bearer

Request body

report_keystring required
section_keystring required

The section to delete, with the widgets it holds.

dry_runboolean

Validate and answer what WOULD happen, without writing anything. Default false.

idempotency_keystring

Makes a retry safe: the answer of the first call is replayed for 24 hours to any later call with the same key and the same body.

if_versionnumber

The version of the report's sections structure this call expects. A mismatch is HTTP 409 VERSION_MISMATCH and nothing is written.

confirmation_tokenstring

The token the previous call answered. Sending the same body with it performs the write.

Response

The call succeeded. This endpoint reports its errors with a real HTTP status, so a 200 always carries status=ok.

status'ok' required

Changes

No recorded changes to this operation across all 1 revision of this API.