Initializing help system before first use

xpressinsight.AppInterface.get_insight_context

Purpose
Retrieves information about the context in which the app is currently executing (e.g. information about the Insight server and the DMP solution), including an authorization token if the app is executing in DMP.
Synopsis
xpressinsight.AppInterface.get_insight_context(self, environment: Optional[str] = None) -> InsightContext
Argument
environment 
The DMP lifecycle environment for which to request an authorization token (e.g. "design"). If not specified, a token for the component's current environment is returned instead. Where the DMP solution has been configured with lifecycle isolation, only a token for the current or a lower lifecycle can be requested. Will be ignored when the app is not running in DMP.
Return value
The Insight execution context object.
Example
Demonstration of getting the DMP Manager URL from the context
>>> context = insight.get_insight_context()
>>> if context.dmp:
>>>   print("DMP Manager URL: " + context.dmp.manager_url)
>>> else:
>>>   print("Not executing in DMP")			
Further information
1. The method get_insight_context is part of the class xpressinsight.AppInterface.
2. Raises InterfaceError if passed an unrecognized or unavailable environment.
3. Used to retrieve information the app can use to reach outside itself - for example, to query the Insight server via its REST API, or to communicate with other DMP services in the same solution.
4. When test mode has been activated, this function will return an object previously specified by the insight.set_insight_context method, or a default context object if none was specified.
Related topics

© 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.