AI-generated Key Takeaways
-
Migrate from Bid Manager API v1.1 to v2 as soon as possible because v1.1 will be sunsetted soon.
-
Migration requires updating your application to account for breaking changes and updating endpoint URLs to call v2.
-
Service and method names have changed in v2, requiring identification of equivalent methods.
-
Request URLs need to be updated to use the new v2 endpoints.
-
Numerous breaking changes in v2 require updates to how fields are represented, including changes from general nested objects to specific object types, general list objects to lists of new object types, and strings to enum types with updated values.
-
Date and time fields now use Date objects or RFC3339 UTC format instead of milliseconds since Unix Epoch.
-
Some fields have been removed in v2, and the behavior of the
queries.createandqueries.runmethods has been updated. -
Error messages in v2 are more specific, so error handling logic should be generalized.
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
QueriesandReportsin v1.1 are known asqueriesandqueries.reportsin v2. - Methods have been renamed as follows in v2:
v1.1 method name Equivalent v2 method Queries.createqueryqueries.createQueries.deletequeryqueries.deleteQueries.getqueryqueries.getQueries.listqueriesqueries.listQueries.runqueryqueries.runReports.listreportsqueries.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
Queryresource originally represented by general nested objects have changed to use the following object types: - The following fields in the
Queryresource originally represented by general list objects have changed to be lists of the following new object types: - The following fields in the
Queryresource, originally represented by strings,are represented by enum types in v2, and include the following changes:- The v2 equivalent of
metadata.dataRangenow uses theRangeenum. In converting to this enum, the valuePREVIOUS_HALF_MONTHhas been removed and the valueTYPE_NOT_SUPPORTEDwas changed toRANGE_UNSPECIFIED. metadata.formatnow uses theFormatenum. In converting to this enum, the valueEXCEL_CSVhas been removed and the valueFORMAT_UNSPECIFIEDhas been added.params.options.pathQueryOptions.channelGrouping.rules[].disjunctiveMatchStatements[].eventFilters[].dimensionFilter.matchandparams.options.pathQueryOptions.pathFilters[].eventFilters[].dimensionFilter.matchnow use theMatchenum.params.options.pathQueryOptions.pathFilters[].pathMatchPositionnow uses thePathMatchPositionenum. In converting to this enum, the valuePATH_MATCH_POSITION_UNSPECIFIEDhas been added.schedule.frequencynow uses theFrequencyenum. In converting to this enum, the valueFREQUENCY_UNSPECIFIEDhas been added.params.typenow uses theReportTypeenum. In converting to this enum, the following changes have been made:- The following values have been deprecated:
TYPE_ACTIVE_GRPTYPE_AUDIENCE_PERFORMANCETYPE_CLIENT_SAFETYPE_COMSCORE_VCETYPE_CROSS_FEETYPE_CROSS_PARTNERTYPE_CROSS_PARTNER_THIRD_PARTY_DATA_PROVIDERTYPE_ESTIMATED_CONVERSIONTYPE_FEETYPE_KEYWORDTYPE_LINEAR_TV_SEARCH_LIFTTYPE_NIELSEN_AUDIENCE_PROFILETYPE_NIELSEN_DAILY_REACH_BUILDTYPE_NIELSEN_ONLINE_GLOBAL_MARKETTYPE_PAGE_CATEGORYTYPE_PETRA_NIELSEN_DAILY_REACH_BUILDTYPE_PETRA_NIELSEN_ONLINE_GLOBAL_MARKETTYPE_PIXEL_LOADTYPE_THIRD_PARTY_DATA_PROVIDERTYPE_TRUEVIEW_IARTYPE_VERIFICATIONTYPE_YOUTUBE_VERTICAL
- The remaining values have all been updated to better reflect their
equivalent values in the UI:
v1.1 values Equivalent ReportTypevalueTYPE_NOT_SUPPORTEDREPORT_TYPE_UNSPECIFIEDTYPE_GENERALSTANDARDTYPE_INVENTORY_AVAILABILITYINVENTORY_AVAILABILITYTYPE_AUDIENCE_COMPOSITIONAUDIENCE_COMPOSITIONTYPE_ORDER_IDFLOODLIGHTTYPE_TRUEVIEWYOUTUBETYPE_NIELSEN_SITEGRPTYPE_PETRA_NIELSEN_AUDIENCE_PROFILEYOUTUBE_PROGRAMMATIC_GUARANTEEDTYPE_REACH_AND_FREQUENCYREACHTYPE_REACH_AUDIENCEUNIQUE_REACH_AUDIENCETYPE_PATHFULL_PATHTYPE_PATH_ATTRIBUTIONPATH_ATTRIBUTION
- The v2 equivalent of
- Fields
metadata.dataRange,reportDataStartTimeMs, andreportDataEndTimeMshave been replaced with fieldsrange,customStartDate, andcustomEndDate. The new date fields useDateobjects instead of milliseconds since Unix Epoch. These replacement fields have been moved into theDataRangeobject assigned to thedataRangefield in theQueryMetadataobject. - Fields
schedule.startTimeMsandschedule.endTimeMshave been replaced with fieldsstartDateandendDatein theQueryScheduleobject. The new date fields useDateobjects instead of milliseconds since Unix Epoch. - Fields
metadata.running,metadata.reportCount,metadata.googleCloudStoragePathForLatestReport,metadata.googleDrivePathForLatestReport, andmetadata.latestReportRunTimeMshave been removed. Information regarding the most recent generated reports of a query should instead be retrieved using thequeries.reports.listmethod with theorderByquery parameter of “key.reportId desc” to guarantee that the request lists the most recent reports first. - Fields
kind,timezoneCode,metadata.locale,params.includeInviteData, andschedule.nextRunMinuteOfDayhave been removed. queries.createno longer automatically runs queries after creation and theasynchronousquery parameter has been removed. Callqueries.runafterqueries.createto generate reports for new queries.- The
queries.runmethod has been updated in the following ways:- The
asynchronousquery parameter has been replaced with thesynchronousquery parameter. The new query parameter operates with inverse logic and is considered false if not specified. Given this,queries.rungenerates 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
timezoneCodefield and replacedataRange,reportDataStartTimeMs,reportDataEndTimeMsfields with aDataRangeobject assigned to thedataRangefield. - The method returns the resulting
Reportobject instead of an empty response body.
- The
- The
kindfield in thequeries.listresponse body has been removed.
Update calls to reports service
- The following fields in the
Reportresource originally represented by general nested objects have changed to use the following object types: - The following fields in the
Reportresource originally represented by general list objects have changed to be lists of the following new object types: - The following fields in the
Reportresource 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.formatnow uses theFormatenum. In converting to this enum, the valueEXCEL_CSVhas been removed andFORMAT_UNSPECIFIEDhas been added.metadata.status.statenow uses theStateenum. In converting to this enum, the valuesQUEUEDandSTATE_UNSPECIFIEDhave been added.params.options.pathQueryOptions.channelGrouping.rules[].disjunctiveMatchStatements[].eventFilters[].dimensionFilter.matchandparams.options.pathQueryOptions.pathFilters[].eventFilters[].dimensionFilter.matchnow use theMatchenum.params.options.pathQueryOptions.pathFilters[].pathMatchPositionnow uses thePathMatchPositionenum. In converting to this enum, the valuePATH_MATCH_POSITION_UNSPECIFIEDhas been added.params.typenow uses theReportTypeenum. 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.reportDataStartTimeMsandmetadata.reportDataEndTimeMshave been replaced with fieldsreportDataStartDateandreportDataEndDatein theReportMetadataobject. The new fields useDateobjects instead of milliseconds since Unix Epoch. metadata.status.finishTimeMshas been replaced by thefinishTimefield in theReportStatusobject. This new time field represents the datetime as a timestamp in RFC3339 UTC "Zulu" format instead of in milliseconds since Unix Epoch.metadata.status.failureandparams.includeInviteDatafields have been removed.- The
kindfield in thereports.listresponse 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.