Reports

Copy a report

Duplicates a report under another name, as a report or as a template. The copy carries the sections, the widgets, the data source bindings, the AI summaries with their selections remapped to the new keys, and the AI client briefs. It carries no public share link (two reports cannot share one), no catalog provenance and no legacy mark, and it is stamped as created through the API.

It copies no schedule and touches no portal view: a copy is a report nobody is subscribed to yet. To copy a report FOR a client, with its own connections, schedule and portal view, use /v1/reports/duplicate-for-client.

A report built on a template comes out as a regular report of its own, with copies of the sections it showed, and stops following that template; the answer says so in warnings.

With as: template the three refusals of the application apply -- a report built on a template is not saved as a template, neither is one that assigns a connection per widget, and neither is one with cross-platform widgets that read an accounts group, because every report built on the template would show the data of that group; the message names those widgets -- and the copy carries no brand. Neither does a template copied as a template: a template carries no brand of its own. A copy of a template or of a report built on one, and a copy that is a template, never keeps a cross-platform widget on an accounts group: in the copy it reads the connections of the report, and warnings names those widgets.

The plan limit is checked before anything is written: a call with no room left is refused with 403 PLAN_LIMIT_REACHED.

Refusals: 400 for the framework and the body, 400 INVALID_VALUE for an as the source does not allow, 403 WRITE_ACCESS_DISABLED, 403 PLAN_LIMIT_REACHED, 404 NOT_FOUND and 409 REPORT_IN_TRASH.

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

post/reports/copy

Request

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

Request body

report_keystring required

The report to copy, from /v1/reports/list or /v1/templates/list.

namestring required

The title of the report, 1 to 60 characters: the name the cover paints. It is what /v1/reports/get answers as name.

internal_namestring

The name the list of the application shows, 1 to 100 characters. Left out, it is the title.

as'report' | 'template'

What the copy is. It defaults to whatever the source is: a report copied as a report, a template copied as a template. Turning a report into a template is refused on a report built on a template and on one that assigns a connection per widget, and turning a template into a report is refused outright -- that is a materialization and not a 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.