---
title: Request context chain
description: The context chain of any request is established as follows:
component: pingoneaic
page_id: pingoneaic:idm-scripting:request-context
canonical_url: https://docs.pingidentity.com/pingoneaic/idm-scripting/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.
