Skip to navigation

Get the code representation of a report (Deprecated)

Deprecated
View as Markdown

Deprecation notice: This endpoint is deprecated. Instead, use GET /v2/reports/{reportId} with includeContents=true.

This endpoint returns a code representation of a report, including metadata and contents. The response can be formatted as either JSON or YAML, and contains the report’s pages, elements, columns, sources, and more.

Beta: This documentation describes a private beta feature and is subject to the Beta features disclaimer.

Usage notes

  • Retrieve the reportId by calling the /v2/reports endpoint.
  • To create a new report from code, use the /v2/reports/spec endpoint.
  • To update an existing report from code, use the /v2/reports/{reportId}/spec endpoint.
  • The default format of the representation is YAML. To receive JSON, add the query parameter ?format=json or the header Accept: application/json.

Usage scenarios

  • Backup and restore: Developers can use this endpoint to programmatically back up reports and restore them if needed.
  • Version control: Developers can use this endpoint to programmatically manage, update, and version control reports between several organizations or tenants.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

reportIdstringRequired
Unique identifier of the report.

Query parameters

documentVersionintegerOptional
formatenumOptional

Response

The response body.
reportIdstring
Unique identifier of the report.
namestring
The name of the report.
urlstring
The full URL for the requested document version of the report.
documentVersiondouble
The document version of the report.
latestDocumentVersiondouble
The most recently published document version of the report.
ownerIdstring
The identifier of the user who owns the report.
folderIdstring
The identifier of the folder in which the report is located.
createdBystring
The identifier of the user who created the report.
updatedBystring
The identifier of the user or process that last updated the report.
createdAtdatetime
When the report was created.
updatedAtdatetime
When the report was last updated.
documentobject

The code representation of the report: its pages, elements, columns, sources, layout, and theme. Submit this object as the document field of a create or update request to reproduce the report. Everything outside document is report metadata that Sigma maintains, and is ignored when you write.

descriptionstringOptional
The description of the report.
warningslist of objectsOptional

Non-fatal issues found while reading the report. Lists content that was dropped because it cannot be represented in code. The rest of the report can read and write without the dropped content. Absent or empty when there are no issues.