{
  "protocol": "rest",
  "baseUrl": "https://doubleclickbidmanager.googleapis.com/v2/",
  "basePath": "/v2/",
  "documentationLink": "https://developers.google.com/bid-manager/",
  "description": "DoubleClick Bid Manager API allows users to manage and create campaigns and reports.",
  "canonicalName": "DoubleClick Bid Manager",
  "revision": "20260722",
  "rootUrl": "https://doubleclickbidmanager.googleapis.com/",
  "batchPath": "batch",
  "ownerDomain": "google.com",
  "mtlsRootUrl": "https://doubleclickbidmanager.mtls.googleapis.com/",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/doubleclickbidmanager": {
          "description": "View and manage your reports in DoubleClick Bid Manager"
        }
      }
    }
  },
  "version": "v2",
  "discoveryVersion": "v1",
  "name": "doubleclickbidmanager",
  "icons": {
    "x32": "http://www.google.com/images/icons/product/search-32.gif",
    "x16": "http://www.google.com/images/icons/product/search-16.gif"
  },
  "id": "doubleclickbidmanager:v2",
  "resources": {
    "queries": {
      "resources": {
        "reports": {
          "methods": {
            "get": {
              "parameters": {
                "queryId": {
                  "format": "int64",
                  "required": true,
                  "location": "path",
                  "description": "Required. The ID of the query that generated the report.",
                  "type": "string"
                },
                "reportId": {
                  "format": "int64",
                  "description": "Required. The ID of the query to retrieve.",
                  "type": "string",
                  "location": "path",
                  "required": true
                }
              },
              "flatPath": "queries/{queryId}/reports/{reportId}",
              "id": "doubleclickbidmanager.queries.reports.get",
              "response": {
                "$ref": "Report"
              },
              "scopes": [
                "https://www.googleapis.com/auth/doubleclickbidmanager"
              ],
              "description": "Retrieves a report.",
              "path": "queries/{queryId}/reports/{reportId}",
              "httpMethod": "GET",
              "parameterOrder": [
                "queryId",
                "reportId"
              ]
            },
            "list": {
              "response": {
                "$ref": "ListReportsResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/doubleclickbidmanager"
              ],
              "description": "Lists reports generated by the provided query.",
              "path": "queries/{queryId}/reports",
              "httpMethod": "GET",
              "parameterOrder": [
                "queryId"
              ],
              "parameters": {
                "queryId": {
                  "format": "int64",
                  "location": "path",
                  "required": true,
                  "description": "Required. The ID of the query that generated the reports.",
                  "type": "string"
                },
                "pageSize": {
                  "location": "query",
                  "format": "int32",
                  "description": "Maximum number of results per page. Must be between `1` and `100`. Defaults to `100` if unspecified.",
                  "type": "integer"
                },
                "pageToken": {
                  "location": "query",
                  "description": "A token identifying which page of results the server should return. Typically, this is the value of nextPageToken returned from the previous call to the `queries.reports.list` method. If unspecified, the first page of results is returned.",
                  "type": "string"
                },
                "orderBy": {
                  "description": "Field to sort the list by. Accepts the following values: * `key.reportId` (default) The default sorting order is ascending. To specify descending order for a field, add the suffix `desc` to the field name. For example, `key.reportId desc`.",
                  "type": "string",
                  "location": "query"
                }
              },
              "flatPath": "queries/{queryId}/reports",
              "id": "doubleclickbidmanager.queries.reports.list"
            }
          }
        }
      },
      "methods": {
        "delete": {
          "id": "doubleclickbidmanager.queries.delete",
          "flatPath": "queries/{queryId}",
          "httpMethod": "DELETE",
          "parameterOrder": [
            "queryId"
          ],
          "path": "queries/{queryId}",
          "parameters": {
            "queryId": {
              "format": "int64",
              "description": "Required. The ID of the query to delete.",
              "type": "string",
              "required": true,
              "location": "path"
            }
          },
          "scopes": [
            "https://www.googleapis.com/auth/doubleclickbidmanager"
          ],
          "description": "Deletes an existing query as well as its generated reports."
        },
        "list": {
          "httpMethod": "GET",
          "parameterOrder": [],
          "response": {
            "$ref": "ListQueriesResponse"
          },
          "scopes": [
            "https://www.googleapis.com/auth/doubleclickbidmanager"
          ],
          "description": "Lists queries created by the current user.",
          "path": "queries",
          "flatPath": "queries",
          "id": "doubleclickbidmanager.queries.list",
          "parameters": {
            "pageSize": {
              "location": "query",
              "format": "int32",
              "description": "Maximum number of results per page. Must be between `1` and `100`. Defaults to `100` if unspecified.",
              "type": "integer"
            },
            "pageToken": {
              "description": "A token identifying which page of results the server should return. Typically, this is the value of nextPageToken, returned from the previous call to the `queries.list` method. If unspecified, the first page of results is returned.",
              "type": "string",
              "location": "query"
            },
            "orderBy": {
              "location": "query",
              "description": "Field to sort the list by. Accepts the following values: * `queryId` (default) * `metadata.title` The default sorting order is ascending. To specify descending order for a field, add the suffix `desc` to the field name. For example, `queryId desc`.",
              "type": "string"
            }
          }
        },
        "run": {
          "flatPath": "queries/{queryId}:run",
          "id": "doubleclickbidmanager.queries.run",
          "parameters": {
            "queryId": {
              "format": "int64",
              "description": "Required. The ID of the query to run.",
              "type": "string",
              "location": "path",
              "required": true
            },
            "synchronous": {
              "location": "query",
              "description": "Whether the query should be run synchronously. When `true`, the request won't return until the resulting report has finished running. This parameter is `false` by default. Setting this parameter to `true` is **not recommended**.",
              "type": "boolean"
            }
          },
          "request": {
            "$ref": "RunQueryRequest"
          },
          "httpMethod": "POST",
          "parameterOrder": [
            "queryId"
          ],
          "response": {
            "$ref": "Report"
          },
          "scopes": [
            "https://www.googleapis.com/auth/doubleclickbidmanager"
          ],
          "description": "Runs an existing query to generate a report.",
          "path": "queries/{queryId}:run"
        },
        "create": {
          "httpMethod": "POST",
          "parameterOrder": [],
          "request": {
            "$ref": "Query"
          },
          "path": "queries",
          "response": {
            "$ref": "Query"
          },
          "scopes": [
            "https://www.googleapis.com/auth/doubleclickbidmanager"
          ],
          "description": "Creates a new query.",
          "id": "doubleclickbidmanager.queries.create",
          "flatPath": "queries",
          "parameters": {}
        },
        "get": {
          "parameters": {
            "queryId": {
              "format": "int64",
              "location": "path",
              "required": true,
              "description": "Required. The ID of the query to retrieve.",
              "type": "string"
            }
          },
          "id": "doubleclickbidmanager.queries.get",
          "flatPath": "queries/{queryId}",
          "path": "queries/{queryId}",
          "response": {
            "$ref": "Query"
          },
          "scopes": [
            "https://www.googleapis.com/auth/doubleclickbidmanager"
          ],
          "description": "Retrieves a query.",
          "httpMethod": "GET",
          "parameterOrder": [
            "queryId"
          ]
        }
      }
    }
  },
  "schemas": {
    "Report": {
      "id": "Report",
      "description": "A single report generated by its parent report.",
      "type": "object",
      "properties": {
        "params": {
          "description": "The parameters of the report.",
          "$ref": "Parameters"
        },
        "key": {
          "description": "The key information identifying the report.",
          "$ref": "ReportKey"
        },
        "metadata": {
          "description": "The metadata of the report.",
          "$ref": "ReportMetadata"
        }
      }
    },
    "RunQueryRequest": {
      "description": "Details specifying how to run a query.",
      "type": "object",
      "properties": {
        "dataRange": {
          "description": "The date range used by the query to generate the report. If unspecified, the query's original data_range is used.",
          "$ref": "DataRange"
        }
      },
      "id": "RunQueryRequest"
    },
    "ReportStatus": {
      "properties": {
        "state": {
          "enumDescriptions": [
            "Default value when state is not specified or is unknown in this version.",
            "The report is queued to run.",
            "The report is currently running.",
            "The report has finished running successfully.",
            "The report has finished running in failure."
          ],
          "enum": [
            "STATE_UNSPECIFIED",
            "QUEUED",
            "RUNNING",
            "DONE",
            "FAILED"
          ],
          "description": "Output only. The state of the report generation.",
          "type": "string",
          "readOnly": true
        },
        "finishTime": {
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. The timestamp of when report generation finished successfully or in failure. This field will not be set unless state is `DONE` or `FAILED`.",
          "type": "string"
        },
        "format": {
          "enumDescriptions": [
            "Default value when format is not specified or is unknown in this version.",
            "CSV.",
            "Excel."
          ],
          "description": "The format of the generated report file.",
          "type": "string",
          "enum": [
            "FORMAT_UNSPECIFIED",
            "CSV",
            "XLSX"
          ]
        }
      },
      "description": "The status of a report.",
      "type": "object",
      "id": "ReportStatus"
    },
    "QueryMetadata": {
      "id": "QueryMetadata",
      "description": "The metadata of the query.",
      "type": "object",
      "properties": {
        "shareEmailAddress": {
          "description": "List of additional email addresses with which to share the query. If send_notification is `true`, these email addresses will receive a notification when a report generated by the query is ready. If these email addresses are connected to Display & Video 360 users, the query will be available to them in the Display & Video 360 interface.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "sendNotification": {
          "description": "Whether an email notification is sent to the query creator when a report generated by the query is ready. This value is `false` by default.",
          "type": "boolean"
        },
        "dataRange": {
          "description": "The date range the report generated by the query will report on. This date range will be defined by the time zone as used by the advertiser.",
          "$ref": "DataRange"
        },
        "title": {
          "description": "The display name of the query. This value will be used in the file name of reports generated by the query.",
          "type": "string"
        },
        "format": {
          "description": "The format of the report generated by the query.",
          "type": "string",
          "enum": [
            "FORMAT_UNSPECIFIED",
            "CSV",
            "XLSX"
          ],
          "enumDescriptions": [
            "Default value when format is not specified or is unknown in this version.",
            "CSV.",
            "Excel."
          ]
        }
      }
    },
    "Options": {
      "id": "Options",
      "description": "Report parameter options.",
      "type": "object",
      "properties": {
        "includeOnlyTargetedUserLists": {
          "description": "Whether to include data for audience lists specifically targeted by filtered line items or insertion orders. Requires the use of `FILTER_INSERTION_ORDER` or `FILTER_LINE_ITEM` filters.",
          "type": "boolean"
        }
      }
    },
    "Query": {
      "properties": {
        "metadata": {
          "description": "The metadata of the query.",
          "$ref": "QueryMetadata"
        },
        "queryId": {
          "description": "Output only. The unique ID of the query.",
          "type": "string",
          "readOnly": true,
          "format": "int64"
        },
        "params": {
          "description": "The parameters of the report generated by the query.",
          "$ref": "Parameters"
        },
        "schedule": {
          "description": "When and how often the query is scheduled to run. If the frequency field is set to `ONE_TIME`, the query will only run when queries.run is called.",
          "$ref": "QuerySchedule"
        }
      },
      "description": "A single query used to generate a report.",
      "type": "object",
      "id": "Query"
    },
    "FilterPair": {
      "description": "Represents a single filter rule.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of value to filter by. Defined by a [Filter](/bid-manager/reference/rest/v2/filters-metrics#filters) value.",
          "type": "string"
        },
        "value": {
          "description": "The identifying value to filter by, such as a relevant resource ID.",
          "type": "string"
        }
      },
      "id": "FilterPair"
    },
    "DataRange": {
      "id": "DataRange",
      "description": "The date range to be reported on.",
      "type": "object",
      "properties": {
        "range": {
          "description": "The preset date range to be reported on. If `CUSTOM_DATES` is assigned to this field, fields custom_start_date and custom_end_date must be set to specify the custom date range.",
          "type": "string",
          "enum": [
            "RANGE_UNSPECIFIED",
            "CUSTOM_DATES",
            "CURRENT_DAY",
            "PREVIOUS_DAY",
            "WEEK_TO_DATE",
            "MONTH_TO_DATE",
            "QUARTER_TO_DATE",
            "YEAR_TO_DATE",
            "PREVIOUS_WEEK",
            "PREVIOUS_MONTH",
            "PREVIOUS_QUARTER",
            "PREVIOUS_YEAR",
            "LAST_7_DAYS",
            "LAST_30_DAYS",
            "LAST_90_DAYS",
            "LAST_365_DAYS",
            "ALL_TIME",
            "LAST_14_DAYS",
            "LAST_60_DAYS"
          ],
          "enumDescriptions": [
            "Default value when range is not specified or is unknown in this version.",
            "Custom date range.",
            "Current day.",
            "Previous day.",
            "All days, including the current day, since the most recent Sunday.",
            "All days, including the current day, since the start of the current month.",
            "All days, including the current day, since the start of the current quarter.",
            "All days, including the current day, since the start of the current calendar year.",
            "The previous completed week, beginning from Sunday.",
            "The previous completed calendar month.",
            "The previous completed quarter.",
            "The previous completed calendar year.",
            "The previous 7 days, excluding the current day.",
            "The previous 30 days, excluding the current day.",
            "The previous 90 days, excluding the current day.",
            "The previous 365 days, excluding the current day.",
            "All time for which data is available, excluding the current day.",
            "The previous 14 days, excluding the current day.",
            "The previous 60 days, excluding the current day."
          ]
        },
        "customEndDate": {
          "description": "If `CUSTOM_DATES` is assigned to range, this field specifies the end date for the date range that is reported on. This field is required if using `CUSTOM_DATES` range and will be ignored otherwise.",
          "$ref": "Date"
        },
        "customStartDate": {
          "description": "If `CUSTOM_DATES` is assigned to range, this field specifies the starting date for the date range that is reported on. This field is required if using `CUSTOM_DATES` range and will be ignored otherwise.",
          "$ref": "Date"
        }
      }
    },
    "Date": {
      "id": "Date",
      "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp",
      "type": "object",
      "properties": {
        "month": {
          "format": "int32",
          "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.",
          "type": "integer"
        },
        "day": {
          "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.",
          "type": "integer",
          "format": "int32"
        },
        "year": {
          "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "QuerySchedule": {
      "id": "QuerySchedule",
      "description": "Settings on when and how frequently to run a query.",
      "type": "object",
      "properties": {
        "endDate": {
          "description": "The date on which to end the scheduled runs. This field is required if frequency is not set to `ONE_TIME`. Otherwise, it will be ignored.",
          "$ref": "Date"
        },
        "nextRunTimezoneCode": {
          "description": "The canonical code for the timezone the query schedule is based on. Scheduled runs are usually conducted in the morning of a given day. Defaults to `America/New_York`.",
          "type": "string"
        },
        "startDate": {
          "description": "The date on which to begin the scheduled runs. This field is required if frequency is not set to `ONE_TIME`. Otherwise, it will be ignored.",
          "$ref": "Date"
        },
        "frequency": {
          "description": "How frequently to run the query. If set to `ONE_TIME`, the query will only be run when queries.run is called.",
          "type": "string",
          "enum": [
            "FREQUENCY_UNSPECIFIED",
            "ONE_TIME",
            "DAILY",
            "WEEKLY",
            "SEMI_MONTHLY",
            "MONTHLY",
            "QUARTERLY",
            "YEARLY"
          ],
          "enumDescriptions": [
            "Default value when frequency is not specified or is unknown in this version.",
            "Only when the query is run manually.",
            "Once a day.",
            "Once a week.",
            "Twice a month.",
            "Once a month.",
            "Once a quarter.",
            "Once a year."
          ]
        }
      }
    },
    "Parameters": {
      "description": "Parameters of a generated report.",
      "type": "object",
      "properties": {
        "options": {
          "description": "Additional report parameter options.",
          "$ref": "Options"
        },
        "type": {
          "enumDescriptions": [
            "Default value when report type is not specified or is unknown in this version.",
            "Standard report.",
            "Inventory Availability report.",
            "Audience Composition report.",
            "Floodlight report.",
            "YouTube report.",
            "GRP report.",
            "YouTube Programmatic Guaranteed report.",
            "Reach report.",
            "Unique Reach Audience report.",
            "Full Path report.",
            "Path Attribution report."
          ],
          "enum": [
            "REPORT_TYPE_UNSPECIFIED",
            "STANDARD",
            "INVENTORY_AVAILABILITY",
            "AUDIENCE_COMPOSITION",
            "FLOODLIGHT",
            "YOUTUBE",
            "GRP",
            "YOUTUBE_PROGRAMMATIC_GUARANTEED",
            "REACH",
            "UNIQUE_REACH_AUDIENCE",
            "FULL_PATH",
            "PATH_ATTRIBUTION"
          ],
          "enumDeprecated": [
            false,
            false,
            false,
            true,
            false,
            false,
            false,
            false,
            false,
            false,
            true,
            true
          ],
          "description": "The type of the report. The type of the report determines the dimesions, filters, and metrics that can be used.",
          "type": "string"
        },
        "filters": {
          "description": "Filters to limit the scope of reported data.",
          "type": "array",
          "items": {
            "$ref": "FilterPair"
          }
        },
        "metrics": {
          "description": "Metrics to define the data populating the report. Defined by [Metric](/bid-manager/reference/rest/v2/filters-metrics#metrics) values.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "groupBys": {
          "description": "Dimensions by which to segment and group the data. Defined by [Filter](/bid-manager/reference/rest/v2/filters-metrics#filters) values.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "id": "Parameters"
    },
    "ReportMetadata": {
      "description": "The metadata of a report.",
      "type": "object",
      "properties": {
        "googleCloudStoragePath": {
          "readOnly": true,
          "description": "Output only. The location of the generated report file in Google Cloud Storage. This field will be absent if status.state is not `DONE`.",
          "type": "string"
        },
        "reportDataEndDate": {
          "description": "The end date of the report data date range.",
          "$ref": "Date"
        },
        "reportDataStartDate": {
          "description": "The start date of the report data date range.",
          "$ref": "Date"
        },
        "status": {
          "description": "The status of the report.",
          "$ref": "ReportStatus"
        }
      },
      "id": "ReportMetadata"
    },
    "ListReportsResponse": {
      "id": "ListReportsResponse",
      "properties": {
        "reports": {
          "description": "The list of reports. This field will be absent if empty.",
          "type": "array",
          "items": {
            "$ref": "Report"
          }
        },
        "nextPageToken": {
          "description": "A token to retrieve the next page of results. Pass this value in the page_token field in the subsequent call to `queries.reports.list` method to retrieve the next page of results.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "ReportKey": {
      "id": "ReportKey",
      "description": "Identifying information of a report.",
      "type": "object",
      "properties": {
        "queryId": {
          "readOnly": true,
          "format": "int64",
          "description": "Output only. The unique ID of the query that generated the report.",
          "type": "string"
        },
        "reportId": {
          "readOnly": true,
          "format": "int64",
          "description": "Output only. The unique ID of the report.",
          "type": "string"
        }
      }
    },
    "ListQueriesResponse": {
      "id": "ListQueriesResponse",
      "type": "object",
      "properties": {
        "nextPageToken": {
          "description": "A token to retrieve the next page of results. Pass this value in the page_token field in the subsequent call to `queries.list` method to retrieve the next page of results.",
          "type": "string"
        },
        "queries": {
          "description": "The list of queries. This field will be absent if empty.",
          "type": "array",
          "items": {
            "$ref": "Query"
          }
        }
      }
    }
  },
  "title": "DoubleClick Bid Manager API",
  "ownerName": "Google",
  "kind": "discovery#restDescription",
  "servicePath": "v2/",
  "parameters": {
    "uploadType": {
      "location": "query",
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")."
    },
    "$.xgafv": {
      "location": "query",
      "type": "string",
      "description": "V1 error format.",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "enum": [
        "1",
        "2"
      ]
    },
    "key": {
      "location": "query",
      "type": "string",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token."
    },
    "quotaUser": {
      "type": "string",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "location": "query"
    },
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "callback": {
      "location": "query",
      "type": "string",
      "description": "JSONP"
    },
    "fields": {
      "location": "query",
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "oauth_token": {
      "type": "string",
      "description": "OAuth 2.0 token for the current user.",
      "location": "query"
    },
    "access_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth access token."
    },
    "alt": {
      "default": "json",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "location": "query",
      "type": "string",
      "description": "Data format for response."
    },
    "prettyPrint": {
      "location": "query",
      "default": "true",
      "type": "boolean",
      "description": "Returns response with indentations and line breaks."
    }
  }
}
