Brain¶
Overview¶
Knowledge graph visualization endpoints
Available Operations¶
- performVisualization - Perform Action API – Visualization
performVisualization¶
Trigger unified graph rendering. Supports legacy connection_id and preferred connection_ids. If no connections are provided, returns the base Neo4j schema. Discovers external relationships between connections when enabled.
Example Usage¶
import { Fermisdk } from "fermisdk";
const fermisdk = new Fermisdk({
bearerAuth: process.env["FERMISDK_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await fermisdk.brain.performVisualization({
action: "visualization",
});
console.log(result);
}
run();
Standalone function¶
The standalone function version of this method:
import { FermisdkCore } from "fermisdk/core.js";
import { brainPerformVisualization } from "fermisdk/funcs/brainPerformVisualization.js";
// Use `FermisdkCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const fermisdk = new FermisdkCore({
bearerAuth: process.env["FERMISDK_BEARER_AUTH"] ?? "",
});
async function run() {
const res = await brainPerformVisualization(fermisdk, {
action: "visualization",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("brainPerformVisualization failed:", res.error);
}
}
run();
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.VisualizationRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response¶
Promise\<operations.PerformVisualizationResponse>
Errors¶
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorT | 400, 404 | application/json |
| errors.ErrorT | 500 | application/json |
| errors.FermisdkDefaultError | 4XX, 5XX | */* |