...
The asset variable allows Policy policy instances to access data associated with the asset that is being requested.
...
Description | The path to the asset being accessed. |
---|---|
Syntax |
|
Example | Expression: asset.path Where the request was for a Task in the organization’s shared project. Result: /ExampleOrg/shared/TestTask |
Snaplex Functions
load balancer
Description | The load balancer for the Snaplex JCC node or FeedMaster node. When configuring an OAuth policy callback URL, you might want to reference the Snaplex load balancer set for your API Version or Proxy. |
---|---|
Syntax |
|
Example | Expression: Result: |
Request Functions
The request
variable allows Policy instances to access data associated with the current request being processed.
...
Description | Checks if the user is in the given role. |
---|---|
Syntax |
|
Example | Expression: request.isUserInRole('admin') Where the request was made by a user that has the admin role. Result: true |
...
Description | The HTTP method used for this request. |
---|---|
Syntax |
|
Example | Expression: request.method == 'POST' Where the request is a POST Result: true |
...
Description | The full path of the request. |
---|---|
Syntax |
|
Example | Expression: request.uri.path Result: /api/1/rest/feed/example/shared/HelloTask |
...
Description | The query parameters for this request. |
---|---|
Syntax |
|
Example | Expression: request.uri.query Result: $name |
...
Description | An object that contains the internal properties associated with the request. When configuring an OAuth policy scope, you might want to list the Snaplexes. You can use the following functions to do so:
|
---|---|
Syntax |
|
Example | Expression: Result: |
...