Reports

Create a report from a catalog template

Materializes a published catalog entry into a report, or into one of the account's own templates, and binds it to the connections given in data_sources. With section_positions only the named sections are written. A parameterized entry can only be materialized as a report and asks for its parameter_values. This endpoint never asks for a confirmation and does not accept if_version. Refusals: 400 VALIDATION_FAILED, UNKNOWN_PARAM or MISSING_REQUIRED_FIELD, 403 WRITE_ACCESS_DISABLED when write access is off and PLAN_LIMIT_REACHED when the plan has no room for another report, 404 TEMPLATE_NOT_FOUND for an entry, version or position that is not published and NOT_FOUND for a language file the account does not own, 409 for the idempotency conflicts. This is the endpoint that binds a whole entry at once, so it is the one that can answer the warning DATA_SOURCES_PARTIALLY_BOUND: the report is created, and the sections whose integration has no data source are named in warnings[].

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

post/reports/create-from-template

Request

  • Base URL: https://api.reportingninja.com/v1
  • URL: https://api.reportingninja.com/v1/reports/create-from-template
  • Auth: HTTP bearer

Request body

catalog_slugstring required

The published entry to materialize, from /v1/catalog/list.

versioninteger

A published version of that entry. Defaults to the one published today.

namestring

Title of the report. Defaults to the name of the entry.

internal_namestring

Name for the account's own staff. Defaults to the entry's.

language'en' | 'es'

Language of the report's own literals. Defaults to the account owner's.

language_file_keystring

One of the system language files, or a language file of the account.

section_positionsinteger[]

Which sections of the entry to materialize, as 0-based positions, each one inside the range and never repeated. When absent, all of them.

as'report' | 'template'

Materialize the entry as a report or as one of the account's own templates. Default report.

parameter_valuesobject

The values a parameterized entry asks for, keyed by parameter id, each at most 80 characters. Only for a parameterized entry, and only when as is report.

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.