Subscribing to APIs
Before subscribing to an API, the API must already be exposed by another team. The provider must have completed both the specification registration and the API exposure. See Exposing APIs for details on the full exposure process.
Subscribing to an API grants your application access to an API exposed by another team. The subscription process is managed through Rover files and may require approval depending on the API provider's configuration.
Defining an API Subscription
API subscriptions are declared in the subscriptions section of your Rover file:
apiVersion: tcp.ei.telekom.de/v1
kind: Rover
metadata:
name: frontend-app
spec:
zone: dataplane1
subscriptions:
- type: api
basePath: /checkout/v1
Key Fields
| Field | Description |
|---|---|
basePath | The base path of the API you want to subscribe to. This must match an existing exposed API. |
What Happens When You Subscribe
When you apply a Rover file with an API subscription, the Control Plane:
- Creates an ApiSubscription resource linking your application to the target API
- The ApiSubscription handler verifies that both the Api resource and an active ApiExposure exist for the requested base path
- Creates an Approval resource (if the API requires approval)
- Waits for approval to be granted (for
simpleorfoureyesstrategies) - Once approved, creates a Gateway ConsumeRoute that grants your application access to the API through the gateway
If no active Api resource or ApiExposure exists for the requested base path, your subscription will remain in a pending state. Verify that the API provider has completed both the specification registration and the exposure.
If the API uses the auto approval strategy, access is granted immediately. For simple or foureyes strategies, you will need to wait for the API provider to approve your request. See Approvals for details.
Additional Features
Beyond the basic subscription, you can customize your API subscription with additional features such as failover and security.
See Additional Features for the full list of features and detailed configuration examples.
| Feature | Description |
|---|---|
| Failover | Define fallback zones to try when the primary provider zone is unavailable. |
| Security | Provide your own OAuth2 or basic authentication credentials instead of using platform-managed identity. |
Checking Subscription Status
You can check the status of your subscriptions using Rover-CTL:
roverctl get-info
The output will show the status of each subscription, including whether it is pending approval, granted, or rejected. See the Rover-CTL CLI Reference for more commands and options.
Next Steps
- Subscribing to Events — Subscribe to events published by other teams
- Approvals — Understand how approval workflows work