Widgets

Copy a widget

Copies one widget. The copy takes a row of its own right below the original and everything under it moves one row down, which is what the copy button of the application does; to puts it in another section or opens its row somewhere else.

The copy carries everything the original has -- its definition and its format, the connection it reads through, its internal notes, and for an AI summary its client brief and what it reads, pointed at the section the copy lands in. From then on the two are separate widgets: changing one does not change the other. Writing a variant of a widget that already works is a copy followed by an update of the copy.

An image and a page break are not copied -- the application offers no copy for them either -- and a report built on a template is refused with 400 APPEND_NOT_ALLOWED, reason template_based. A section holds at most 12 widgets.

It takes no backup and drops no cached result: the inverse of a copy is deleting the copy, which is also what undoes a copy that only got half way -- the answer declares atomic false, because creating the row, remapping what a copied summary reads, renumbering the section and copying the client brief are four writes.

Refusals: 400 for the framework and the body, 400 APPEND_NOT_ALLOWED, 403 WRITE_ACCESS_DISABLED, 404 NOT_FOUND, 409 AI_SUMMARY_NOT_ALLOWED, 409 SECTION_BUSY, 409 SECTION_CHANGED when the section the copy lands in changed after the call read it, in which case nothing is written and the call can be retried after reading the report again, and 409 REPORT_IN_TRASH.

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

post/widgets/copy

Request

  • Base URL: https://api.reportingninja.com/v1
  • URL: https://api.reportingninja.com/v1/widgets/copy
  • Auth: HTTP bearer

Request body

report_keystring required

The report the widget belongs to.

widget_keystring required

The widget to copy.

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.

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.