Queries

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

Resource representations

Represents a query.

{
  "kind": "doubleclickbidmanager#query",
  "queryId": long,
  "metadata": {
    "title": string,
    "dataRange": string,
    "format": string,
    "running": boolean,
    "reportCount": integer,
    "googleCloudStoragePathForLatestReport": string,
    "latestReportRunTimeMs": long,
    "googleDrivePathForLatestReport": string,
    "sendNotification": boolean,
    "shareEmailAddress": [
      string
    ],
    "locale": string
  },
  "params": {
    "type": string,
    "groupBys": [
      string
    ],
    "filters": [
      {
        "type": string,
        "value": string
      }
    ],
    "metrics": [
      string
    ],
    "includeInviteData": boolean
  },
  "schedule": {
    "frequency": string,
    "endTimeMs": long,
    "nextRunMinuteOfDay": integer,
    "nextRunTimezoneCode": string
  },
  "reportDataStartTimeMs": long,
  "reportDataEndTimeMs": long,
  "timezoneCode": string
}
Property name Value Description Notes
kind string Identifies what kind of resource this is. Value: the fixed string "doubleclickbidmanager#query".
metadata nested object Query metadata.
metadata.dataRange string Range of report data.

Acceptable values are:
  • "ALL_TIME"
  • "CURRENT_DAY"
  • "CUSTOM_DATES"
  • "LAST_14_DAYS"
  • "LAST_30_DAYS"
  • "LAST_365_DAYS"
  • "LAST_7_DAYS"
  • "LAST_90_DAYS"
  • "MONTH_TO_DATE"
  • "PREVIOUS_DAY"
  • "PREVIOUS_HALF_MONTH"
  • "PREVIOUS_MONTH"
  • "PREVIOUS_QUARTER"
  • "PREVIOUS_WEEK"
  • "PREVIOUS_YEAR"
  • "QUARTER_TO_DATE"
  • "TYPE_NOT_SUPPORTED"
  • "WEEK_TO_DATE"
  • "YEAR_TO_DATE"
metadata.format string Format of the generated report.

Acceptable values are:
  • "CSV"
  • "EXCEL_CSV"
  • "XLSX"
metadata.googleCloudStoragePathForLatestReport string The path to the location in Google Cloud Storage where the latest report is stored.
metadata.googleDrivePathForLatestReport string The path in Google Drive for the latest report.
metadata.latestReportRunTimeMs long The time when the latest report started to run.
metadata.locale string

Locale of the generated reports. Acceptable values are:

  • "cs" for CZECH
  • "de" for GERMAN
  • "en" for ENGLISH
  • "es" for SPANISH
  • "fr" for FRENCH
  • "it" for ITALIAN
  • "ja" for JAPANESE
  • "ko" for KOREAN
  • "pl" for POLISH
  • "pt-BR" for BRAZILIAN_PORTUGUESE
  • "ru" for RUSSIAN
  • "tr" for TURKISH
  • "uk" for UKRAINIAN
  • "zh-CN" for CHINA_CHINESE
  • "zh-TW" for TAIWAN_CHINESE

A locale string that is not in the list above will generate reports in English.

metadata.reportCount integer Number of reports that have been generated for the query.
metadata.running boolean Whether the latest report is currently running.
metadata.sendNotification boolean Whether to send an email notification when a report is ready. Default to false.
metadata.shareEmailAddress[] list List of email addresses that are sent email notifications when the report is finished. Separate from sendNotification.
metadata.title string Query title. It is used to name the reports generated from this query.
params nested object Query parameters.
params.filters[] list Filters used to match traffic data in your report.
params.filters[].type string Filter type.

