Azure API 管理和 API 版本控制
Azure API Management and API Versioning
Azure API 管理如何帮助我管理我的 API 的不同版本并将选定的操作从旧版本重新路由到 API 的新版本?
有两种方法可以实现。
- You can configure your API with a service URL that does not include version segment, like: https://my.api. And then configure
version segment on each operation's Rewrite URL template, like have
operation with URL template of /resource and Rewrite URL template of
/v1/Resource. That way you would be able to change version segment
value on each operation separately.
- Or if you'd like to keep "default" version segment in API's service URL then on a selected operations you can set a policy that
uses Set backend service to change backend request path.
Azure API 管理如何帮助我管理我的 API 的不同版本并将选定的操作从旧版本重新路由到 API 的新版本?
有两种方法可以实现。
- You can configure your API with a service URL that does not include version segment, like: https://my.api. And then configure version segment on each operation's Rewrite URL template, like have operation with URL template of /resource and Rewrite URL template of /v1/Resource. That way you would be able to change version segment value on each operation separately.
- Or if you'd like to keep "default" version segment in API's service URL then on a selected operations you can set a policy that uses Set backend service to change backend request path.