Tutorial: Creating a policy using the Test Util API

This tutorial assumes you have set up your environment with Postman and the correct sample data set. For more information, see Tutorial: Set up your Postman environment.

In this tutorial, you will add a policy to the policy data stored in the TestSupportPolicyPlugin class. You can then reference this policy when creating a new claim.

  1. Enable the Test Util API.
    1. In Studio, open config.properties.
    2. Add the following to the end of the file:
      published-apis.PUBLISHEDAPIS_testutil_publish = true
      plugin.PLUGIN_IPOLICYSEARCHADAPTER_PROFILE = testutil-api
  2. Start ClaimCenter.
  3. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
    1. On the Authorization tab, select Basic Auth using user su and password gw.
  4. Enter the following call, but do not click Send yet:
    • POST http://localhost:8080/cc/rest/test-util/v1/policies
  5. Specify the request payload.
    1. In the first row of tabs (the one that starts with Params), click Body.
    2. In the row of radio buttons, select raw.
    3. At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
    4. Paste the text in the Sample policy payload into the text field underneath the radio buttons.
  6. Click Send.

Checking your work

ClaimCenter does not show data related to policies that are not associated with a claim. Therefore, there is no independent way to check your work for this tutorial, other than confirming that you get a response code and then attempting to create a claim using the policy.