download_report_file
Download a report file
Code
download_report_file › Request Body
file_idThe id of the report file to download
as_urlAnswer 200 with the presigned url in the body instead of a 303 to it. Browsers need this, because fetch() follows a redirect as a cross-origin request and the storage buckets carry no CORS configuration. The gateway passes this field through untyped, so strings are coerced: "1", "true", "yes" and "on" are true, anything else is false.
download_report_file › Responses
successTrue when the url was issued
messagesError messages; empty on success
The url a browser navigates to, and the name to save it as
export_report
Export a single report's definition as a downloadable JSON file
Code
export_report › Request Body
report_idThe id of the report to export
export_report › Responses
nameThe report name
descriptionThe report description
report_runnerThe report runner (e.g. sql_runner)
customWhether the report is a user-created (custom) report
draftWhether the report is a draft
date_typeThe report date type (single or range)
hiddenWhether the report is soft-deleted
output_formatThe output format (e.g. excel, text)
output_file_delimiterThe delimiter used for delimited output
category_nameThe report category name, or null when uncategorized
Parameter definitions for the report
export_optionsDelivery/output options (e.g. filename); a password is redacted
additional_report_settingsAdditional report settings
The report sheets (SQL tabs)
grant_report_permission
Create or update a report permission grant.
Code
grant_report_permission › Request Body
report_idUUID of the report.
grantee_typeKind of grantee receiving access.
grantee_idIdentifier of the grantee (UUID for contact, role, user_group, permission_level).
accessAccess level to grant (write implies read for resolution; none blocks at this grantee row).
api_keyAPI key for external / programmatic clients.
grant_report_permission › Responses
Payload when success is true.
successIndicates if the request was successful
import_report
Import a report definition, creating a new report
Code
import_report › Request Body
The report definition to import (same shape produced by /api/v2/reports/export_report). Any id / sheet id carried in the payload is ignored: an import always creates a new report and fails if the name already exists.
costGateOverrideReasonReason for overriding blocking SQL cost rules other than P19. Honoured only for users with report permission admin rights, trimmed to 500 characters and recorded in the new report's notes.
cost_gate_override_reasonSnake-case spelling of costGateOverrideReason; either is accepted.
file_dataAlternative to report_data: the JSON text of an exported report file (or base64 of it), following the file_data convention used by /api/v2/lines/import_line. Takes precedence over report_data.
import_report › Responses
The created report (same shape as /api/v2/reports/retrieve_report)
successIndicates if the request was successful
On success an empty list, or {'warning': [...]} carrying non-blocking SQL cost rule warnings; on error a standard_error envelope keyed by field, or 'base' for non-field errors (e.g. name collision, invalid SQL, a blocking SQL cost rule)
list_df_cache_files
Retrieves a list of df_cache files Parameters ---------- prefix : str Prefix of the files. Usually a date in YYYYMMDD format auth_token : str S3 authentication token prepared : bool, optional Get prepared df_cache files Returns ------- success : bool True if successful, False if not messages : dict List of error messages data : dict { 'files': [ { 'url': '...', #download link for file 'expired': '2014-09-08T08:02:17.127178', #expiration of url (ISO 8601) 'id': '...' #unique (in line) id for the file }, ] }
list_df_cache_files › Responses
successmessagedatalist_export_queue
list_grantee_options
List grantee id and name options for the permissions picker.
Code
list_grantee_options › Request Body
grantee_typeWhich picker list to populate.
api_keyAPI key for external / programmatic clients.
list_grantee_options › Responses
List of {id, name} options for the picker when success is true.
successIndicates if the request was successful
list_report_permissions
List report permission rows and whether the user can edit them.
Code
list_report_permissions › Request Body
report_idUUID of the report whose ACL rows to return.
api_keyAPI key for external / programmatic clients.
list_report_permissions › Responses
Payload when success is true.
successIndicates if the request was successful
process_export_queue
remove_from_export_queue
Take one file off the Export Queue without exporting it
Code
remove_from_export_queue › Request Body
file_idfiles.id of the queued file
remove_from_export_queue › Responses
reset_britedata_migration
revoke_report_permission
Remove a report permission grant.
Code
revoke_report_permission › Request Body
report_idUUID of the report.
grantee_typeKind of grantee whose row to remove.
grantee_idIdentifier of the grantee matching the row to revoke.
api_keyAPI key for external / programmatic clients.
revoke_report_permission › Responses
dataEmpty object on success (no row payload returned).
successIndicates if the request was successful
update_report_schedule
PATCH a schedule's parameter overrides, position, name, enabled flag and/or export options.
Code
update_report_schedule › Request Body
report_idcadence_idschedule_idparameter_overridespositionenablednameexport_optionsupdate_report_schedule › Responses
successmessagedata