Reports.files

A File resource is the metadata associated with running a report. Each file is associated with a parent report and contains information about the status of the report execution and, when the execution is done, URLs to the actual report data.

For a list of methods for this resource, see the end of this page.

Resource representations

Represents a File resource. A file contains the metadata for a report run. It shows the status of the run and holds the URLs to the generated report data if the run is finished and the status is "REPORT_AVAILABLE".

{
  "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
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.endDate date The end date of the date range, inclusive. A string of the format: "yyyy-MM-dd". writable
dateRange.kind string The kind of resource this is, in this case dfareporting#dateRange.
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
dateRange.startDate date The start date of the date range, inclusive. A string of the format: "yyyy-MM-dd". writable
etag etag The eTag of this response for caching purposes.
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"
id long The unique ID of this report file.
kind string The kind of resource this is, in this case dfareporting#file.
lastModifiedTime long The timestamp in milliseconds since epoch when this file was last modified.
reportId long The ID of the report this file was generated from.
status string The status of the report file.

Acceptable values are:
  • "CANCELLED"
  • "FAILED"
  • "PROCESSING"
  • "REPORT_AVAILABLE"
urls object The URLs where the completed report file can be downloaded.
urls.apiUrl string The URL for downloading the report data through the API.
urls.browserUrl string The URL for downloading the report data through a browser.

Methods

All files for a report can be listed, or you can get a single file by its ID and the ID of its parent report.

get
Retrieves a report file. This method supports media download.
list
Lists files for a report.

Send feedback about...

Campaign Manager
Campaign Manager