Skip to main content
POST
Create a report delivery
In preview: ask Cube support to enable it. Writes a report’s results into a Google Sheets tab from destination.anchorCell. The caller owns it: their Google account writes, with their data access. Needs read access to the report.

Authorizations

Authorization
string
header
required

Token authentication. Send Authorization: Bearer <YOUR_TOKEN>.

Path Parameters

deploymentId
integer
required

Numeric id of the deployment that owns the delivery.

Body

application/json

CreateReportDeliveryInput

destination
object
required
name
string
required
Required string length: 1 - 255
reportId
integer
required

Id of the report whose results are delivered. It must belong to this deployment, and the caller must be able to read it.

notifications
object | null

How the owner hears that the delivery failed or recovered. A delivery that runs more than once a day reports only changes in its status; a daily or rarer one reports every failed run. Omit it for the inbox only.

schedule
object | null

When the delivery runs. Omit it for a delivery that runs only on request.

shape
object | null

Which columns land in the sheet, in what order, under which headers. Omit it to deliver every column the query returns, in its order, headed by its name.

writeMode
enum<string> | null
Available options:
overwrite,
append,
new_sheet

Response

200 - application/json
deploymentId
integer
required
destination
object
required
id
integer
required
name
string
required
notifications
object
required

How the owner hears that the delivery failed or recovered. A delivery that runs more than once a day reports only changes in its status; a daily or rarer one reports every failed run.

status
enum<string>
required
Available options:
active,
failing,
needs_reconnect,
orphaned
writeMode
enum<string>
required
Available options:
overwrite,
append,
new_sheet
lastRunAt
string<date-time> | null

When the last run finished. null before the first.

lastSuccessAt
string<date-time> | null

When the last successful run finished. null if none has succeeded.

nextRunAt
any | null

When the schedule next fires. null when there is no schedule or it is paused.

ownerUserId
integer | null

The accountable user, whose Google account writes the sheet. null once that user has been deleted.

pausedAt
any | null

When the delivery was paused. null if it is not.

reportId
integer | null

The delivered report. null once that report has been deleted.

reportName
string | null

Name of the delivered report. null once that report has been deleted.

reportPublicId
string | null

Public id of the delivered report. null once that report has been deleted.

reportWorkbookId
integer | null

Workbook holding the delivered report. null once that report has been deleted.

runAsUserId
integer | null

The user whose data access the query runs with. null once that user has been deleted.

runningSince
string<date-time> | null

When the run still in progress started. null while no run is going.

schedule
object | null

null for a delivery that runs only on request.

shape
object | null

null when every column is delivered as is.

sheetTitle
string | null

Current title of the destination tab, read from Google at most every few minutes. null for a new_sheet delivery, or before its title has been read.

spreadsheetTitle
string | null

Title of the destination spreadsheet, read from Google at most every few minutes and by each run. null before then.