Logging REST APIs

Guidewire provides the means to use intentional logging with REST APIs in the default implementation class for the optional IRestDispatchPlugin plugin. This plugin is suitable for very high-level profiling of REST APIs, as it captures information about the API, path template, and elapsed time for each request. The log messages that the plugin generates are often useful for obtaining an aggregate view of what requests the REST framework receives and how long these requests are taking to complete.

REST endpoints and intentional logging

Guidewire provides several endoints that you can use with intentional logging.

Setting ILConfig options
REST endpoint /intentionallogging/config supports the following request types:
  • GET
  • PUT
API PUT requests accept JSON payloads that have the following form.
"ILConfig": {
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean"
     }
   },
  "required": [
    "enabled"
   ]
}
Setting ILElementConfig options
REST endpoint /intentionallogging/elements supports the following request types:
  • GET
  • PATCH
API PATCH requests accept JSON payloads that have the following form.
"ILElementConfigs": {
  "type": "object",
  "properties": {
    "elementConfigurations": {
      "type": "array", "items": { "$ref": "#/definitions/ILElementConfig" }
    }
  },
  "required": [
    "elementConfigurations"
 ]
},
"ILElementConfig": {
  "type": "object",
  "properties": {
    "elementType": { 
      "type": "string", 
      "x-gw-type": "typekey.ILElementType", 
      "x-gw-export-enumeration": true
    },
    "identifier": { "type": "string" },
      "enabled": { "type": "boolean" }
    },
    "required": [ "elementType", "identifier", "enabled" ]
}