Reports: run

Runs a report. Try it now.

Reports are run asynchronously by default. You can also run small reports synchronously. If a synchronous report run does not finish in time, a report file will still be returned and the report is processed asynchronously.

Request

HTTP request

POST https://www.googleapis.com/dfareporting/v3.3/userprofiles/profileId/reports/reportId/run

Parameters

Parameter name Value Description
Path parameters
profileId long The DFA profile ID.
reportId long The ID of the report.
Optional query parameters
synchronous boolean If set and true, tries to run the report synchronously. (Default: false)

Authorization

This request requires authorization with the following scope:

Scope
https://www.googleapis.com/auth/dfareporting

For more information, see the authentication and authorization page.

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "dfareporting#file",
  "etag": etag,
  "reportId": long,
  "id": long,
  "lastModifiedTime": long,
  "status": string,
  "fileName": string,
  "format": string,
  "dateRange": {
    "kind": "dfareporting#dateRange",
    "startDate": date,
    "endDate": date,
    "relativeDateRange": string
  },
  "urls": {
    "browserUrl": string,
    "apiUrl": string
  }
}
Property name Value Description Notes
kind string Identifies what kind of resource this is. Value: the fixed string "dfareporting#file".
etag etag Etag of this resource.
reportId long The ID of the report this file was generated from.
id long The unique ID of this report file.
lastModifiedTime long The timestamp in milliseconds since epoch when this file was last modified.
status string The status of the report file.

Acceptable values are:
  • "CANCELLED"
  • "FAILED"
  • "PROCESSING"
  • "REPORT_AVAILABLE"
fileName string The filename of the file.
format string The output format of the report. Only available once the file is available.

Acceptable values are:
  • "CSV"
  • "EXCEL"
dateRange nested object The date range for which the file has report data. The date range will always be the absolute date range for which the report is run.
dateRange.kind string The kind of resource this is, in this case dfareporting#dateRange.
dateRange.startDate date The start date of the date range, inclusive. A string of the format: "yyyy-MM-dd". writable
dateRange.endDate date The end date of the date range, inclusive. A string of the format: "yyyy-MM-dd". writable
dateRange.relativeDateRange string The date range relative to the date of when the report is run.

Acceptable values are:
  • "LAST_14_DAYS"
  • "LAST_24_MONTHS"
  • "LAST_30_DAYS"
  • "LAST_365_DAYS"
  • "LAST_60_DAYS"
  • "LAST_7_DAYS"
  • "LAST_90_DAYS"
  • "MONTH_TO_DATE"
  • "PREVIOUS_MONTH"
  • "PREVIOUS_QUARTER"
  • "PREVIOUS_WEEK"
  • "PREVIOUS_YEAR"
  • "QUARTER_TO_DATE"
  • "TODAY"
  • "WEEK_TO_DATE"
  • "YEAR_TO_DATE"
  • "YESTERDAY"
writable
urls object The URLs where the completed report file can be downloaded.
urls.browserUrl string The URL for downloading the report data through a browser.
urls.apiUrl string The URL for downloading the report data through the API.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.