Test Util API endpoints

The Test Util API provides endpoints that help with development and testing.

Warning: The Test Util API is intended for use in a development environment only. Do not use the Test Util API on a production system.

The following table lists the endpoints in the Test Util API that are used most often for BillingCenter and ClaimCenter, as well as where you can go to get more information about them.

Description Endpoint More information
Create a test policy (ClaimCenter) POST /test-util/v1/policies The Test Util API
View plan information (BillingCenter) GET /test-util/v1/plans/{planId} Endpoints for testing plans
Mark a plan as being "in use" (BillingCenter) POST /test-util/v1/plans/{planId}/mark-in-use Endpoints for testing plans

Document deletion endpoint

This section only applies to PolicyCenter.

In the base configuration, you can use the LocalDocumentContentSource plugin during testing to store files from a document management system. (See Plugins, Prebuilt Integrations, and SOAP APIs for more information on this plugin.) The following endpoint deletes all files stored by this plugin.

POST /test-util/v1/delete-documents

This command does not take a request body.

Schema reloading endpoints

This section only applies to PolicyCenter.

To help maintain a consistent environment during testing, you can enable and disable automatic schema reloading when APD products change with the following endpoints:

  • POST /test-util/v1/enable-schema-reload

  • POST /test-util/v1/disable-schema-reload

Neither of these commands takes a request body.

Job testing endpoints

This section only applies to PolicyCenter.

Use the following endpoints to test job activity:

  • GET /test-util/v1/jobs/{jobId}

  • POST /test-util/v1/jobs/{jobId}/complete-active-workflow

  • POST /test-util/v1/jobs/{jobId}/set-non-renewal-notif-date

Retrieve a job for testing

To retrieve a job to use for test actions, use the following command:

GET /test-util/v1/jobs/{jobId}

Command

GET /test-util/v1/jobs/pc:101

Response

{
    "data": {
        "attributes": {
            "id": "pc:101",
            "jobStatus": {
                "code": "Draft",
                "name": "Draft"
            }
        },

This command retrieves the ID and status of the job. The results are identical to using the Job API with the following query parameters:

GET /job/v1/jobs/{jobId}?fields=id,jobStatus

Complete an active job workflow

You can force completion of an active workflow with the following endpoint:

POST /test-util/v1/jobs/{jobId}/complete-active-workflow

This command does not take a request body.

For detailed information on workflows, see Configuration

Set non-renewal notification date

If you’re testing a non-renewal workflow, you can use the following endpoint to set the non-renewal notification date (nonRenewalNotificationDate) to the current date:

  • POST /test-util/v1/jobs/{jobId}/set-non-renewal-notif-date

This endpoint can be called only on jobs that are unlocked with a jobType of Renewal.

This command does not take a request body.

Test group endpoint

This section only applies to PolicyCenter.

Important:

Guidewire recommends using the groups endpoint in the admin API rather than the test-util groups endpoint. The test-util endpoint is available only for backward compatibility. See Groups for more information on groups.

You can create a new group for testing purposes using the following endpoint:

POST /test-util/v1/groups

The request must include both the following properties:

  • groupType: A value from the GroupType typelist, such as general.

  • name: A string value containing the name you want to give the new group.

It also must include one of the following:

  • organization: A JSON object with an id field that references the group id of the associated organization.

  • parent: A JSON object with an id field that references the id of the parent group.

Request

{
  "data": {
    "attributes": {
        "groupType": {
            "code": "general"
        },
        "name": "Cloud API Group 1",
        "parent": {
            "id": "systemTables:1"
        }    }
  }
}

Using this endpoint is similar to using the groups endpoint in the Admin API, but with test-util there are fewer fields required to create the group. Guidewire recommends using the Admin API endpoint for both testing and production purposes.