The purpose of the JavaScript API is to allow Spotfire pages to be embedded in other web applications. Using this API, web applications can control Spotfire visualizations, filters, and markings. Web applications can also easily respond to events generated in Spotfire—for example, a web application could be configured to perform an action on some data that a user marks within a Spotfire visualization.
Do not confuse the JavaScript API with the use of JavaScript in text areas in Spotfire. The JavaScript API is for embedding Spotfire analytics in other web applications; JavaScript in text areas is used for augmenting the Spotfire user interface.
Many of TIBCO's customers embed Spotfire in their externally facing web pages to present analytics and analytics applications to their own customers. In fact, it's possible to remove all Spotfire branding...