Queries: runquery
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
运行存储的查询以生成报告。
立即试用。
请求
HTTP 请求
POST https://www.googleapis.com/doubleclickbidmanager/v1.1/query/queryId
参数
参数名称 |
值 |
说明 |
路径参数 |
queryId |
long |
要运行的查询 ID。
|
可选的查询参数 |
asynchronous |
boolean |
查询是否应异步运行。如果为 true,此方法
会立即返回结果。如果为 false 或未指定,则此方法不会
返回,直到查询运行完毕。
(默认值:false )
|
授权
此请求需要获得以下范围的授权:
范围 |
https://www.googleapis.com/auth/doubleclickbidmanager |
如需了解详情,请参阅身份验证和授权页面。
请求正文
在请求正文中,请按以下结构提供数据:
{
"dataRange": string,
"reportDataStartTimeMs": long,
"reportDataEndTimeMs": long,
"timezoneCode": string
}
属性名称 |
值 |
说明 |
备注 |
dataRange |
string |
用于生成报告的报告数据范围。
可接受的值包括:
- “
ALL_TIME ”
- “
CURRENT_DAY ”
- “
CUSTOM_DATES ”
- “
LAST_14_DAYS ”
- “
LAST_30_DAYS ”
- “
LAST_365_DAYS ”
- “
LAST_60_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 ”
|
|
reportDataStartTimeMs |
long |
报告中显示数据的开始时间。请注意,如果 dataRange 为 CUSTOM_DATES ,则 reportDataStartTimeMs 是必需的,否则会被忽略。 |
|
reportDataEndTimeMs |
long |
报告中显示数据的结束时间。请注意,如果 dataRange 为 CUSTOM_DATES ,则 reportDataEndTimeMs 是必需的,否则会被忽略。 |
|
timezoneCode |
string |
报告数据时间的规范时区代码。默认为 America/New_York 。 |
|
试试看!
请使用下面的 API Explorer 针对实际数据调用此方法并查看响应。
或者,您也可以尝试
独立广告
Explorer。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThis version of the Bid Manager API is sunset, and users should migrate to Bid Manager API v2.\u003c/p\u003e\n"],["\u003cp\u003eRequests to this version may return errors, and specific fields in retrieved \u003ccode\u003eQuery\u003c/code\u003e resources will be empty.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003erunquery\u003c/code\u003e request runs a stored query to generate a report, accepting parameters like \u003ccode\u003equeryId\u003c/code\u003e, \u003ccode\u003easynchronous\u003c/code\u003e, \u003ccode\u003edataRange\u003c/code\u003e, and time parameters.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/doubleclickbidmanager\u003c/code\u003e scope is required for this request.\u003c/p\u003e\n"]]],["The Bid Manager API v1.1 is sunset; users must migrate to v2. Requests to v1.1 may error, and successful requests will return empty `metadata.googleCloudStoragePathForLatestReport`, `metadata.latestReportRunTimeMs`, and `metadata.googleDrivePathForLatestReport` fields. To run a query, send a POST request with the `queryId`, optional asynchronous parameter, and report data range, start/end times, and timezone in the request body. This requires authorization with the `doubleclickbidmanager` scope.\n"],null,["# Queries: runquery\n\n| This version of the Bid Manager API has been sunset. Users must [migrate to Bid Manager API v2](/bid-manager/how-tos/v2-migration).\n|\n|\n| Requests to this version may return an error. If the request is successful, the following fields in retrieved [`Query`](/bid-manager/v1.1/queries#resource) resources will be empty:\n|\n| - [`metadata.googleCloudStoragePathForLatestReport`](/bid-manager/v1.1/queries#metadata.googleCloudStoragePathForLatestReport)\n| - [`metadata.latestReportRunTimeMs`](/bid-manager/v1.1/queries#metadata.latestReportRunTimeMs)\n| - [`metadata.googleDrivePathForLatestReport`](/bid-manager/v1.1/queries#metadata.googleDrivePathForLatestReport)\n|\n| \u003cbr /\u003e\n|\n| **Note:** Requires [authorization](#auth).\n\nRuns a stored query to generate a report.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/doubleclickbidmanager/v1.1/query/queryId\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Path parameters** |||\n| `queryId` | `long` | Query ID to run. |\n| **Optional query parameters** |||\n| `asynchronous` | `boolean` | Whether the query should be run asynchronously. When true, this method will return immediately. When false or not specified, this method will not return until the query has finished running. (Default: `false`) |\n\n### Authorization\n\nThis request requires authorization with the following scope:\n\n| Scope |\n|---------------------------------------------------------|\n| `https://www.googleapis.com/auth/doubleclickbidmanager` |\n\nFor more information, see the [authentication and authorization](/bid-manager/how-tos/authorizing) page.\n\n### Request body\n\nIn the request body, supply data with the following structure:\n\n```text\n{\n \"dataRange\": string,\n \"reportDataStartTimeMs\": long,\n \"reportDataEndTimeMs\": long,\n \"timezoneCode\": string\n}\n```\n\n| Property name | Value | Description | Notes |\n|-------------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `dataRange` | `string` | Report data range used to generate the report. \u003cbr /\u003e Acceptable values are: - \"`ALL_TIME`\" - \"`CURRENT_DAY`\" - \"`CUSTOM_DATES`\" - \"`LAST_14_DAYS`\" - \"`LAST_30_DAYS`\" - \"`LAST_365_DAYS`\" - \"`LAST_60_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`\" | |\n| `reportDataStartTimeMs` | `long` | The starting time for the data that is shown in the report. Note, `reportDataStartTimeMs` is required if `dataRange` is `CUSTOM_DATES` and ignored otherwise. | |\n| `reportDataEndTimeMs` | `long` | The ending time for the data that is shown in the report. Note, `reportDataEndTimeMs` is required if `dataRange` is `CUSTOM_DATES` and ignored otherwise. | |\n| `timezoneCode` | `string` | Canonical timezone code for report data time. Defaults to `America/New_York`. | |\n\nResponse\n--------\n\nIf successful, this method returns an empty response body.\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response.\nAlternatively, try the\n[standalone\nExplorer](https://developers.google.com/apis-explorer/#p/doubleclickbidmanager/v1.1/doubleclickbidmanager.queries.runquery)."]]