---
title: ScriptableResourceUriProvider
description: Use a script to return a resource URL to include in policy decision requests to AM. The result of the script must be a string that represents a resource URL. The PolicyEnforcementFilter uses the returned resource URL as a key to identify cached policy decisions.
component: pinggateway
version: 2026
page_id: pinggateway:reference:ScriptableResourceUriProvider
canonical_url: https://docs.pingidentity.com/pinggateway/2026/reference/ScriptableResourceUriProvider.html
revdate: 2024-07-10T09:15:32Z
section_ids:
  usage: Usage
  properties: Properties
---

# ScriptableResourceUriProvider

Use a script to return a resource URL to include in policy decision requests to AM. The result of the script must be a string that represents a resource URL. The [PolicyEnforcementFilter](PolicyEnforcementFilter.html) uses the returned resource URL as a key to identify cached policy decisions.

To increase performance, use ScriptableResourceUriProvider in conjunction with AM policies to maximize the the cache hit ratio.

When a request matches a cached policy decision, PingGateway can reuse the decision without asking AM for a new decision. When caching is disabled, PingGateway must ask AM to make a decision for each request.

## Usage

```json
"resourceUriProvider": {
  "type": "ScriptableResourceUriProvider",
  "config": {
    "type": configuration expression<string>,
    "file": configuration expression<string>, // Use either "file"
    "source": [ string, ... ],                // or "source", but not both.
    "args": object,
    "clientHandler": Handler reference
  }
}
```

## Properties

For information about properties, refer to [PingGateway scripts](Scripts.html).
