Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Migrate Integrations to Display & Video 360 API v5 Public Beta

· 6 min read · Smart Home

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

This guide walks you through migrating your existing Display & Video 360 API integrations from an older version (like v4) to the v5 Public Beta. The v5 beta introduces a new resource structure, updated field names, and changes to how some entities are referenced. By the end, you'll have a clear path to update your code, test it, and go live with v5.

What You'll Need

  • An active Display & Video 360 account with API access enabled.
  • Your current API client credentials (OAuth 2.0 client ID and secret) — these remain valid for v5.
  • Access to the Display & Video 360 API documentation for v5 (the public beta reference).
  • A development environment where you can test API calls (e.g., Postman, curl, or your existing codebase).
  • Your existing integration code or a clear list of the API endpoints you currently use.

Step-by-Step

  1. Review the v5 release notes and changelog. Start by reading the official Display & Video 360 API v5 beta documentation. Note any deprecations, new required fields, and breaking changes. Pay special attention to changes in resource names (e.g., advertiser may have new sub-resources) and any changes to how IDs are structured.
  2. Inventory your current API calls. List every endpoint your integration uses (e.g., advertisers, campaigns, line items, creatives, reports). For each, note the HTTP method, path, and key parameters. This becomes your migration checklist.
  3. Update your API base URL. Change the base URL from the old version to the v5 beta endpoint. Typically this is https://displayvideo.googleapis.com/v5beta/. If you were using a versioned path like /v4/, replace it with /v5beta/.
  4. Adjust resource paths and field names. Go through each endpoint and update any renamed fields. For example, if campaign had a field campaignName that is now displayName, update your code. Also check if any sub-resources have moved (e.g., lineItems might now be under advertisers/{id}/lineItems instead of a separate path).
  5. Handle new required fields. The v5 beta may introduce new mandatory fields for create or update operations. Read the request body schemas carefully. Add these fields to your payloads, even if they are just placeholders initially.
  6. Update any enum values. If you use enums (e.g., for status, type, or serving options), compare the allowed values in v5 with what you were using. Some values may be renamed, removed, or split into more specific options.
  7. Modify your authentication code. The OAuth 2.0 flow is unchanged, but verify your token endpoint and scopes are still correct. If you were using a service account, ensure it has the same roles/permissions in v5.
  8. Run a dry-run test. Before changing your production code, make a few test calls using the v5 endpoint with your existing credentials. Start with a simple GET (e.g., list advertisers) to confirm authentication and basic connectivity.
  9. Update your code and test in a sandbox. Modify your integration to use v5, and test against a test advertiser or a sandbox environment if available. Run through your main workflows: listing, creating, updating, and deleting resources, and pulling reports.
  10. Validate report exports. If you use the reporting API, check that report definitions and the output format are still compatible. The v5 beta may have changed report parameters or the way to request asynchronous exports.
  11. Monitor for errors and rate limits. During testing, log all responses. Watch for HTTP 400 (bad request) errors that indicate schema mismatches, and 404 (not found) errors if paths are wrong. Also check your rate limit usage to avoid throttling.
  12. Plan your cutover. Once your tests pass, schedule a maintenance window to switch your production integration to v5. Have a rollback plan (e.g., keep the old code ready) in case issues arise.

Common Mistakes

  • Overlooking field renames. A field that looks similar may have changed its name slightly (e.g., status to entityStatus). Always check the exact v5 schema.
  • Using old enum values. Copy-pasting from old code often brings invalid enum strings. Validate each one against the v5 reference.
  • Forgetting to update report templates. Reporting endpoints may have different resource names or query parameters. Your reports might silently fail or return empty data.
  • Ignoring new required fields. A create call that used to work may now return a 400 because a new field (like displayName) is mandatory.
  • Not testing with real data. Testing only with dummy data might miss issues with date formats, ID types, or timezone handling.
  • Skipping the changelog. The release notes often list exactly what changed. Skipping them leads to guessing.

Tips

  • Use the API Explorer in the documentation to test calls interactively before writing code.
  • Keep a mapping table of old vs. new field names and resource paths. This helps you update code quickly and serves as documentation for your team.
  • If you use a client library, check if a v5 beta version is available. Using an official library can save time and reduce errors.
  • Set up a dedicated test advertiser in Display & Video 360 so your migration testing doesn't affect production data.
  • Enable detailed logging in your integration to capture request/response payloads during the transition period.
  • Review the v5 beta's deprecation policy — some features may be removed in future stable releases, so plan accordingly.

Troubleshooting

  • 401 Unauthorized errors: Your OAuth token might be expired or scopes insufficient. Refresh your token and ensure your client has the displayvideo scope. If using a service account, check that it has the necessary roles in the Google Cloud console.
  • 404 Not Found: The resource path is likely incorrect. Double-check the v5 endpoint structure. For example, some resources are nested under advertisers that were previously top-level.
  • 400 Bad Request: This usually indicates a schema mismatch. Inspect the error message — it often specifies the exact field that is invalid. Compare your payload with the v5 example in the docs.
  • Rate limiting (429): You may be hitting the quota. Review the rate limits for v5 beta (they might differ from the stable version). Implement exponential backoff in your retry logic.
  • Reports return empty or fail: Check the report definition. The v5 beta may require a different reportType or dimensions format. Also verify that the report resource is created under the correct parent (e.g., advertisers/{id}/reports).
  • Inconsistent data between v4 and v5: During the beta, some data might be slightly delayed or have different default filters. Compare the same query in both versions to isolate whether it's a code issue or a beta data issue.
  • If all else fails: Consult the official Display & Video 360 API support channels or community forums. Include your request/response logs (with sensitive data redacted) when asking for help.

Frequently Asked Questions

Do I need to re-authenticate my users for v5?

No. The OAuth 2.0 tokens you already have work with v5. You only need to change the API endpoint and ensure your scopes are unchanged.

Can I use v4 and v5 simultaneously during migration?

Yes. You can run both versions in parallel. This is actually recommended for testing. Just ensure you don't mix resource IDs between versions in the same operation.

Will my existing reports still work in v5?

Most report definitions will work, but you may need to update the report resource path and check for any changed fields (like displayName). It's safest to recreate your report templates in v5.

What happens to features that are deprecated in v5?

Deprecated features are still available in the beta but will be removed in the stable release. You should plan to move away from them before the stable version launches.

Is the v5 beta stable enough for production?

Google recommends using beta versions for testing and development. For production workloads, you should wait for the stable version, unless you have a strong need for the new features and accept the risk of changes.

How do I know if my integration is fully migrated?

Run a comprehensive test suite covering all your endpoints and compare the results with v4. Also, monitor for any error logs for a few days after cutover to catch edge cases.