---
title: "POST /queries/{queryId}:run"
method: POST
path: "/queries/{queryId}:run"
tags: ["queries"]
---

# POST /queries/{queryId}:run

`POST /queries/{queryId}:run`

Runs an existing query to generate a report.

## Path parameters

- `queryId` string, required

## Query parameters

- `synchronous` boolean

## Request body

- RunQueryRequest — Details specifying how to run a query.
  - `dataRange` DataRange — The date range to be reported on.
    - `range` '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' — 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.
    - `customStartDate` Date — 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
      - `month` integer — Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
      - `day` integer — 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.
      - `year` integer — Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
    - `customEndDate` Date — 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
      - `month` integer — Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
      - `day` integer — 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.
      - `year` integer — Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/doubleclickbidmanager.md) · [All operations](https://skmtc.net/google/apis/doubleclickbidmanager/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/doubleclickbidmanager/versions/645f0c8d982a/schema)