Acceptable values are:
  • "FILTER_ACTIVE_VIEW_EXPECTED_VIEWABILITY"
  • "FILTER_ACTIVITY_ID"
  • "FILTER_ADVERTISER"
  • "FILTER_ADVERTISER_CURRENCY"
  • "FILTER_ADVERTISER_TIMEZONE"
  • "FILTER_AD_POSITION"
  • "FILTER_AGE"
  • "FILTER_AUTHORIZED_SELLER_STATE_ID"
  • "FILTER_BRANDSAFE_CHANNEL_ID"
  • "FILTER_BROWSER"
  • "FILTER_BUDGET_SEGMENT_DESCRIPTION"
  • "FILTER_CAMPAIGN_DAILY_FREQUENCY"
  • "FILTER_CARRIER"
  • "FILTER_CHANNEL_ID"
  • "FILTER_CITY"
  • "FILTER_COMPANION_CREATIVE_ID"
  • "FILTER_CONVERSION_DELAY"
  • "FILTER_COUNTRY"
  • "FILTER_CREATIVE_ATTRIBUTE"
  • "FILTER_CREATIVE_HEIGHT"
  • "FILTER_CREATIVE_ID"
  • "FILTER_CREATIVE_SIZE"
  • "FILTER_CREATIVE_TYPE"
  • "FILTER_CREATIVE_WIDTH"
  • "FILTER_DATA_PROVIDER"
  • "FILTER_DATE"
  • "FILTER_DAY_OF_WEEK"
  • "FILTER_DEVICE_MAKE"
  • "FILTER_DEVICE_MODEL"
  • "FILTER_DEVICE_TYPE"
  • "FILTER_DFP_ORDER_ID"
  • "FILTER_DMA"
  • "FILTER_DV360_ACTIVITY_ID"
  • "FILTER_EXCHANGE_ID"
  • "FILTER_FLOODLIGHT_ACTIVITY_ID"
  • "FILTER_FLOODLIGHT_PIXEL_ID"
  • "FILTER_GENDER"
  • "FILTER_INSERTION_ORDER"
  • "FILTER_INVENTORY_COMMITMENT_TYPE"
  • "FILTER_INVENTORY_DELIVERY_METHOD"
  • "FILTER_INVENTORY_FORMAT"
  • "FILTER_INVENTORY_RATE_TYPE"
  • "FILTER_INVENTORY_SOURCE"
  • "FILTER_INVENTORY_SOURCE_TYPE"
  • "FILTER_KEYWORD"
  • "FILTER_LINE_ITEM"
  • "FILTER_LINE_ITEM_DAILY_FREQUENCY"
  • "FILTER_LINE_ITEM_LIFETIME_FREQUENCY"
  • "FILTER_LINE_ITEM_TYPE"
  • "FILTER_MEDIA_PLAN"
  • "FILTER_MOBILE_DEVICE_MAKE"
  • "FILTER_MOBILE_DEVICE_MAKE_MODEL"
  • "FILTER_MOBILE_DEVICE_TYPE"
  • "FILTER_MOBILE_GEO"
  • "FILTER_MONTH"
  • "FILTER_MRAID_SUPPORT"
  • "FILTER_NIELSEN_AGE"
  • "FILTER_NIELSEN_COUNTRY_CODE"
  • "FILTER_NIELSEN_DEVICE_ID"
  • "FILTER_NIELSEN_GENDER"
  • "FILTER_NOT_SUPPORTED"
  • "FILTER_ORDER_ID"
  • "FILTER_OS"
  • "FILTER_PAGE_CATEGORY"
  • "FILTER_PAGE_LAYOUT"
  • "FILTER_PARTNER"
  • "FILTER_PARTNER_CURRENCY"
  • "FILTER_PUBLIC_INVENTORY"
  • "FILTER_QUARTER"
  • "FILTER_REGION"
  • "FILTER_REGULAR_CHANNEL_ID"
  • "FILTER_SITE_ID"
  • "FILTER_SITE_LANGUAGE"
  • "FILTER_SKIPPABLE_SUPPORT"
  • "FILTER_TARGETED_USER_LIST"
  • "FILTER_TIME_OF_DAY"
  • "FILTER_TRUEVIEW_AD_GROUP_AD_ID"
  • "FILTER_TRUEVIEW_AD_GROUP_ID"
  • "FILTER_TRUEVIEW_AGE"
  • "FILTER_TRUEVIEW_CATEGORY"
  • "FILTER_TRUEVIEW_CITY"
  • "FILTER_TRUEVIEW_CONVERSION_TYPE"
  • "FILTER_TRUEVIEW_COUNTRY"
  • "FILTER_TRUEVIEW_CUSTOM_AFFINITY"
  • "FILTER_TRUEVIEW_DMA"
  • "FILTER_TRUEVIEW_GENDER"
  • "FILTER_TRUEVIEW_IAR_AGE"
  • "FILTER_TRUEVIEW_IAR_CATEGORY"
  • "FILTER_TRUEVIEW_IAR_CITY"
  • "FILTER_TRUEVIEW_IAR_COUNTRY"
  • "FILTER_TRUEVIEW_IAR_GENDER"
  • "FILTER_TRUEVIEW_IAR_INTEREST"
  • "FILTER_TRUEVIEW_IAR_LANGUAGE"
  • "FILTER_TRUEVIEW_IAR_PARENTAL_STATUS"
  • "FILTER_TRUEVIEW_IAR_REGION"
  • "FILTER_TRUEVIEW_IAR_REMARKETING_LIST"
  • "FILTER_TRUEVIEW_IAR_TIME_OF_DAY"
  • "FILTER_TRUEVIEW_IAR_YOUTUBE_CHANNEL"
  • "FILTER_TRUEVIEW_IAR_YOUTUBE_VIDEO"
  • "FILTER_TRUEVIEW_IAR_ZIPCODE"
  • "FILTER_TRUEVIEW_INTEREST"
  • "FILTER_TRUEVIEW_KEYWORD"
  • "FILTER_TRUEVIEW_PARENTAL_STATUS"
  • "FILTER_TRUEVIEW_PLACEMENT"
  • "FILTER_TRUEVIEW_REGION"
  • "FILTER_TRUEVIEW_REMARKETING_LIST"
  • "FILTER_TRUEVIEW_URL"
  • "FILTER_TRUEVIEW_ZIPCODE"
  • "FILTER_UNKNOWN"
  • "FILTER_USER_LIST"
  • "FILTER_USER_LIST_FIRST_PARTY"
  • "FILTER_USER_LIST_THIRD_PARTY"
  • "FILTER_VIDEO_AD_POSITION_IN_STREAM"
  • "FILTER_VIDEO_COMPANION_SIZE"
  • "FILTER_VIDEO_COMPANION_TYPE"
  • "FILTER_VIDEO_CREATIVE_DURATION"
  • "FILTER_VIDEO_CREATIVE_DURATION_SKIPPABLE"
  • "FILTER_VIDEO_DURATION_SECONDS"
  • "FILTER_VIDEO_FORMAT_SUPPORT"
  • "FILTER_VIDEO_INVENTORY_TYPE"
  • "FILTER_VIDEO_PLAYER_SIZE"
  • "FILTER_VIDEO_RATING_TIER"
  • "FILTER_VIDEO_SKIPPABLE_SUPPORT"
  • "FILTER_VIDEO_VPAID_SUPPORT"
  • "FILTER_WEEK"
  • "FILTER_YEAR"
  • "FILTER_YOUTUBE_VERTICAL"
  • "FILTER_ZIP_CODE"
