IM Policy Xpress - Using "REST Base Query"

Document ID : KB000012728
Last Modified Date : 27/02/2019
Show Technical Document Details
Introduction:

The Product Documentation provides some details on pass parameters into a Policy Express REST Base Query.  This document provides some examples of using Policy Express.

Question:

How do you pass data to the REST API service using CA Identity Management (IM) Policy Xpress?

 

Environment:
CA Identity Management 14.x
CA Identity Suite 14.x
Answer:

Example 1:

In this example data ("userId=1&title=foo&body=bar") is passed to the REST API service

You need to specify the data in the Request Body, in JSON format.


You can run the test from a Data Element with the following settings:

    Category:Data Sources

    Type: REST Base Query

    Function: Basic Auth Invoke

    Base URL: http://jsonplaceholder.typicode.com/posts

    Operation: POST

    User Name: dummy

    Password: dummy

    Request Body: {"userId":1,"title":"foo","body": "bar"}

 

This test will return the following:

Confirmation:   The test has run successfully with following string representational output: "{"id":101,"title":"foo","body":"bar","userId":1}".

This demonstrates that you have properly passed the parameters since they have been processed with success.

Example 2:

How to use CA IM Policy Xpress (PX) to call a REST web service and catch the response of the REST web service. 

This example uses the public REST API (below) and stores the return attribute in the Action tab.

https://jsonplaceholder.typicode.com/posts/1

Get Attribute
Action

As you can see from the JXplorer screenshot below the value is stored in attr03

JXplorer