# How to consume Internal API pipelines using ZTNA

On the Digibee Integration Platform, [**ZTNA (Zero Trust Network Access)**](https://app.gitbook.com/s/jvO5S91EQURCEhbZOuuZ/connectivity-management/ztna) is an extra layer of security that can be applied in pipelines, ensuring that services are securely and privately accessed.

For realms using ZTNA, the process for consuming internal APIs is similar to realms using VPN. Supported triggers for this feature include: [**HTTP**](https://app.gitbook.com/s/EKM2LD3uNAckQgy1OUyZ/triggers/web-protocols/http), [**HTTP File**](https://app.gitbook.com/s/EKM2LD3uNAckQgy1OUyZ/triggers/web-protocols/http-file), and [**REST**](https://app.gitbook.com/s/EKM2LD3uNAckQgy1OUyZ/triggers/web-protocols/rest).

## **Enabling Internal API**

To enable the Internal API feature in your realm:

1. Contact [Digibee Support](https://docs.digibee.com/documentation/troubleshooting/help-and-faq/support).
2. Provide your **Edge Router** details for registration.
   * The IP or DNS of the Edge Router you have configured in your infrastructure.
   * The port to send traffic to.

This information allows Digibee to create the inverse flow connecting your network to Digibee’s, ensuring secure and private communication. Inverse Flow in the Digibee Integration Platform allows you to execute calls from your infrastructure to internal pipelines within the Platform using ZTNA.

## **Configuring a pipeline to use Internal API**

To configure the pipeline using the Internal API:

1. Choose a supported trigger: [**HTTP**](https://app.gitbook.com/s/EKM2LD3uNAckQgy1OUyZ/triggers/web-protocols/http), [**HTTP File**](https://app.gitbook.com/s/EKM2LD3uNAckQgy1OUyZ/triggers/web-protocols/http-file), and [**REST**](https://app.gitbook.com/s/EKM2LD3uNAckQgy1OUyZ/triggers/web-protocols/rest).
2. Enable **Internal API** and **API Key** in the trigger configuration form.
3. Assign the pipeline to an [API Key](https://app.gitbook.com/s/jvO5S91EQURCEhbZOuuZ/platform-administration/settings/api-keys-consumers).
4. [Deploy the pipeline](https://app.gitbook.com/s/jvO5S91EQURCEhbZOuuZ/development-cycle/overview/deployment/deployments) on the **Run** page.
5. Open the card of the deployed pipeline to find the access link in this format: `​`

   `https://{replace-with-Digibee-internal-host}/pipeline/realm/v1/{{pipeline-name}}`

## **Consuming pipelines through ZTNA**

To consume a pipeline using ZTNA:

1. Use the **IP address of the Edge Router** and the environment-specific ZTNA mapping port:

* **Production environment:** Use port **7070**: `http://{{IP-EDGE}}:7070/pipeline/realm/v1/{{pipeline-name}}`
* **Test environment:** Use port **9090**: `http://{{IP-EDGE}}:9090/pipeline/realm/v1/{{pipeline-name}}`

{% hint style="warning" %}
Use HTTP instead of HTTPS when calling the pipeline. ​
{% endhint %}

For additional details, refer to the documentation on [ZTNA implementation on the Digibee Integration Platform](https://app.gitbook.com/s/jvO5S91EQURCEhbZOuuZ/connectivity-management/ztna).
