This page covers configuration and management of View node objects.

Object Overview

Node objects contain metadata related to ingestion, processing, and persistence nodes within your View deployment. Each node provides its functionality across a variety of tenants, and as such, a node itself is not assigned to a tenant.

Endpoint, URL, and Supported Methods

Objects are managed via the configuration server API at [http|https]://[hostname]:[port]/v1.0/nodes

Supported methods include: GET HEAD DELETE

Structure

Objects have the following structure:

{
    "GUID": "35c21e94-a7f4-4910-855a-d5231a8d7683",
    "Name": "View Lexi Data Catalog",
    "Hostname": "localhost",
    "InstanceType": "LexiServer",
    "LastStartUtc": "2024-10-19T20:06:41.000000Z",
    "CreatedUtc": "2024-07-10T05:11:50.000000Z"
}

Properties:

  • GUID GUID globally unique identifier for the object
  • Name string name for the object
  • Hostname string hostname
  • InstanceType enum the instance type of the node, see below
  • LastStartUtc datetime the timestamp from the last startup time of the node
  • CreatedUtc datetime timestamp from creation, in UTC time

The InstanceType property can be one of the following:

  • ConfigServer - configuration server
  • DataConnectorServer- data connector server (crawler)
  • ProcessorServer - Processing pipeline server
  • LexiServer - Lexi data catalog and search server
  • OrchestratorServer - data flow orchestration server
  • VectorServer - vector server
  • StorageServer - storage server

Enumerate

Refer to the Enumeration page in REST API for details about the use of enumeration APIs.

Enumerate objects by using GET /v2.0/nodes. The resultant object will appear as:

{
    "Success": true,
    "Timestamp": {
        "Start": "2024-10-21T02:36:37.677751Z",
        "TotalMs": 23.58,
        "Messages": {}
    },
    "MaxResults": 10,
    "IterationsRequired": 1,
    "EndOfResults": true,
    "RecordsRemaining": 16,
    "Objects": [
        {
            "GUID": "example-node",
            ... node details ...
        },
        { ... }
    ],
    "ContinuationToken": "[continuation-token]"
}
curl --location 'http://view.homedns.org:8000/v2.0/nodes?max-keys=5&token=00000000-0000-0000-0000-000000000000' \
--header 'x-token: *******' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "default", //tenant Id
  "default", //access token
  "http://localhost:8000/" //endpoint
);

api.accessToken = "<adminToken>" //This API requires Admin access

export const enumerateNode = async () => {
  try {
    const nodes = await api.enumerateNodes();
    console.log(nodes, "Nodes fetched successfully");
  } catch (err) {
    console.log("Error fetching Nodes:", err);
  }
};
enumerateNode();

Read

To read an object by GUID, call GET /v1.0/nodes/[node-guid]. If the object exists, it will be returned as a JSON object in the response body. If it does not exist, a 404 will be returned with a NotFound error response.

{
    "GUID": "35c21e94-a7f4-4910-855a-d5231a8d7683",
    "Name": "View Lexi Data Catalog",
    "Hostname": "localhost",
    "InstanceType": "LexiServer",
    "LastStartUtc": "2024-10-19T20:06:41.000000Z",
    "CreatedUtc": "2024-07-10T05:11:50.000000Z"
}
curl --location 'http://view.homedns.org:8000/v1.0/nodes/00000000-0000-0000-0000-000000000000' \
--header 'x-token: *******' \
--header 'Authorization: ••••••'
const { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "default", //tenant Id
  "default", //access token
  "http://localhost:8000/" //endpoint
);

api.accessToken = "<adminToken>" //This API requires Admin access

const getNode = async () => {
  try {
    const nodes = await api.retrieveNode("<nodeId>");
    console.log(nodes, "Nodes fetched successfully");
  } catch (err) {
    console.log("Error fetching Nodes:", err);
  }
};
getNode();

Note: the HEAD method can be used as an alternative to get to simply check the existence of the object. HEAD requests return either a 200/OK in the event the object exists, or a 404/Not Found if not. No response body is returned with a HEAD request.

Read all

To read all object, call GET /v1.0/nodes/. If the object exists, it will be returned as a array JSON object in the response body. If it does not exist, a 404 will be returned with a NotFound error response.

curl --location 'http://view.homedns.org:8000/v1.0/nodes/' \
--header 'x-token: *******' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "default", //tenant Id
  "default", //access token
  "http://localhost:8000/" //endpoint
);

api.accessToken = "<adminToken>" //This API requires Admin access

const getNodes = async () => {
  try {
    const nodes = await api.retrieveNodes();
    console.log(nodes, "Nodes fetched successfully");
  } catch (err) {
    console.log("Error fetching Nodes:", err);
  }
};
getNodes();

Delete

To delete an object by GUID, call DELETE /v1.0/nodes/[node-guid]. Note that deletion of a node does not terminate or otherwise shut the node itself down.

import { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "default", //tenant Id
  "default", //access token
  "http://localhost:8000/" //endpoint
);

api.accessToken = "<adminToken>" //This API requires Admin access

const deleteNode = async () => {
  try {
    await api.deleteNode("<nodeId>");
    console.log("Node deleted successfully");
  } catch (err) {
    console.log("Error deleting Node:", err);
  }
};
deleteNode();
curl --location --request DELETE 'http://view.homedns.org:8000/v1.0/nodes/00000000-0000-0000-0000-000000000000' \
--header 'x-token: *******' \
--header 'Authorization: ••••••'

Check Existence

To check existence of an object by GUID, call HEAD /v1.0/nodes/[node-guid].

import { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "default", //tenant Id
  "default", //access token
  "http://localhost:8000/" //endpoint
);

api.accessToken = "<adminToken>" //This API requires Admin access

export const nodeExists = async () => {
  try {
    const node = await api.existsNode("33079aff-6421-4987-a80e-26c621f2aa24");
    console.log(node, "Node exists"); //true
  } catch (err) {
    console.log("Error fetching Node:", err);
  }
};

curl --location --head 'http://view.homedns.org:8000/v1.0/nodes/00000000-0000-0000-0000-000000000000' \
--header 'Authorization: ••••••'