This page applies to Apigee and Apigee hybrid.
API hub dependencies help you see and manage the relationships between API operations. Finding and tracking an API's dependencies helps you manage your API ecosystem more efficiently. For example, dependencies can help you discover the potential impact of changing or deprecating an API, troubleshoot issues, or analyze adherence to cost or compliance regulations. The APIs can be stored within API hub or external to API hub.
What is a dependency?
API hub models a dependency as a directional relationship between API operations, where one API operation is the supplier and the other the consumer. For example, let's say the PetStore API calls an operation in the Location API. In this case, the operation is dependent on an operation provided by the Location API. In API hub, we refer to PetStore as the consumer and Location as the supplier.
Figure 1 illustrates the supplier/consumer relationship between API operations.
The Payment API's /debit
operation consumes the Fraud Detection API's /detect
operation. The debit operation is the
consumer, and the fraud detection operation is the supplier in this relationship.
Likewise, /detect
consumes operations that are supplied by the UserProfile API
and the GeoLocation API. In this case, the /detect
operation is the consumer and the other two are
the suppliers, as shown in Figure 1.
Create a dependency
You can create a dependency between API operations added to API hub from an uploaded API specification or an external API.
The basic steps to create a dependency in API hub are:
- Find two APIs that may have operations that may be dependent. The operations may be in registered APIs or external APIs.
- Determine which API is the supplier and which is the consumer. As discussed previously, the consumer invokes the supplier.
- Use the UI or the Create Dependency API to create the dependency between the supplier and consumer.
See Create a dependency.