Foresight REST API Configuration
To check the Foresight REST API configuration user can run the Get request with status=y parameter that is.
GET http://localhost:8080/ForesightREST?status=Y
The user gets all the config parameters with values in response. The response is as follows:
Foresight REST API Version 1.2.0 build v02 Status at 2024-09-04 11:28:16 UTC Started: 2024-08-23 06:18:12 UTC Jobs Run since start: 0 Instream Thread Pool Count: 5 (Max: 128) Translator Thread Pool Count: 9 (Max: 128) Max Validation Errors Count: 100 (Max: 1720000) Job ID Type: Timestamp (yymmddhhmmss_nnnnn) Guideline ID Match Required on PUT: true Logging Level: 1 Job Logging: false Job Retention: Forever Skipped Transaction sets for PublishReport: 837,835 FSRest.ini Directory: /usr/local/tomcat/TibcoFSRest/ Instream Library Status: Loaded Instream Library Version: 9.2.0 [Build 012r(64 bit): 11/19/2021] Instream Edition: Standard Code Table: not found. Guideline Version: ValidatorVersion=9.2.0.0 Instream Base Path: /usr/share/tomcat/tibco/instream/fseng/ Instream Ini Path: /usr/share/tomcat/tibco/instream/fseng/bin/ Translator Library Status: Loaded Translator Library Version: 4.1.0 Build 007 [Build 007r(64 bit): 10/19/2020] Translator Base Path: /usr/share/tomcat/tibco/instream/fseng/ Translator Ini Path: /usr/share/tomcat/tibco/instream/fseng/bin/ Guidelines Path: /usr/local/tomcat/TibcoFSRest/guidelines/ Maps Path: /usr/local/tomcat/TibcoFSRest/maps/ DataFiles Path: /usr/local/tomcat/TibcoFSRest/datafiles/ ControlFiles Path: /usr/local/tomcat/TibcoFSRest/controlfiles/ Jobs Base Path: /var/cache/tomcat/temp/TibcoFSRestJobs/ External System Links: Validation Callback POST: Address=(none) Format=Unknown Format 0 Translation Callback POST: Address=(none) Format=Unknown Format 0 Default Buffer=2048 Notification POST: Address=(none) Format=Unknown Format 0 Message POST: Address=(none) Format=Default File Request Callback POST: Address=(none) Format=(none) Current Working Directory: /usr/local/tomcat Operating System: Linux Properties: APIKeyExpireTime=604800 (Src:ini) DefaultResponseMediaType=application/json (Src:ini) DefaultThreadLocking=false (Src:default) FileReqCallbackFormat=TEXT (Src:default) FileRequestCaching=ALL (Src:ini) FileRequestCallbackAddr= (Src:default) FileRequestCallbackSecurity= (Src:default) GuidelineIDMatchRequired=Y (Src:ini) InstreamIniPath=/usr/share/tomcat/tibco/instream/fseng/bin/ (Src:env[FSINSTREAMINI]) InstreamMainPath=/usr/share/tomcat/tibco/instream/fseng/ (Src:calc) InstreamThreadCount=5 (Src:ini) JobIdType=S (Src:ini) JobRetention=ALL (Src:ini) LogLevel=1 (Src:ini) MaxErrorsCount=100 (Src:ini) MessageFormat=AuditSafe (Src:ini) MessagePostAddr= (Src:default) MessagePostFormat=JSON (Src:ini) MessagePostSecurity= (Src:default) NotifyPostAddr= (Src:default) NotifyPostFormat=JSON (Src:ini) NotifyPostSecurity= (Src:default) OutputJobMessagesSection=Y (Src:ini) RestControlPath=/usr/local/tomcat/TibcoFSRest/controlfiles/ (Src:ini) RestDataPath=/usr/local/tomcat/TibcoFSRest/datafiles/ (Src:ini) RestGuidelinesPath=/usr/local/tomcat/TibcoFSRest/guidelines/ (Src:ini) RestJobsPath=/var/cache/tomcat/temp/TibcoFSRestJobs/ (Src:ini) RestMapsPath=/usr/local/tomcat/TibcoFSRest/maps/ (Src:ini) RestRetainJobsPath=/usr/local/tomcat/TibcoFSRest/retainjobs/ (Src:ini) SkipTS=837,835 (Src:ini) TIInboundPath=/var/cache/tomcat/temp/inbound (Src:ini) TIOutboundPath=/var/cache/tomcat/temp/outbound (Src:ini) TimestampPattern=yyyy-MM-dd'T'HH:mm:ss.SSSXXX (Src:ini) TransCallbackAddr= (Src:default) TransCallbackFormat=JSON (Src:ini) TransCallbackSecurity= (Src:default) TranslatorIniPath=/usr/share/tomcat/tibco/instream/fseng/bin/ (Src:env[FSTRANSLATORINI]) TranslatorMainPath=/usr/share/tomcat/tibco/instream/fseng/ (Src:calc) TranslatorThreadCount=9 (Src:ini) ValCallbackAddr= (Src:default) ValCallbackFormat=JSON (Src:ini) ValCallbackSecurity= (Src:default) jdbc.driver=oracle.jdbc.driver.OracleDriver (Src:ini) jdbc.platform=oracle (Src:ini) jdbc.url=jdbc:oracle:thin:@<Database Host>:1521/<SID> (Src:ini) jdbc.username=<Database Username> (Src:ini) secureWithAPIKey=y (Src:ini)
The status response parameters are described below. Note that the response values of config properties can be changed using the corresponding environment variable name. Unless otherwise specified, the overriding environment variable name is the parameter keyword converted to all caps with the prefix FSREST_ added. For example, the InstreamThreadCount parameter setting is overridden by the contents of the FSREST_INSTREAMTHREADCOUNT environment variable.
|
Keyword |
Response Description |
|---|---|
|
|
The number of processing threads in the Instream thread pool. It controls the number of Instream jobs that can be processed simultaneously. Set higher values for heavy loads, but too high can bog down the machine. The maximum setting is 128. Example: InstreamThreadCount=5 The default value is 3. |
|
|
The number of processing threads in the Translator thread pool. It controls the number of translation jobs that can be processed simultaneously. You can set higher values for heavy loads, but too high can bog down the machine. The maximum setting is 128. Example: TranslatorThreadCount=9 The default value is 3. |
|
|
Sets the pattern for date and time output in the resource GET information. Note: AuditSafe requires the timestamp format 'nnnn-nn-nnTnn:nn:nn.nnn+/-zzz'
Example: TimestampPattern=yyyy-MM-dd HH:mm:ss.SSSZ Default: yyyy-MM-dd'T'HH:mm:ss.SSSXXX |
|
|
Directory path to the top of the Instream installation. Example: InstreamMainPath=c:/tibco/instream/9.0 Environment Variable Override: FSINSTREAMMAINDIR |
|
|
Directory where the main Instream dir.ini file is located. Example: InstreamIniPath=c:/tibco/instream/9.0/bin Environment Variable Override: FSINSTREAMINI |
|
|
Directory to the top of the Translator installation. Example: TranslatorMainPath=c:/tibco/translator/4.0 Environment Variable Override: FSTRANSLATORMAINDIR |
|
|
Directory where the main Translator dir.ini file is located. Example: TranslatorIniPath=c:/tibco/translator/4.0/bin Environment Variable Override: FSTRANSLATORINI |
|
|
Controls the type of Job ID required. ‘S’ uses the current date and time along with a counter to create a Job ID of the format Jyymmddhhmmss_nnnnn. Example: J190507164911_00001 ‘U’ uses a full UUID for the Job ID. Example: Jbca8888d-b27a-4cb5-9aeb-b4a1655bd066 Using ‘U’ is preferred when running more than one instance of the REST API on a single machine as the chance of generating identical IDs is greatly reduced. This allows the sharing of folder structures between the instances. Example: JobIdType=S Default: S |
|
|
Directory where REST ‘controlfiles’ resources are to be stored. Read/Write permissions are required. Environment Variable Override: FSREST_CONTROLDIR |
RestDataPath
|
Directory where REST ‘datafiles’ resources are to be stored. Read/Write permissions are required. Example: RestDataPath=C:\FSRest\datafiles Environment Variable Override: FSREST_DATADIR |
|
|
Directory where REST ‘guidelines’ resources are to be stored. Read/Write permissions are required. Environment Variable Override: FSREST_GUIDELINEDIR |
|
|
Directory where REST ‘jobs’ resources are to be stored. Read/Write and Create Directory permissions are required. Example: RestJobsPath=C:\FSRest\jobs Environment Variable Override: FSREST_JOBSDIR |
|
|
Directory where REST ‘maps’ resources are to be stored. Read/Write permissions are required. Environment Variable Override: FSREST_MAPDIR |
|
|
Include Messages section in Job SYNC responses and Notifications |
|
|
Indicates if any uploaded guideline must have an internal ID that matches its external filename. Default: y |
|
|
The HTTP address of the server that processes the Instream Callback HTTP POST request. Example: ValCallbackAddr=http://<host-name>:<port>/CallbackTesterREST/ValCB |
|
|
Indicates the content format for POSTs to, and replies from, the Instream Callback process specified in ValCallbackAddr. Valid Values J or JSON = application/json T or TEXT = text/plain Default: TEXT |
|
|
Specifies the type of security with any parameters in use between Foresight REST API and the server/application processing the Instream Callback POSTs. The general format of this parameter is: Type: Info Where type is the code for the type of security implemented, and Info is the additional data required for that type of security. Currently, the following types of security are supported:
Examples:
|
|
|
The HTTP address of the server that processes the Translator Callback HTTP POST request. Example: TransCallbackAddr=http://<host-name>:<port>/LocalApp/HandleFSRest |
|
|
Indicates the content format for POSTs to, and replies from, the Translator Callback process specified in TransCallbackAddr. Valid Values J or JSON = application/json T or TEXT = text/plain Default: TEXT |
|
|
Specifies the type of security with any parameters in use between the Foresight REST API and the server/application processing the Translator Callback POSTs. (See ValCallbackSecurity description for details.) |
|
|
The HTTP address of the server that processes the Notification Callback HTTP POST request. Example: NotifyPostAddr=http://<host-name>:<port>/myApp/CatchFSRestNotify |
|
|
Indicates the content format for POSTs to, and replies from, the Notification Callback process specified in NotifyPostAddr. Valid Values J or JSON = application/json T or TEXT = text/plain Default: TEXT |
|
|
Specifies the type of security with any parameters in use between REST API and the server/application processing the notification Callback POSTs. (See ValCallbackSecurity description for details.) |
|
|
The HTTP address of the server that processes the Message Callback HTTP POST request. MessagePostAddr=http://<host-name>:<port>/myLogger/catchMessage |
|
|
Indicates the content format for POSTs to, and replies from, the Message Callback process specified in MessagePostAddr. Valid Values J or JSON = application/json T or TEXT = text/plain Default: TEXT |
|
|
Specifies the type of security with any parameters in use between Foresight REST API and the server/application processing the message Callback POSTs. (See ValCallbackSecurity description for details.) |
|
|
Controls the format of the external messages that are sent to the messaging POST address. There are two values for MessageFormat: default value passes the message as the body of the message POST, and AuditSafe formats the message for AuditSafe, including passing the various AuditSafe fields. Note: If this parameter is not present, or has values other than the two defined values, then it takes the default value. These values are not case-sensitive.
|
|
|
The HTTP address of the server that processes the Message Callback HTTP POST request. Example: FileRequestCallbackAddr=http://<host-name>:<port>/myLogger/catchMessage |
|
|
Indicates the content format for POSTs to, and replies from, the File Request Callback process specified in FileRequestCallbackAddr. Valid Values J or JSON = application/json T or TEXT = text/plain Default: TEXT |
|
|
Specifies the type of security with any parameters in use between Foresight REST API and the server/application processing the File Request Callback POSTs. (See ValCallbackSecurity description for details.) |
|
|
Cache files are returned to Foresight REST API via the FileRequest Callback. Files are cached by writing them to their respective Foresight REST API resource directory. For example, Guidelines are cached in the Foresight REST API Guideline directory, Maps are cached in the Foresight REST API Maps directory. The caching is controlled using the FileRequestCaching parameter, which can be set in the G = guidelines, M = maps, C = control files, D = data files. The order and casing of the letter are not significant, that is, GMC, mcg, and cgM mean the same thing. Specifying 'All' or 'GMCD' are the same in the FileRequestCaching parameter. If the FileRequestCaching parameter is set to 'None', then no files received via the File Request Callback are cached. As with the other parameters, the FileRequestCaching parameter can be overridden with the contents of the environment variable FSREST_FILEREQUESTCACHING. Note: The FileRequestCaching setting has no effect if the FileRequestCallback parameter is not used.
|
|
|
Controls the verbosity level of log events: 0 = Errors 1 = Warnings 2 = Recommendations 3 = Informational 5 = Debug Default: 1 |
|
|
Sets the default setting for the jobs. |
|
|
Controls whether job files, including output files, are kept on the system after a SYNCO or ASYNCO job is completed and their output is returned or posted. Values: All: All jobs and their output are kept on the system (default) NoSYNCO: All jobs run with mode SYNCO has their files deleted once the job POST has been returned to the submitter. NoASYNCO: All jobs run with mode ASYNCO has their files deleted once the job results and files have been POSTed and acknowledged by the NotifyCallback receiver. Note: Both NoSYNCO and NoASYNCO can be specified, separated by a comma.
Example: JobRetention=NoSYNCO |
secureWithAPIKey
|
Secures your application using an API key for authentication. |
APIKeyExpireTime
|
Expire time (in seconds) for API key. |
jdbc.platform
|
MYSQL or Oracle If you are using an Oracle database, add its connector lib path to the |
jdbc.driver
|
Database driver URL |
jdbc.url
|
Database driver URL |
jdbc.username
|
Database username |
jdbc.databasename
|
Database name for MYSQL or Oracle database. Note: Property is specific to the Mysql database.
|
RestRetainJobsPath
|
Directory where Following is the default RestRetainJobsPath=/usr/local/tomcat/TibcoFSRest/retainjobs |
TIInboundPath
|
Inbound path of the Foresight Transaction Insight. You can update this using updateEnv request. |
TIOutboundPath
|
Outbound path of the Foresight Transaction Insight. You can update this using updateEnv request. |
skipTS
|
It skips one or multiple transaction set types for the copy operation. The default value is none, and could be set with the transaction set names, separated by commas. You can update this using updateEnv request. |
Other Environment Variables
| FSTRANSLATORINI | Contains path to the Translator Installation’s bin directory. |
| InstreamIniPath | FSINSTREAMINI
|
| InstreamMainPath | FSINSTREAMMAINDIR
|
| TranslatorIniPath | FSTRANSLATORINI
|
| TranslatorMainPath | FSTRANSLATORMAINDIR
|
Changing Foresight REST API Config Parameters
You can now change certain parameters without restarting the Foresight REST API server. This is done via a PUT operation to the main REST API address with the ‘updateEnv=y’ parameter. The body of PUT contains the parameters to change. You can change the following parameters:
TimestampPattern
|
TransCallbackFormat
|
FileReqCallbackFormat
|
JobIdType
|
NotifyCallbackAddr
|
FileRequestCaching
|
GuidelineIDMatchRequired
|
|
LogLevel
|
ValCallbackAddr
|
MessageCallbackAddr
|
JobRetention
|
|
|
MessagePostFormat
|
DefaultResponseMediaType
|
TransCallbackAddr
|
FileReqCallbackAddr
|
NotifyPostAddr
|
MessagePostAddr
|
RestRetainJobsPath
|
For example:
http:.../ForesightREST?updateEnv=y
Body
LogLevel=0
ValCallbackAddr=http://NA-DUB-DOCKER1:8080/BCStubREST/ValCB
NotifyPostAddr=http://NA-DUB-DOCKER1:8080/BCStubREST/Notify
MessagePostAddr=http://NA-DUB-DOCKER1:8080/BCStubREST/Message