Skip to navigation

Get the SQL query for a report element

View as Markdown

This endpoint retrieves the SQL query associated with a specific element in a report. It allows users to view and understand how the data for that element is being processed and transformed.

Usage notes

Usage scenarios

  • Development and debugging: Provides developers and analysts with the ability to retrieve and review the SQL code behind report elements, facilitating troubleshooting and enhancements.
  • Educational insight: Useful for training purposes or for users learning to understand the impact of various transformations and filters applied within their reports.

Best practices

  • Ensure proper access controls are in place to manage who can view potentially sensitive query information.
  • Use this endpoint as part of a regular review process to ensure that all queries are optimized and up to date with current data schemas.

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Path parameters

reportIdstringRequired
Unique identifier of the report.
elementIdstringRequired
Unique identifier of the element

Response

The response body.
elementIdstring
namestringOptional
sqlstringOptional
errorstringOptional