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 |
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. |
Methods
- createAttachment ( options ) → {Promise}
-
Create a new app attachment.
Parameters:
paramsName Type Argument Description options typeNewAttachmentOptionsoptional detailsReturns:returns tableType Description typePromiseResolves when user closes the editor or if attachment create fails Example
examples
Back to Topapp.createAttachment({filename: 'my_file.xml', tag: 'atag'}) .then(function(data) { console.log(data.attachment); });
- createFolder ( parent, name ) → {Promise.<Object>}
-
Parameters:
paramsName Type Argument Description parent typeFolderoptional the parent node to create the folder on name typestringthe name of the folder to create detailsReturns:returns tableType Description typePromise.<Object>Example
examples
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:
paramsName Type Argument Description parent typeFolder | Appoptional the parent node to create the scenario on name typestringthe name of the scenario to create type typestringoptional the type of scenario to create detailsReturns:returns tableType Description typePromise.<Object>Example
examples
Back to Topapp.createScenario(parentObj, 'my new scenario', null);
- getAttachmentTagNames ( ) → {Promise.<Array.<string>>}
-
Get the list of attachment tag names defined by the app.
detailsReturns:returns tableType Description typePromise.<Array.<string>>Promise containing an array of strings or an empty array if no attachment tag names found. Example
examples
Back to Topvar attachmentTagNames = app.getAttachmentTagNames();
- getAttachmentTags ( ) → {Promise.<Array.<AttachmentTag>>}
-
Get the list of attachment tags defined by the app.
detailsReturns:returns tableType Description typePromise.<Array.<AttachmentTag>>Promise containing an array of AttachmentTag objects or an empty array if no attachment tags found. Example
examples
Back to Topvar attachmentTags = app.getAttachmentTags();
- getExecutionModes ( ) → {Object.<string, ExecutionMode>}
-
Returns the app's execution modes, indexed by name
detailsReturns:returns tableType Description typeObject.<string, ExecutionMode> - getId ( ) → {string}
-
The app's id.
detailsReturns:returns tableType Description typestringThe app's Id Example
examples
Back to Topvar id = app.getId();
- getModelSchema ( ) → {ModelSchema}
-
The schema of the model used by this app.
detailsReturns:returns tableType Description typeModelSchemaThe schema of the model used by this app Example
examples
Back to Topvar modelSchema = app.getModelSchema();
- getName ( ) → {string}
-
The name of this app.
detailsReturns:returns tableType Description typestringThe name of this app Example
examples
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:
paramsName Type Argument Description options typeobjectoptional fetch parameters and asynchronous callbacks Properties
paramsName Type Argument Description authorityFilter typestringoptional custom authority to filter user list by detailsReturns:returns tableType Description typePromise.<Array.<User>>Promise containing an array of User objects or an empty array if no items found. The array elements will be ordered alphanumerically by username. The User objects will only contain custom authorities. Also the User object will not contain any authority groups. Example
examples
Back to Topvar usersList = app.getUsers();
© 2001-2020 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.