Initializing help system before first use

REST Client Configuration

insightapi2~file_data  : record
The file_data record defines external data being uploaded to a webservice
source  : text
The local filename from which to read the data to upload. Must be set.
filename  : text
The filename to attach to the uploaded data in the Content-Disposition header; if unset, will be derived from the source filename
contenttype  : text
The content type of the uploaded data; defaults to 'application/octet-stream' if unset
insightapi2~httprequest  : record
The httprequest record contains the request sent to an operation on the remote webservice.
params  : dynamic array(set of string) of any
Parameters to set on the request. Refer to the operation documentation for a list of which parameters may be set for a specific operation.
contenttype  : text
The content type of the request; only needs to be set if it can't be inferred by the operation or the type of the body field
bodyfilename  : text
The filename from which to read the message body, if the request needs a body and the body field is unset.
body  : any
The mosel value to use to populate the message body. Refer to the operation documentation for details on what types are supported by a specific operation.
headers  : dynamic array(set of string) of list of text
Array defining additional HTTP headers to write to the request; a map from header name to list of header values to set.
ifparseresponsebody  : function(insightapi2~httpresponse):boolean
Optional; a function that takes a insightapi2~httpresponse and returns 'true' if we shoudl try to parse the response body data from 'bodyfilename' to 'body', 'false' otherwise. If not specified, the operation will apply a default heuristic.
insightapi2~httpresponse  : record
The httpresponse record contains the response returned by an operation called on the remote webservice.
operid  : string
The name of the operation from the REST API that was called.
status  : integer
The HTTP status code; values between 200 and 299 usually indicate success.
success  : boolean
Field indicating whether the status code indicates success (read-only)
errormsg  : text
Field containing a suitable error message that describes a non-successful response. The error message will be built from the status code and any response body.
headers  : dynamic array(set of string) of list of text
HTTP response headers; a map from header name (in lowercase) to a list of values for that header
contenttype  : text
The content type of the HTTP response, e.g. 'application/json'
body  : any
The value of the response body, if was a type that could be parsed into a Mosel value.
bodyfilename  : text
The filename in which the response body was stored, if it could not be parsed into a Mosel value. Can be set before the operation is called to write the response into a specific file.
cookies  : dynamic array(set of string) of text
Array of cookies set by the response
Note
The caller can set the bodyfilename attribute to force the response body to be written to a given filename; if unset, a temporary file will be used.
insightapi2~insightconfig  : record
The insightconfig type represents the remote webservice we're interacting with.
preprocessors  : list of procedure(string,insightapi2~httprequest)
procedures that will be called for every outgoing request, allowing you to (for example) add additional headers (list of procedure(operationId:string, request:insightapi2~httprequest))
postprocessors  : list of procedure(string,insightapi2~httpresponse)
procedures that will be called for every incoming request, allowing you to perform any post-processing on the request. (list of procedure(operationId:string, response:insightapi2~httpresponse)) Post-processors are called after the body file is parsed into Mosel data structures but before the raw data has been deleted to disk; ie the response can be read from the body or bodyfilename attributes of the httpresponse record (the former only if it's of a type that could be parsed into a Mosel value).
Notes
1. Use the insightapi2~insightconfig_init function to initialize the insightconfig before use.
2. Advanced users can add preprocessor/postprocessor callbacks to modify or log the interactions with the wbservice
Initializes the insightconfig based on the given parameters

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.