In March 2022, we released version 2 of Bid Manager API. Given the release of this new version, we plan to announce a sunset date for v1.1 soon. We recommend that you start your migration from v1.1 to v2 as soon as you can.
Migrate your application
Migrating from v1.1 to v2 requires updating your endpoint URLs to call v2, and updating your application to account for breaking changes.
Update your API calls from v1.1 to v2
To use v2 instead of v1.1, you need to update your requests to use new v2 endpoints.
Identify equivalent methods
In order to update your API calls from using v1.1 to v2, you first must identify the equivalent v1.1 methods in v2.
The following names of all services and methods have changed slightly between v1.1 and v2:
- Services
Queries
andReports
in v1.1 are known asqueries
andqueries.reports
in v2. - Methods have been renamed as follows in v2:
v1.1 method name Equivalent v2 method Queries.createquery
queries.create
Queries.deletequery
queries.delete
Queries.getquery
queries.get
Queries.listqueries
queries.list
Queries.runquery
queries.run
Reports.listreports
queries.reports.list
Update to new endpoints
Once you've identified equivalent methods, you need to update your requests. For
example, to call the queries.getquery
method with v1.1, you would use
the following URL:
https://www.googleapis.com/doubleclickbidmanager/v1.1/query/queryId
To call the equivalent method in v2, known as queries.get
, update the
URL to the following:
GET https://doubleclickbidmanager.googleapis.com/v2/queries/queryId
If you're using a client library to make requests to the API, use the most recent version of the client library and update your configuration to use v2.
Make required changes
We're introducing a number of breaking changes in v2. Review the following instructions and make the required changes relevant to your existing use of the Bid Manager API.
Update calls to queries
service
- The following fields in the
Query
resource originally represented by general nested objects have changed to use the following object types: - The following fields in the
Query
resource originally represented by general list objects have changed to be lists of the following new object types: - The following fields in the
Query
resource, originally represented by strings,are represented by enum types in v2, and include the following changes:- The v2 equivalent of
metadata.dataRange
now uses theRange
enum. In converting to this enum, the valuePREVIOUS_HALF_MONTH
has been removed and the valueTYPE_NOT_SUPPORTED
was changed toRANGE_UNSPECIFIED
. metadata.format
now uses theFormat
enum. In converting to this enum, the valueEXCEL_CSV
has been removed and the valueFORMAT_UNSPECIFIED
has been added.params.options.pathQueryOptions.channelGrouping.rules[].disjunctiveMatchStatements[].eventFilters[].dimensionFilter.match
andparams.options.pathQueryOptions.pathFilters[].eventFilters[].dimensionFilter.match
now use theMatch
enum.params.options.pathQueryOptions.pathFilters[].pathMatchPosition
now uses thePathMatchPosition
enum. In converting to this enum, the valuePATH_MATCH_POSITION_UNSPECIFIED
has been added.schedule.frequency
now uses theFrequency
enum. In converting to this enum, the valueFREQUENCY_UNSPECIFIED
has been added.params.type
now uses theReportType
enum. In converting to this enum, the following changes have been made:- The following values have been deprecated:
TYPE_ACTIVE_GRP
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_KEYWORD
TYPE_LINEAR_TV_SEARCH_LIFT
TYPE_NIELSEN_AUDIENCE_PROFILE
TYPE_NIELSEN_DAILY_REACH_BUILD
TYPE_NIELSEN_ONLINE_GLOBAL_MARKET
TYPE_PAGE_CATEGORY
TYPE_PETRA_NIELSEN_DAILY_REACH_BUILD
TYPE_PETRA_NIELSEN_ONLINE_GLOBAL_MARKET
TYPE_PIXEL_LOAD
TYPE_THIRD_PARTY_DATA_PROVIDER
TYPE_TRUEVIEW_IAR
TYPE_VERIFICATION
TYPE_YOUTUBE_VERTICAL
- The remaining values have all been updated to better reflect their
equivalent values in the UI:
v1.1 values Equivalent ReportType
valueTYPE_NOT_SUPPORTED
REPORT_TYPE_UNSPECIFIED
TYPE_GENERAL
STANDARD
TYPE_INVENTORY_AVAILABILITY
INVENTORY_AVAILABILITY
TYPE_AUDIENCE_COMPOSITION
AUDIENCE_COMPOSITION
TYPE_ORDER_ID
FLOODLIGHT
TYPE_TRUEVIEW
YOUTUBE
TYPE_NIELSEN_SITE
GRP
TYPE_PETRA_NIELSEN_AUDIENCE_PROFILE
YOUTUBE_PROGRAMMATIC_GUARANTEED
TYPE_REACH_AND_FREQUENCY
REACH
TYPE_REACH_AUDIENCE
UNIQUE_REACH_AUDIENCE
TYPE_PATH
FULL_PATH
TYPE_PATH_ATTRIBUTION
PATH_ATTRIBUTION
- The v2 equivalent of
- Fields
metadata.dataRange
,reportDataStartTimeMs
, andreportDataEndTimeMs
have been replaced with fieldsrange
,customStartDate
, andcustomEndDate
. The new date fields useDate
objects instead of milliseconds since Unix Epoch. These replacement fields have been moved into theDataRange
object assigned to thedataRange
field in theQueryMetadata
object. - Fields
schedule.startTimeMs
andschedule.endTimeMs
have been replaced with fieldsstartDate
andendDate
in theQuerySchedule
object. The new date fields useDate
objects instead of milliseconds since Unix Epoch. - Fields
metadata.running
,metadata.reportCount
,metadata.googleCloudStoragePathForLatestReport
,metadata.googleDrivePathForLatestReport
, andmetadata.latestReportRunTimeMs
have been removed. Information regarding the most recent generated reports of a query should instead be retrieved using thequeries.reports.list
method with theorderBy
query parameter of “key.reportId desc” to guarantee that the request lists the most recent reports first. - Fields
kind
,timezoneCode
,metadata.locale
,params.includeInviteData
, andschedule.nextRunMinuteOfDay
have been removed. queries.create
no longer automatically runs queries after creation and theasynchronous
query parameter has been removed. Callqueries.run
afterqueries.create
to generate reports for new queries.- The
queries.run
method has been updated in the following ways:- The
asynchronous
query parameter has been replaced with thesynchronous
query parameter. The new query parameter operates with inverse logic and is considered false if not specified. Given this,queries.run
generates reports asynchronously by default in v2 as opposed to synchronously, which is the default in v1.1. - The request body has been updated to remove the
timezoneCode
field and replacedataRange
,reportDataStartTimeMs
,reportDataEndTimeMs
fields with aDataRange
object assigned to thedataRange
field. - The method returns the resulting
Report
object instead of an empty response body.
- The
- The
kind
field in thequeries.list
response body has been removed.
Update calls to reports
service
- The following fields in the
Report
resource originally represented by general nested objects have changed to use the following object types: - The following fields in the
Report
resource originally represented by general list objects have changed to be lists of the following new object types: - The following fields in the
Report
resource originally represented by strings have changed so their equivalent fields in v2 are represented by new enum types and include changes to acceptable values:metadata.status.format
now uses theFormat
enum. In converting to this enum, the valueEXCEL_CSV
has been removed andFORMAT_UNSPECIFIED
has been added.metadata.status.state
now uses theState
enum. In converting to this enum, the valuesQUEUED
andSTATE_UNSPECIFIED
have been added.params.options.pathQueryOptions.channelGrouping.rules[].disjunctiveMatchStatements[].eventFilters[].dimensionFilter.match
andparams.options.pathQueryOptions.pathFilters[].eventFilters[].dimensionFilter.match
now use theMatch
enum.params.options.pathQueryOptions.pathFilters[].pathMatchPosition
now uses thePathMatchPosition
enum. In converting to this enum, the valuePATH_MATCH_POSITION_UNSPECIFIED
has been added.params.type
now uses theReportType
enum. In converting to this enum, numerous changes have been made and are listed in detail in the previous section regarding updating queries service calls.
- Fields
metadata.reportDataStartTimeMs
andmetadata.reportDataEndTimeMs
have been replaced with fieldsreportDataStartDate
andreportDataEndDate
in theReportMetadata
object. The new fields useDate
objects instead of milliseconds since Unix Epoch. metadata.status.finishTimeMs
has been replaced by thefinishTime
field in theReportStatus
object. This new time field represents the datetime as a timestamp in RFC3339 UTC "Zulu" format instead of in milliseconds since Unix Epoch.metadata.status.failure
andparams.includeInviteData
fields have been removed.- The
kind
field in thereports.list
response body has been removed.
Update error handling logic
Error messages across the API have been updated in v2. These new error messages are more specific and, in some cases, provide information on the values in the API request that are causing the error to be returned. If your existing error handling logic relies on specific error message text, generalize your error handling before migrating to v2.