Home

Visual Investigator API

The SAS Visual Investigator API provides a set of components and service methods that enable developers to create customised solutions within the application.

API

The API is available through the JavaScript window object.

window.sas.vi.metadata.getEntity("person");

Typings

To complement the API, solution developers can download the API typings package. Run the below command in your project.

npm install @sas/vi-api

The types can be used to help with autocompletion of API spaces, methods and expected return types.

import { SviWindow } from "@sas/vi-api";
import { StoredObjectDTO } from "@sas/vi-api/svi-datahub";

const sviWindow = window as SviWindow;
sviWindow.sas.vi.metadata.getEntity("person").then((entity: StoredObjectDTO | undefined) => {
    if (entity) {
        console.log("Retrieved entity:", entity.label);
    }
});