Search Ads 360 Reporting API 中的版本控制
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Search Ads 360 Reporting API 使用语义版本控制。
主要版本和次要版本的格式为 vMAJOR_MINOR
。例如,v0_0
是第一个主要版本,v0_1
是第一个次要版本。版本号的后缀表示版本类型:对于主要版本,后缀始终为零;对于次要版本,后缀始终大于零。
主要版本
主要版本会引入破坏性更改,即向后不兼容的更改。
每个主要版本都有单独的端点,例如:
https://searchads360.googleapis.com/v0
https://searchads360.googleapis.com/v1
从一个主要版本升级到另一个主要版本时,您可能需要先更改代码,然后才能切换到新的主要版本端点。
如果您使用客户端库,则需要升级到最新版本。新的主要版本提供了迁移指南,可帮助您修复代码中的任何破坏性更改。
破坏性更改的示例包括:
- 移除或重命名服务、接口、字段、方法或枚举值。
- 更改字段类型。
- 更改资源名称格式。
- 更改 HTTP 定义中的网址格式。
- 更改输出格式,例如将
0
更改为 --
作为默认值。
- 将返回的错误原因从 A 更改为 B。
次要版本
次要版本仅引入向后兼容的更改。
发布次要版本后,系统会自动更新已使用的端点。这不会导致代码中断。您可以继续使用现有的客户端库。
次要版本包含不会影响现有代码的新功能或更新。如果您想使用新功能,则需要将客户端库升级到最新版本。
日落
当旧版 Search Ads 360 Reporting API 版本计划弃用时,我们会在 searchads-api-announcements Google 群组上发布通知。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[[["\u003cp\u003eThe Search Ads 360 Reporting API uses semantic versioning with major and minor versions, where major versions introduce breaking changes and minor versions are backwards-compatible.\u003c/p\u003e\n"],["\u003cp\u003eMajor version releases require code changes and utilize separate endpoints, while minor version releases automatically update the existing endpoint without breaking existing code.\u003c/p\u003e\n"],["\u003cp\u003eBreaking changes in major versions might involve removing or renaming elements, changing types or formats, or modifying outputs and error reasons.\u003c/p\u003e\n"],["\u003cp\u003eMinor versions bring new features or updates but do not affect existing code; to utilize new features, upgrade your client library.\u003c/p\u003e\n"],["\u003cp\u003eSunset notices for older API versions are posted on the searchads-api-announcements Google group.\u003c/p\u003e\n"]]],["The Search Ads 360 Reporting API uses semantic versioning with major (e.g., v0) and minor (e.g., v0_1) versions. Major versions have breaking changes, require code modifications, a new endpoint, and client library upgrades. Minor versions are backward-compatible, automatically update the existing endpoint, and only require client library upgrades for new features. Breaking changes may involve removing or renaming elements, changing field types or output formats. Sunsets are posted on the Google group.\n"],null,["# Versioning in the Search Ads 360 Reporting API\n\nThe Search Ads 360 Reporting API uses [semantic versioning](https://semver.org/).\n\nThere are major and minor versions, formatted as\n`v`\u003cvar translate=\"no\"\u003eMAJOR\u003c/var\u003e`_`\u003cvar translate=\"no\"\u003eMINOR\u003c/var\u003e. For example, `v0_0` is the\nfirst major version, and `v0_1` the first minor version. The suffix of the\nversion number indicates the version type: for major versions it is always zero,\nand for minor versions it is always greater than zero.\n\nMajor versions\n--------------\n\nMajor releases introduce breaking changes, that is, changes that are not\nbackwards compatible.\n\nEach major version has a separate endpoint, for example: \n\n```text\nhttps://searchads360.googleapis.com/v0\n\nhttps://searchads360.googleapis.com/v1\n```\n\nWhen upgrading from one major version to another, you may need to change your\ncode before switching to the new major version endpoint.\n\nIf you use a [client library](/search-ads/reporting/client-libraries/client-libraries),\nyou need to upgrade to the newest version. New major versions provide a\nmigration guide to help you fix any breaking changes in your code.\n\nExamples of breaking changes include:\n\n- Removing or renaming a service, interface, field, method or enum value.\n- Changing the type of a field.\n- Changing a resource name format.\n- Changing the URL format in the HTTP definition.\n- Changing output formats, such as, changing `0` to `--` as the default value.\n- Changing the error reason returned from A to B.\n\nMinor versions\n--------------\n\nMinor versions introduce only backwards-compatible changes.\n\nWhen a minor version is released, the endpoint that is already in use is\nautomatically updated. This does not cause your code to break. You can continue\nto use your existing client library.\n\nMinor versions include new features or updates that do not affect your existing\ncode. If you want to use the new features, you need to upgrade your\n[client library](/search-ads/reporting/client-libraries/client-libraries) to the latest\nversion.\n\nSunsets\n-------\n\nWhen an older Search Ads 360 Reporting API version is scheduled to sunset, we\npost a notice on the [searchads-api-announcements](https://groups.google.com/g/searchads-api-announcements) Google group."]]