Migrate from Bid Manager API v1.1 to v2

  • 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.create and queries.run methods 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:

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

Update calls to reports service

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.