---
title: Request context chain
description: The PingIDM request context chain, including root, security, HTTP, and router contexts established for each request
component: pingidm
version: 8
page_id: pingidm:scripting-guide:request-context
canonical_url: https://docs.pingidentity.com/pingidm/8.1/scripting-guide/request-context.html
llms_txt: https://docs.pingidentity.com/pingidm/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
keywords: ["Scripting", "Context Chain"]
superseded_by: https://docs.pingidentity.com/pingidm/8.1/scripting-guide/request-context.html
---

# Request context chain

The context chain of any request is established as follows:

1. The request starts with a *root context*, associated with a specific context ID.

2. The root context is wrapped in the *security context* that includes the authentication and authorization detail for the request.

3. The security context is further wrapped by the *HTTP context*, with the target URI. The HTTP context is associated with the normal parameters of the request, including a user agent, authorization token, and method.

4. The HTTP context is wrapped by one or more server/router context(s), with an endpoint URI. The request can have several layers of server and router contexts.
