> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/platform/build/core-services/internal-gateway.md).

# Internal Gateway

## Overview <a href="#overview" id="overview"></a>

The Internal Gateway is a simplified Zuul service which provides an easy integration of services running different namespaces of a multistate instance, the clients need not know about all the details of microservices and their namespace in the K8s setup.

## Pre-requisites <a href="#pre-requisites" id="pre-requisites"></a>

Before you proceed with the documentation, make sure the following pre-requisites are met -

* *Java 17*
* API Gateway

## Key Functionalities <a href="#key-functionalities" id="key-functionalities"></a>

* Provides an easier API interface between services running in different tenants(namespaces) where direct access between microservices is blocked by default.
* Allows refactoring microservices independently without forcing the clients to refactor integrating logic with other tenants.

### Zuul Components <a href="#zuul-components" id="zuul-components"></a>

Route filter - a single route filter enables the routing based on tenatId from the HTTP header of the incoming requests.

## Configuration Details <a href="#configuration" id="configuration"></a>

### **Routing Property**

For each service, the below-mentioned property has to be added in `internal-gateway.json`

```json
{
  "/egov-mdms-service/.*": {
    "in.statea": "http://egov-mdms-service.statea:8080",
    "in.stateb": "http://egov-mdms-service.stateb:8080",
    "in": "http://egov-mdms-service:8080"
  },
  "/pt-calculator-v2/.*": {
    "in.statea": "http://pt-calculator-v2.statea:8080",
    "in.stateb": "http://pt-calculator-v2.stateb:8080",
    "in": "http://pt-calculator-v2.digit:8080"
  },
  "/property-services/.*": {
    "in.stateb": "http://property-services.digit:8080",
    "in.statea": "http://property-services.digit:8080"
  },
  "/billing-service/.*": {
    "in.stateb": "http://billing-service.digit:8080",
    "in.statea": "http://billing-service.digit:8080"
  },
  "/egov-searcher/.*": {
    "in.statea": "http://egov-searcher.statea:8080",
    "in.stateb": "http://egov-searcher.stateb:8080"
  },
  "/dashboard-analytics/.*": {
    "in.statea": "http://dashboard-analytics.statea:8080",
    "in.stateb": "http://dashboard-analytics.stateb:8080"
  }
}
```

### Sequence Diagram <a href="#sequence-diagram" id="sequence-diagram"></a>

Open


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digit.org/platform/build/core-services/internal-gateway.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
