It's possible to publish your organization's pipelines for internal and/or external use. For internal use, the API is made available exclusively on the internal gateway of your cluster, allowing access by other pipelines within your realm or via VPN. For external use, the API is also accessible over the internet, enabling interaction with external applications and services.
Enabling Internal API in the realm
The internal API is not enabled by default in the realm. To do so, please contact Digibee's support team. (It needs to be enabled once in the realm to be used in your pipelines).
By default, the hostname {{realmname}}.digibee.internal and ports 7070 (PROD) and 9090 (TEST) will be made available.
Configuring Internal API in the Pipeline (REST Trigger)
Let's use the scenario below as an example:
Realm: dgb-support-lab
Host: dgb-support-lab.digibee.internal
Port (test): 9090
Port (prod): 7070
Pipeline name: test-api-internal
We configured the REST trigger in the pipeline named "test-api-internal." (Remember to assign this pipeline to an API Key).
After deploying the pipeline in the TEST environment, the following endpoint will be made available:
https://{replace with Digibee internal host}/pipeline/dgb-support-lab/v1/test-api-internal
The consumption of this endpoint can be done via VPN or locally by other pipelines. In the latter case, it is not necessary to have a VPN established with Digibee. The way to consume the endpoint differs in the two options mentioned. Let's go into details:
Consuming via VPN:
It's necessary for Phase 2 of Digibee to be declared in your network, and for the service that will perform the consumption to be within the range of your Phase 2 that is mapped in Digibee, for example:
Once the Phase 2 mappings are configured, the endpoint should be called as follows:
http://10.255.0.2:9090/pipeline/dgb-support-lab/v1/test-api-internal
Checklist that you can perform via chat to make the call via VPN:
Check if the Internal API is available in your realm.
Verify if your Phase 2, which maintains the API consumer, is mapped in Digibee.
Phase 2 of Digibee must be declared in your network.
Use HTTP instead of HTTPS.
Consuming locally (without VPN):
To consume this endpoint, you must replace {replace with Digibee internal host} with the internal host and port.
Host: dgb-support-lab.digibee.internal
Port (test): 9090
http://dgb-support-lab.digibee.internal:9090/pipeline/dgb-support-lab/v1/test-api-internal
Use HTTP instead of HTTPS.
How to consume an Internal API:
Now you can trigger your Endpoint through a pipeline using the REST V2 component or the Pipeline Executor, as well as from an external application, provided that it has an established VPN connection with your realm.
Here's an example using the REST V2 component.