Plugin API
Overview
Frontend Add-ons run in a sandboxed iframe, and all external interactions with the Seeq application must be done via the Plugin API. This API serves as the gateway for communication between your Add-on and Seeq's core functionality. Below, we'll provide detailed explanations of key functions within the Plugin API, as they are essential for creating powerful and interactive Add-ons.
Function | Description | Inputs | Outputs |
---|---|---|---|
| Gets information about the plugin. | None | PluginInfo |
| Gets the value of an optional query parameter from the URL of a HomeScreen plugin. | None | string or undefined |
| Checks if the workbench is in presentation mode. | None | boolean |
| Checks if the workbench is in headless render mode. | None | boolean |
| Gets the active workbook. | None | { id: string; name: string; description: string; } |
| Gets the active worksheet. | None | { id: string; name: string; } |
| Subscribes to receive the current workstep ID when it changes. | cb: WorkstepCallback | RemoveListener |
| Subscribes to receive the current user language when it changes. | cb: StringCallback | RemoveListener |
| Subscribes to receive the worksheet timezone when it changes. | cb: TimezoneCallback | RemoveListener |
| Subscribes to receive display range updates. | cb: DateRangeCallback | RemoveListener |
| Subscribes to receive investigation range updates. | cb: DateRangeCallback | RemoveListener |
| Subscribes to signals. | cb: TrendSignalArrayCallback | RemoveListener |
| Subscribes to scalars. | cb: TrendScalarArrayCallback | RemoveListener |
| Subscribes to conditions. | cb: TrendConditionArrayCallback | RemoveListener |
| Subscribes to metrics. | cb: TrendMetricArrayCallback | RemoveListener |
| Subscribes to tables. | cb: TrendTableArrayCallback | RemoveListener |
| Updates the display range start and end times. | start: number, end: number | void |
| Updates the investigate range start and end times. | start: number, end: number | void |
| Selects an item in the details pane or a capsule in the capsules pane. | id: string, selected: boolean | void |
| Logs a message that will be saved to the client.log. | severity: LogSeverity, message: string | void |
| Sets the plugin state. | pluginState: PluginState | void |
| Subscribes to plugin state updates. | cb: PluginStateCallback | RemoveListener |
| Runs a Seeq Formula. | { start: string; end: string; formula: string; _function: string; parameters: Object; fragments: Object; offset: number; limit: number; cancellationGroup: string; } | Promise<PluginResponse<FormulaRunOutput>> |
| Fetches a metric. | id: string | Promise<PluginResponse<ThresholdMetricOutputV1>> |
| Opens a user-provided Seeq URL in a new window. | url: string, windowFeatures: string | void |
| Downloads a provided file object. | file: File | void |
| Sets a value in the browser local storage for the given key. | key: string, value: string | void |
| Gets the value from the browser local storage for the given key. | key: string | `Promise<string |
| Subscribes to selected capsules in the capsules pane. | cb: TrendCapsuleArrayCallback | RemoveListener |
| Subscribes to capsules in the capsules pane. | cb: TrendCapsuleArrayCallback | RemoveListener |
| Sets the data status of an item in the details pane to loading. | id: string | void |
| Sets the data status of an item in the details pane to success. | results: DataStatusResults | void |
| Must be called by the plugin when it has completed its initial render of plugin content. | None | void |
| Sets the x value and y values corresponding to where the mouse pointer is on the chart. | xValue: number, yValues: YValue[] | void |
| Clears the pointer x and y values from the details pane. | None | void |
| Sets the Axis Min and Axis Max values of an item in the details pane. | id: string, axisMin: number, axisMax: number | void |
| Sets the Auto property of an item in the details pane. | id: string, autoScale: boolean | void |
| Handles non-success responses when fetching data for an item. | id: string, cancellationGroup: string, error: SeeqError | void |
| Opens the formula tool for editing with the supplied formula and parameters. | formula: string, parameters: FormulaParameter[] | void |
| Closes the active investigate tool. | None | void |
| Shows details pane customization columns. | keys: DetailsPaneColumnKey[] | void |
| Returns the details for the licensed feature that matches the specified name. | name: string | Promise<LicensedFeatureStatusOutputV1> |
| Calls a Seeq SDK API endpoint. (Experimental) | { path: string; method?: string; query?: Record<string, unknown>; body?: Record<string, unknown>; headers?: Record<string, unknown>; } | Promise<T> |
| Calls a Seeq Data Lab API endpoint. | { projectId: string; notebookName: string; path: string; method?: string; query?: Record<string, unknown>; body?: Record<string, unknown>; headers?: Record<string, unknown>; } | Promise<T> |
| Returns the ID of the single Data Lab Project that matches the supplied name. | projectName: string | Promise<{ projectId: string }> |
| If true, then the plugin is being rendered as part of capturing content for the Organizer. | None |
|
| Provides data to Organizer to be able to render the plugin. The last call to this will be the data that is used. |
|
|
| If true, then the plugin is being rendered in Organizer and should load it's data from Organizer by calling | None |
|
| Loads the plugin data from Organizer. This will be the exact data was provided by the plugin via | None |
|