---
title: UriRouterContext
description: Provides routing information associated with a request. When IG routes a request, it injects information about the routing into this context.
component: pinggateway
version: 7.2
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: 2025-06-02T16:30:54Z
superseded_by: https://docs.pingidentity.com/pinggateway/2026/reference/UriRouterContext.html
section_ids:
  UriRouterContext-properties: Properties
  UriRouterContext-moreinfo: More information
---

# UriRouterContext

Provides routing information associated with a request. When IG 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"`: [string](preface.html#definition-string)

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

* `"matchedUri"`: [string](preface.html#definition-string)

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

* `"originalUri"`: [url](preface.html#definition-url)

  The original target [URI](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/URI.html) for the request, as received by the web container.

  The value of this field is read-only.

* `"remainingUri"`: [string](preface.html#definition-string)

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

* `"uriTemplateVariables"`: [map](preface.html#definition-map)

  An unmodifiable map, where the keys and values are strings. The map contains the parsed URI template variables keyed on the URI template variable name.

## More information

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