App
Example
// to fetch the current App var entity = insight .getView() .getApp();
Method summary
name | description |
---|---|
createAttachment | Create a new app attachment. |
createFolder | Create a new folder as a child of parent. |
createScenario | Create a new scenario inside the current app. |
getAttachmentTagNames | Get the list of attachment tag names defined by the app. |
getAttachmentTags | Get the list of attachment tags defined by the app. |
getExecutionModes | Returns the app's execution modes, indexed by name |
getExecutionResourceGroups | Returns the app's execution resource groups, indexed by name |
getId | The app's id. |
getModelSchema | The schema of the model used by this app. |
getName | The name of this app. |
getUsers | Get a list of users associated with the app. |
getVisualization | Obtains the AppVisualization containing the Visualization status and configuration for the app. This will return a Promise that will resolve when the AppVisualization status is ONLINE or if visualization is DISABLED for the app. |
Methods
- createAttachment ( options ) → {Promise}
-
Create a new app attachment.
Parameters:
Name Type Argument Description options NewAttachmentOptions optional Returns:Type Description Promise Resolves when user closes the editor or if attachment create fails Example
Back to Topapp.createAttachment({filename: 'my_file.xml', tag: 'atag'}) .then(function(data) { console.log(data.attachment); });
- createFolder ( parent, name ) → {Promise.<Object>}
-
Parameters:
Name Type Argument Description parent Folder optional the parent node to create the folder on name string the name of the folder to create Returns:Type Description Promise.<Object> Example
Back to Top// creates a new folder on a specified parent app.createFolder(parentObj, 'my new folder'); // creates a new folder on the current app app.createFolder('my new folder');
- createScenario ( parent, name, type ) → {Promise.<Object>}
-
Parameters:
Name Type Argument Description parent Folder | App optional the parent node to create the scenario on name string the name of the scenario to create type string optional the type of scenario to create Returns:Type Description Promise.<Object> Example
Back to Topapp.createScenario(parentObj, 'my new scenario', null);
- getAttachmentTagNames ( ) → {Promise.<Array.<string>>}
-
Get the list of attachment tag names defined by the app.
Returns:Type Description Promise.<Array.<string>> Promise containing an array of strings or an empty array if no attachment tag names found. Example
Back to Topvar attachmentTagNames = app.getAttachmentTagNames();
- getAttachmentTags ( ) → {Promise.<Array.<AttachmentTag>>}
-
Get the list of attachment tags defined by the app.
Returns:Type Description Promise.<Array.<AttachmentTag>> Promise containing an array of AttachmentTag objects or an empty array if no attachment tags found. Example
Back to Topvar attachmentTags = app.getAttachmentTags();
- getExecutionModes ( ) → {Object.<string, ExecutionMode>}
-
Returns the app's execution modes, indexed by name
Returns:Type Description Object.<string, ExecutionMode> - getExecutionResourceGroups ( ) → {Object.<string, ExecutionResourceGroup>}
-
Returns the app's execution resource groups, indexed by name
Returns:Type Description Object.<string, ExecutionResourceGroup> - getId ( ) → {string}
-
The app's id.
Returns:Type Description string The app's Id Example
Back to Topvar id = app.getId();
- getModelSchema ( ) → {ModelSchema}
-
The schema of the model used by this app.
Returns:Type Description ModelSchema The schema of the model used by this app Example
Back to Topvar modelSchema = app.getModelSchema();
- getName ( ) → {string}
-
The name of this app.
Returns:Type Description string The name of this app Example
Back to Topvar name = app.getName();
- getUsers ( options ) → {Promise.<Array.<User>>}
-
Get a list of users associated with the app. Optionally filter the result by a custom authority.
Parameters:
Name Type Argument Description options object optional fetch parameters Properties
Name Type Argument Description authorityFilter string optional custom authority to filter user list by Returns:Type Description Promise.<Array.<User>> Promise containing an array of User objects or an empty array if no items found. The User objects will only contain custom authorities and not authority groups. Example
Back to Topapp.getUsers().then(function (appUsers) { appUsers.forEach(function (user) { // app user }); });
- getVisualization ( onUpdate ) → {Promise.<AppVisualization>}
-
Obtains the AppVisualization containing the Visualization status and configuration for the app. This will return a Promise that will resolve when the AppVisualization status is ONLINE or if visualization is DISABLED for the app.
Parameters:
Name Type Argument Description onUpdate function optional A function that will be called with the AppVisualization every time it is polled. This provides the status and configuration as it transitions to ONLINE prior to Promise resolution. Returns:Type Description Promise.<AppVisualization> Promise that will resolve with the AppVisualization once ONLINE, or if DISABLED for the app Example
Back to Topapp.getVisualization() .then((appVisualization) => console.log(appVisualization.configuration)); function handleCurrentStatus(appVisualization) { console.log(`Current status is ${appVisualization.status}, statusMessage: ${statusMessage}`); } app.getVisualization(handleCurrentStatus) .then((appVisualization) => console.log(appVisualization.configuration));
© 2001-2024 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.