params.filters[].value string Filter value.
params.groupBys[] list Data is grouped by the filters listed in this field.
params.includeInviteData boolean Deprecated. This field is no longer in use.
params.metrics[] list Metrics to include as columns in your report.
params.type string Report type.

Type-specific limitations:
  • TYPE_ORDER_ID supports date ranges at most 60 days in the past.
  • TYPE_AUDIENCE_COMPOSITION, TYPE_INVENTORY_AVAILABILITY, TYPE_TRUEVIEW_IAR support date ranges at most 30 days in the past.


Acceptable values are:
  • "TYPE_ACTIVE_GRP"
  • "TYPE_AUDIENCE_COMPOSITION"
  • "TYPE_AUDIENCE_PERFORMANCE"
  • "TYPE_CLIENT_SAFE"
  • "TYPE_COMSCORE_VCE"
  • "TYPE_CROSS_FEE"
  • "TYPE_CROSS_PARTNER"
  • "TYPE_CROSS_PARTNER_THIRD_PARTY_DATA_PROVIDER"
  • "TYPE_ESTIMATED_CONVERSION"
  • "TYPE_FEE"
  • "TYPE_GENERAL"
  • "TYPE_INVENTORY_AVAILABILITY"
  • "TYPE_KEYWORD"
  • "TYPE_LINEAR_TV_SEARCH_LIFT"
  • "TYPE_NIELSEN_AUDIENCE_PROFILE"
  • "TYPE_NIELSEN_DAILY_REACH_BUILD"
  • "TYPE_NIELSEN_ONLINE_GLOBAL_MARKET"
  • "TYPE_NIELSEN_SITE"
  • "TYPE_NOT_SUPPORTED"
  • "TYPE_ORDER_ID"
  • "TYPE_PAGE_CATEGORY"
  • "TYPE_PETRA_NIELSEN_AUDIENCE_PROFILE"
  • "TYPE_PETRA_NIELSEN_DAILY_REACH_BUILD"
  • "TYPE_PETRA_NIELSEN_ONLINE_GLOBAL_MARKET"
  • "TYPE_PIXEL_LOAD"
  • "TYPE_REACH_AND_FREQUENCY"
  • "TYPE_REACH_AUDIENCE"
  • "TYPE_THIRD_PARTY_DATA_PROVIDER"
  • "TYPE_TRUEVIEW"
  • "TYPE_TRUEVIEW_IAR"
  • "TYPE_VERIFICATION"
  • "TYPE_YOUTUBE_VERTICAL"
queryId long Query ID.
reportDataEndTimeMs long The ending time for the data that is shown in the report. Note, reportDataEndTimeMs is required if metadata.dataRange is CUSTOM_DATES and ignored otherwise.
reportDataStartTimeMs long The starting time for the data that is shown in the report. Note, reportDataStartTimeMs is required if metadata.dataRange is CUSTOM_DATES and ignored otherwise.
schedule nested object Information on how often and when to run a query.
schedule.endTimeMs long Datetime to periodically run the query until.
schedule.frequency string How often the query is run.

Acceptable values are:
  • "DAILY"
  • "MONTHLY"
  • "ONE_TIME"
  • "QUARTERLY"
  • "SEMI_MONTHLY"
  • "WEEKLY"
schedule.nextRunMinuteOfDay integer Deprecated. This field has no effect.
schedule.nextRunTimezoneCode string Canonical timezone code for report generation time. Defaults to America/New_York.
timezoneCode string Canonical timezone code for report data time. Defaults to America/New_York.

Methods

createquery
Creates a query.
deletequery
Deletes a stored query as well as the associated stored reports.
getquery
Retrieves a stored query.
listqueries
Retrieves stored queries.
runquery
Runs a stored query to generate a report.