Concepts
The JavaScript API relies on several high-level Xpress Insight concepts.
- View: Represents a single instance of the custom view, the context information passed to the view by the client framework when the view was opened, and the current state of the view.
- App: Represents the app parent of the scenarios and other objects being visualized by the view.
- Scenario: Represents a single scenario in the app. Each scenario has its own copies of the model entities and properties such as: name, id, notes, ownership and sharing information.
- Scenario summary data: Information about the completed solution for a scenario. This includes: execution time, the objective, number of solutions and the model status.
- Model Schema: Represents the schema of the scenario data for this app - the list of data entities including name and data type information.
- Model entities: The individual variables within the model. They can be input, result or parameter entities.

JavaScript API Concepts
The Selection
Any view opened by the user has a selection of one or more scenarios associated with it that appear - when selected - on the grey, menu-like shelf.
The scenario items in a selection are what you specify when you are using the View#withScenarios method, where the values passed in are the selection indices starting from 0.
You can also query the number of scenarios selected using View#getScenarioCount.