Hello everyone!
I am building the front-end for an add-on within the Seeq Data Lab environment. I am trying to call the api endpoint declared in the Jupyter Notebook tab: '# GET /loops' via JavaScript using key functions within the Plugin API of Seeq Data Lab.
In the following code snippet:
api.getDataLabProject(projectName)
.then((projectResponse) => {
if (!projectResponse) {
throw new Error(`No response received when fetching project: ${projectName}`);
}
const projectId = projectResponse.projectId;
if (!projectId) {
throw new Error(`Project with name "${projectName}" not found.`);
}
// Step 2: Call the Data Lab API using the retrieved project ID
return api.callDataLabApi({
projectId: projectId,
notebookName: notebookName,
path: apiPath,
method: 'GET', // or 'POST', 'PUT', 'DELETE', etc.
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
}
});
})
I'm having an error about api in api.getDataLabProject, in browser's developer console, console it shows: ReferenceError: api is not defined
From the info I could find this is a part of Plugin API lib of Seeq and if I am in Seeq Data Lab environment by default it is a known library. Is info I got right or 'api' is just a custom object? Can someone help me with this issue?
Thanks!