guidewire

Is it possible to Overwrite the Out-Of-The-Box CloudAPI Behavior for given property?


This is specific to Claim Notes Cloud API. OOTB Configuration is defined as returning only 100 Characters of Note Body when fetching all notes for a given Claim. If we need the entire body, then I need to invoke another Cloud API with the publicID of a specific note. This behavior is achieved by configuring the ‘x-gw-extensions’.

/cc/rest/claim/v1/claims/claimPublicID/notes

/cc/rest/common/v1/notes/notePublicID

I tried overwriting the schema definition of the body property for the Note entity but it didn’t change this default behavior.

Is it possible to overwrite this behavior to return the entire body in the first call instead of truncating to first 100 characters?


Solution

  • I am speculating that this is a design choice by Guidewire to prevent a possible performance issue. In the OOTB configuration the Body field is max 65,000 characters and could be a performance drain if there were many notes with close to the max chars in the body. I would also imagine that the JSON response could become very large which might make the response too large (if there are limits to the size of the request and response payload).

    I would probably examine the business reasons for needing the entirety of the note body for multiple notes and then try to come up with a better technical solution. Or push back on these business reasons. Even in the ClaimCenter UI, notes results are paged, so only 10 to 15 notes are brought back at a time so that performance is not an issue. Admittedly the Cloud API doesn't really have a way to page results, so you'd have to come up with a different solution.

    I made the assumption that you tried changing the maxLength property for the note body field in the JSON Schema and this did not work. If the result returned is still limited to 100 characters in the body field, then I would assume that the code that implements the /cc/rest/claim/v1/claims/claimPublicID/notes endpoint is limiting the characters returned.

    https://docs.guidewire.com/cloud/bc/202402/integration/common/json/topics/r_json-schema-file-specification.html