This handler generically searches for Cherwell objects given a map of Display Names and Values to search on equality and returns a JSON array of the matching objects. Execution starts by retrieving an Access Token from Cherwell using the client id/secret and username/password info values. Once that is successfully retrieved, the Object Name is translated into a Business Object Id by using the /getbusinessobjectsummary endpoint. The /getbusinessobjecttemplate endpoint is then called to exchange the Display Names in the filter for Field Ids (which is what Cherwell's API expects). The search is then sent with the various options to the server and returns JSON representations of the objects that match the filter (up to the max results size -- pagination is not currently implemented so the max results is currently just there to protect against killing the server if a filter set matches more records than expected). On a successful call, the handler will return the JSON Results, the amount of records that are returned in the results, and the amount of records that were matched overall (even if they weren't returned in the results).
Determine what to return if an error is encountered.
Readable name of the object to retrieve (ie. Incident).
Fields to Return
Comma separated list of fields to return (if none entered, all fields will be returned).
A JSON object with key/value pairs that will be searched for equality.