API Hub 依赖项可帮助您查看和管理 API 操作之间的关系。查找和跟踪 API 的依赖项有助于您更高效地管理 API 生态系统。例如,依赖项可帮助您发现更改或弃用 API 的潜在影响、排查问题或是分析对费用或合规性法规的遵守情况。API 可以存储在 API Hub 中,也可以存储在 API Hub 外部。
什么是依赖项?
API Hub 将依赖项建模为 API 操作之间的方向关系,其中一个 API 操作是提供方,另一个是使用方。例如,假设 PetStore API 调用 Location API 中的操作。在这种情况下,该操作依赖于 Location API 提供的操作。在 API Hub 中,我们将 PetStore 称为使用方,将 Location 称为提供方。
图 1 说明了 API 操作之间的提供方/使用方关系。Payment API 的 /debit 操作会使用 Fraud Detection API 的 /detect 操作。在此关系中,扣款操作是使用方,欺诈检测操作是提供方。
同样,/detect 使用 UserProfile API 和 GeoLocation API 提供的操作。在这种情况下,/detect 操作是使用方,另外两个操作是提供方,如图 1 所示。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-09。"],[[["This page outlines how to manage API dependencies within Apigee and Apigee hybrid, focusing on how they help manage relationships between API operations."],["Dependencies are modeled as directional relationships between API operations, where a consumer API operation relies on a supplier API operation."],["API hub allows dependencies to be based on either API operations within the hub or external APIs not stored within the hub."],["Creating a dependency involves identifying a consumer and a supplier API, and using the API hub UI or API to establish the link between them."],["The use of API dependencies helps in areas such as discovering the potential impact of changing an API or troubleshooting issues."]]],[]]