---
title: UriRouterContext
description: Reference for the UriRouterContext, which provides routing information injected by PingGateway when routing a request
component: pinggateway
version: 2026
page_id: pinggateway:reference:UriRouterContext
canonical_url: https://docs.pingidentity.com/pinggateway/2026/reference/UriRouterContext.html
llms_txt: https://docs.pingidentity.com/pinggateway/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2026-06-01T16:50:04Z
section_ids:
  UriRouterContext-properties: Properties
  UriRouterContext-moreinfo: More information
---

# UriRouterContext

Provides routing information associated with a request. When PingGateway routes a request, it injects information about the routing into this context.

## Properties

The context is named `router`, and is accessible at `${contexts.router}`. The context has the following properties:

* `"baseUri"`: *[java.lang.String](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html)*

  The portion of the request URI which has been routed so far.

* `"matchedUri"`: *[java.lang.String](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html)*

  The portion of the request URI that matched the URI template.

* `"originalUri"`: *[URI](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/URI.html)*

  The original target URI for the request, as received by PingGateway. The value of this field is read-only.

* `"remainingUri"`: *[java.lang.String](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html)*

  The portion of the request URI that is remaining to be matched.

* `"uriTemplateVariables"`: *[java.util.Map](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html)*

  A map with the format `Map<String, String>`, where:

  * Key: Name of a URI template variable

  * Value: Value of a URI template variable

## More information

[org.forgerock.http.routing.UriRouterContext](../_attachments/apidocs/org/forgerock/http/routing/UriRouterContext.html)
