How to use Internal API with and without a VPN

Learn how to publish and access an API using the internal gateway on the Digibee Integration Platform.

On the Digibee Integration Platform, you can publish your pipelines for internal or external use:

  • Internal use: The API is available only within your cluster’s internal gateway, allowing access by other pipelines in your realm or through a VPN.

  • External use: The API is accessible over the internet, enabling interaction with external applications and services.

You can use the following triggers to configure your API: HTTP, HTTP File, and REST.

Follow the steps below to enable and use an Internal API.

1

Request Internal API access

To enable the Internal API in your realm, contact Digibee Customer Support.

The team will configure:

  • Hostname: {{realmname}}.digibee.internal

  • Ports:

    • 7070 (Production)

    • 9090 (Test)

On the Dedicated SaaS model, the ports may have different values.

2

Set up a pipeline for Internal API access

To configure the pipeline to use the Internal API:

  1. Choose a supported trigger: HTTP, HTTP File, and REST.

  2. Enable Internal API and API Key in the trigger configuration form.

  3. Assign the pipeline to an API Key.

  4. Deploy the pipeline on the Run page.

  5. Open the Deployment details card for the pipeline and expand the trigger configuration section to find the endpoint in the following format:

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

Consume the endpoint

Once the pipeline is deployed and the endpoint is available, you can consume it in two ways:

  1. Using a VPN

  2. Locally from other pipelines (without a VPN)

Consuming the endpoint using a VPN

To successfully consume an endpoint via a VPN, ensure that Phase 2 of Digibee is properly configured in your network. The service making the request must be within the IP range mapped to Digibee’s Phase 2.

Configuration requirements

Before making a request, confirm that:

  • Phase 2 of Digibee is declared in your network.

  • The API consumer’s IP range is mapped in Digibee’s Phase 2.

Calling the endpoint

Once Phase 2 mappings are configured, use the following format to call the endpoint:

http://10.255.0.2:9090/pipeline/dgb-support-lab/v1/test-api-internal

Troubleshooting checklist

If you find issues while making the request, verify the following:

  • The Internal API is available in your realm.

  • Your Phase 2 mapping is correctly configured in Digibee.

  • Phase 2 of Digibee is declared in your network.

  • You are using HTTP instead of HTTPS.

Consuming the endpoint locally (without VPN)

To consume this endpoint locally, replace this part: {replace with Digibee internal host} with the appropriate internal host and port. See this example:

  • Host: dgb-support-lab.digibee.internal

  • Port (Test): 9090

The following URL will be used to access the endpoint:

http://dgb-support-lab.digibee.internal:9090/pipeline/dgb-support-lab/v1/test-api-internal

Using an Internal API in a pipeline

You can trigger this endpoint within a pipeline using one of the following connectors:

Additionally, an external application can access it if a VPN connection is established with your realm.

Example: Using the REST connector

Here's an example of how to configure the REST connector to call this internal API:

Connector’s configuration:

Output:

{
  "status": 200,
  "statusMessage": "OK",
  "body": {
    "success": true
  },
  "headers": {
    "Access-Control-Allow-Origin": "*",
    "Access-Control-Expose-Headers": "Authorization",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "X-Digibee-Trace-Id": "d8e14b0b-fade-425d-b1f0-ed1cef66c8df"
  }
}

Last updated

Was this helpful?