nixt-sdk v1.3.2
NiXT SDK
A javascript sdk for NiXT data platform. This can be used in node.
Table of Contents
Documentation
Install
- Requires node.js >= 12.x
Install nixt-sdk with:
npm install nixt-sdk
Setup Client
Next, require the module and instantiate a nixt client by calling Nixt.init(client_id, secret_key)
setup the client with basic auth credentials client_id
and secret_key
.
import Nixt from "nixt-sdk";
Nixt.init(client_id, secret_key)
In the case you need to connect to nixt test environment you can call testbed(boolean)
:
Nixt.testbed(process?.env?.TARGET?.toUpperCase() !== "PRODUCTION")
You can connect to NiXT with private connection via GCP VCP Peering* you can call privateLink(boolean)
Note: Required setup VCP Peering
Nixt.privateLink(true | false)
You can set Level of debug log by calling Nixt.debug(debug_level)
Nixt.debug(NixtDebug.ALL)
Debug Level | Description |
---|---|
NixtDebug.NONE | No log (default) |
NixtDebug.HTTP | Only http log |
NixtDebug.ERROR | Only error log |
NixtDebug.ALL | All logs |
Methods
The following service methods are available to instantiated clients. The examples assume you have already initial a nixt client with valid credentials.
latest
Nixt.latest( deviceIds, params )
Request:
Parameter | Description | Sample value |
---|---|---|
deviceIds | Array of deviceIds | "deviceId" |
params | Array of tag | "ENETO","PACTO" |
Response: Parameter | Description | Sample value :---------------- | :---------------- | :-------------- deviceIds | Array of deviceIds | "deviceId" params | Array of tag | "ENETO","PACTO"
7 days ago
7 days ago
7 days ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
5 months ago
5 months ago
6 months ago
6 months ago
11 months ago
9 months ago
11 months ago
11 months ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago