Loading...
Notecard Disconnected
Having trouble connecting?

Try changing your USB cable as some cables do not support transferring data. If that does not solve your problem, contact us at support@blues.com and we will get you set up with another tool to communicate with the Notecard.

Advanced Usage

The help command gives more info.

Connect a Notecard
Use USB to connect and start issuing requests from the browser.
Try Notecard Simulator
Experiment with the Notecard's API on a Simulator assigned to your free Notehub account.

Don't have an account? Sign up

Introducing Notecard for Skylo - Cellular, WiFi, and Satellite in One Board

Blues Developers
What’s New
Resources
Blog
Technical articles for developers
Connected Product Guidebook
In-depth guides for connected product development
Developer Certification
Get certified on wireless connectivity with Blues
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Button IconHelp
Support DocsNotehub StatusVisit our Forum
Button IconSign In
Docs Home
What’s New
Resources
Blog
Technical articles for developers
Connected Product Guidebook
In-depth guides for connected product development
Developer Certification
Get certified on wireless connectivity with Blues
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Tools & SDKs
Notecard CLI
Firmware Libraries
Arduino Library
C and C++ Library
ESP-IDF Library
Go Library
Python Library
Zephyr Library
Notehub SDKs
Notehub JS Library
InstallationUsageAPI Reference
Notehub Py Library
Generative AI Tools
MCP Servers
homechevron_rightDocschevron_rightTools & SDKschevron_rightNotehub Sdkschevron_rightNotehub JS Library Installation and Usage

Notehub JS Library Overview

The Notehub JS library is an npm package built for JavaScript applications. It provides a quick, JavaScript-friendly way to connect to the Notehub API, and perform Notehub API requests with a clean, intuitive interface.

Installation

You can install the Notehub JS library in any JavaScript application using the steps below.

Start by installing the @blues-inc/notehub-js package in your project using your package manager of choice. The example below uses npm:

$
npm install @blues-inc/notehub-js

Once the package is installed, you can import the library using either import or require:

Using import:

import * as NotehubJs from "@blues-inc/notehub-js";
note

Using import in a TypeScript project will currently cause an error because type definitions are not yet included. To resolve this, create a .d.ts file in your project (for example, types/notehub-js.d.ts) with the following declaration:

declare module "@blues-inc/notehub-js";

Using require:

const NotehubJs = require("@blues-inc/notehub-js");

Usage

Authentication

The Notehub JS library authenticates using a Personal Access Token (PAT). Set your token once on the shared ApiClient instance before making any API calls:

import * as NotehubJs from "@blues-inc/notehub-js";

const defaultClient = NotehubJs.ApiClient.instance;
const auth = defaultClient.authentications["personalAccessToken"];
auth.accessToken = "YOUR_ACCESS_TOKEN";

Finding Your Project UID

Most API methods require a ProjectUID — a unique identifier for your Notehub project in the format app:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. You can find it on your project's Settings page in Notehub.

Example: Fetching Events

Here's a complete example that retrieves the most recent events from a project:

import * as NotehubJs from "@blues-inc/notehub-js";

const defaultClient = NotehubJs.ApiClient.instance;
const auth = defaultClient.authentications["personalAccessToken"];
auth.accessToken = "YOUR_ACCESS_TOKEN";

const projectUID = "app:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
const eventApi = new NotehubJs.EventApi();

eventApi.getEvents(projectUID, { pageSize: 10 }).then(
  (data) => console.log(data),
  (error) => console.error(error)
);

// If you're using TypeScript you may need to add types to avoid
// compilation errors
// eventApi.getEvents(projectUID, { pageSize: 10 }).then(
//   (data: unknown) => console.log(data),
//   (error: unknown) => console.error(error)
// );

The library also supports async/await:

try {
  const data = await eventApi.getEvents(projectUID, { pageSize: 10 });
  console.log(data);
} catch (error) {
  console.error(error);
}

Usage Limits

The Notehub API has usage limits. Exceeding the request threshold may result in 429 responses. See Notehub API Usage Limits for details.

API Reference

APIDescription
Billing Account APIRetrieve billing accounts accessible by your token
Device APIManage devices, environment variables, and Notefiles
Event APIQuery project and fleet events, with cursor and filter support
Jobs APIManage and run Notehub batch jobs
Monitor APICreate and manage monitors that trigger alerts on event data
Project APIManage projects, fleets, firmware, environment variables, and more
Route APICreate and manage routes for forwarding event data
Usage APIQuery data, event, route log, and session usage by time range

Billing Account API

All URIs are relative to https://api.notefile.net

MethodHTTP requestDescription
getBillingAccountGET /v1/billing-accounts/{billingAccountUID}
getBillingAccountBalanceHistoryGET /v1/billing-accounts/{billingAccountUID}/balance-history
getBillingAccountsGET /v1/billing-accounts

getBillingAccount

GetBillingAccount200Response getBillingAccount(billingAccountUID)

Get Billing Account Information

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.BillingAccountApi();
let billingAccountUID = "00000000-0000-0000-000000000001"; // String |
apiInstance.getBillingAccount(billingAccountUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
billingAccountUIDString
Return type

GetBillingAccount200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getBillingAccountBalanceHistory

GetBillingAccountBalanceHistory200Response getBillingAccountBalanceHistory(billingAccountUID, opts)

Get Billing Account Balance history, only enterprise supported

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.BillingAccountApi();
let billingAccountUID = "00000000-0000-0000-000000000001"; // String |
let opts = {
  startDate: 1628631763, // Number | Start date for filtering results, specified as a Unix timestamp
  endDate: 1657894210, // Number | End date for filtering results, specified as a Unix timestamp
};
apiInstance.getBillingAccountBalanceHistory(billingAccountUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
billingAccountUIDString
startDateNumberStart date for filtering results, specified as a Unix timestamp[optional]
endDateNumberEnd date for filtering results, specified as a Unix timestamp[optional]
Return type

GetBillingAccountBalanceHistory200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getBillingAccounts

GetBillingAccounts200Response getBillingAccounts()

Get Billing Accounts accessible by the api_key

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.BillingAccountApi();
apiInstance.getBillingAccounts().then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters

This endpoint does not need any parameter.

Return type

GetBillingAccounts200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

Device API

All URIs are relative to https://api.notefile.net

MethodHTTP requestDescription
addDbNotePOST /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
addQiNotePOST /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}
createNotefilePOST /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notefiles/{notefileID}
deleteDeviceDELETE /v1/projects/{projectOrProductUID}/devices/{deviceUID}
deleteDeviceEnvironmentVariableDELETE /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables/{key}
deleteNoteDELETE /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
deleteNotefilesDELETE /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files
disableDevicePOST /v1/projects/{projectOrProductUID}/devices/{deviceUID}/disable
enableDevicePOST /v1/projects/{projectOrProductUID}/devices/{deviceUID}/enable
getDbNoteGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
getDeviceGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}
getDeviceEnvironmentHierarchyGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_hierarchyGet environment variable hierarchy for a device
getDeviceEnvironmentVariablesGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables
getDeviceEnvironmentVariablesByPinGET /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin
getDeviceHealthLogGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/health-log
getDeviceLatestEventsGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/latest
getDevicePlansGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/plans
getDevicePublicKeyGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/public-key
getDevicePublicKeysGET /v1/projects/{projectOrProductUID}/devices/public-keys
getDeviceSessionsGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/sessions
getDevicesGET /v1/projects/{projectOrProductUID}/devices
getFleetDevicesGET /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/devices
getNotefileGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}
listNotefilesGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/files
provisionDevicePOST /v1/projects/{projectOrProductUID}/devices/{deviceUID}/provision
setDeviceEnvironmentVariablesPUT /v1/projects/{projectOrProductUID}/devices/{deviceUID}/environment_variables
setDeviceEnvironmentVariablesByPinPUT /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin
signalDevicePOST /v1/projects/{projectOrProductUID}/devices/{deviceUID}/signal
updateDbNotePUT /v1/projects/{projectOrProductUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}

addDbNote

addDbNote(projectOrProductUID, deviceUID, notefileID, noteID, noteInput)

Add a Note to a .db notefile. if noteID is '-' then payload is ignored and empty notefile is created

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let notefileID = "notefileID_example"; // String |
let noteID = "noteID_example"; // String |
let noteInput = new NotehubJs.NoteInput(); // NoteInput | Body or payload of note to be added to the device
apiInstance
  .addDbNote(projectOrProductUID, deviceUID, notefileID, noteID, noteInput)
  .then(
    () => {
      console.log("API called successfully.");
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
notefileIDString
noteIDString
noteInputNoteInputBody or payload of note to be added to the device
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

addQiNote

addQiNote(projectOrProductUID, deviceUID, notefileID, noteInput)

Adds a Note to a Notefile, creating the Notefile if it doesn't yet exist.

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let notefileID = "notefileID_example"; // String |
let noteInput = new NotehubJs.NoteInput(); // NoteInput | Body or payload of note to be added to the device
apiInstance
  .addQiNote(projectOrProductUID, deviceUID, notefileID, noteInput)
  .then(
    () => {
      console.log("API called successfully.");
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
notefileIDString
noteInputNoteInputBody or payload of note to be added to the device
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

createNotefile

createNotefile(projectOrProductUID, deviceUID, notefileID)

Creates an empty Notefile on the device.

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let notefileID = "notefileID_example"; // String |
apiInstance.createNotefile(projectOrProductUID, deviceUID, notefileID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
notefileIDString
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

deleteDevice

deleteDevice(projectOrProductUID, deviceUID)

Delete Device

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
apiInstance.deleteDevice(projectOrProductUID, deviceUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

deleteDeviceEnvironmentVariable

EnvironmentVariables deleteDeviceEnvironmentVariable(projectOrProductUID, deviceUID, key)

Delete environment variable of a device

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let key = "key_example"; // String | The environment variable key to delete.
apiInstance
  .deleteDeviceEnvironmentVariable(projectOrProductUID, deviceUID, key)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
keyStringThe environment variable key to delete.
Return type

EnvironmentVariables

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

deleteNote

deleteNote(projectOrProductUID, deviceUID, notefileID, noteID)

Delete a note from a .db or .qi notefile

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let notefileID = "notefileID_example"; // String |
let noteID = "noteID_example"; // String |
apiInstance.deleteNote(projectOrProductUID, deviceUID, notefileID, noteID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
notefileIDString
noteIDString
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

deleteNotefiles

deleteNotefiles(projectOrProductUID, deviceUID, deleteNotefilesRequest)

Deletes Notefiles and the Notes they contain.

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let deleteNotefilesRequest = new NotehubJs.DeleteNotefilesRequest(); // DeleteNotefilesRequest |
apiInstance
  .deleteNotefiles(projectOrProductUID, deviceUID, deleteNotefilesRequest)
  .then(
    () => {
      console.log("API called successfully.");
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
deleteNotefilesRequestDeleteNotefilesRequest
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

disableDevice

disableDevice(projectOrProductUID, deviceUID)

Disable Device

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
apiInstance.disableDevice(projectOrProductUID, deviceUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

enableDevice

enableDevice(projectOrProductUID, deviceUID)

Enable Device

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
apiInstance.enableDevice(projectOrProductUID, deviceUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDbNote

GetDbNote200Response getDbNote(projectOrProductUID, deviceUID, notefileID, noteID, opts)

Get a note from a .db or .qi notefile

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let notefileID = "notefileID_example"; // String |
let noteID = "noteID_example"; // String |
let opts = {
  _delete: true, // Boolean | Whether to delete the note from the DB notefile
  deleted: true, // Boolean | Whether to return deleted notes
};
apiInstance
  .getDbNote(projectOrProductUID, deviceUID, notefileID, noteID, opts)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
notefileIDString
noteIDString
_deleteBooleanWhether to delete the note from the DB notefile[optional]
deletedBooleanWhether to return deleted notes[optional]
Return type

GetDbNote200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDevice

Device getDevice(projectOrProductUID, deviceUID)

Get Device

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
apiInstance.getDevice(projectOrProductUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
Return type

Device

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDeviceEnvironmentHierarchy

EnvTreeJsonNode getDeviceEnvironmentHierarchy(projectOrProductUID, deviceUID)

Get environment variable hierarchy for a device

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
apiInstance.getDeviceEnvironmentHierarchy(projectOrProductUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
Return type

EnvTreeJsonNode

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDeviceEnvironmentVariables

GetDeviceEnvironmentVariablesByPin200Response getDeviceEnvironmentVariables(projectOrProductUID, deviceUID)

Get environment variables of a device

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
apiInstance.getDeviceEnvironmentVariables(projectOrProductUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
Return type

GetDeviceEnvironmentVariablesByPin200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDeviceEnvironmentVariablesByPin

GetDeviceEnvironmentVariablesByPin200Response getDeviceEnvironmentVariablesByPin(productUID, deviceUID, xAuthToken)

Get environment variables of a device with device pin authorization

Example
import * as NotehubJs from "@blues-inc/notehub-js";

let apiInstance = new NotehubJs.DeviceApi();
let productUID = "com.blues.bridge:sensors"; // String |
let deviceUID = "dev:000000000000000"; // String |
let xAuthToken = "xAuthToken_example"; // String | For accessing endpoints by Device pin.
apiInstance
  .getDeviceEnvironmentVariablesByPin(productUID, deviceUID, xAuthToken)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
productUIDString
deviceUIDString
xAuthTokenStringFor accessing endpoints by Device pin.
Return type

GetDeviceEnvironmentVariablesByPin200Response

Authorization

No authorization required

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDeviceHealthLog

GetDeviceHealthLog200Response getDeviceHealthLog(projectOrProductUID, deviceUID, opts)

Get Device Health Log

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let opts = {
  startDate: 1628631763, // Number | Start date for filtering results, specified as a Unix timestamp
  endDate: 1657894210, // Number | End date for filtering results, specified as a Unix timestamp
  logType: ["null"], // [String] | Return only specified log types
};
apiInstance.getDeviceHealthLog(projectOrProductUID, deviceUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
startDateNumberStart date for filtering results, specified as a Unix timestamp[optional]
endDateNumberEnd date for filtering results, specified as a Unix timestamp[optional]
logType[String]Return only specified log types[optional]
Return type

GetDeviceHealthLog200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDeviceLatestEvents

GetDeviceLatestEvents200Response getDeviceLatestEvents(projectOrProductUID, deviceUID)

Get Device Latest Events

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
apiInstance.getDeviceLatestEvents(projectOrProductUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
Return type

GetDeviceLatestEvents200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDevicePlans

GetDevicePlans200Response getDevicePlans(projectOrProductUID, deviceUID)

Get Data Plans associated with the device, this include the primary sim, any external sim, as well as any satellite connections.

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
apiInstance.getDevicePlans(projectOrProductUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
Return type

GetDevicePlans200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDevicePublicKey

GetDevicePublicKey200Response getDevicePublicKey(projectOrProductUID, deviceUID)

Get Device Public Key

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
apiInstance.getDevicePublicKey(projectOrProductUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
Return type

GetDevicePublicKey200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDevicePublicKeys

GetDevicePublicKeys200Response getDevicePublicKeys(projectOrProductUID, opts)

Get Device Public Keys of a Project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
};
apiInstance.getDevicePublicKeys(projectOrProductUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
pageSizeNumber[optional] [default to 50]
pageNumNumber[optional] [default to 1]
Return type

GetDevicePublicKeys200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDeviceSessions

GetDeviceSessions200Response getDeviceSessions(projectOrProductUID, deviceUID, opts)

Get Device Sessions

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  startDate: 1628631763, // Number | Start date for filtering results, specified as a Unix timestamp
  endDate: 1657894210, // Number | End date for filtering results, specified as a Unix timestamp
  firstSync: false, // Boolean | When true, filters results to only show first sync sessions
};
apiInstance.getDeviceSessions(projectOrProductUID, deviceUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
pageSizeNumber[optional] [default to 50]
pageNumNumber[optional] [default to 1]
startDateNumberStart date for filtering results, specified as a Unix timestamp[optional]
endDateNumberEnd date for filtering results, specified as a Unix timestamp[optional]
firstSyncBooleanWhen true, filters results to only show first sync sessions[optional] [default to false]
Return type

GetDeviceSessions200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDevices

GetDevices200Response getDevices(projectOrProductUID, opts)

Get Devices of a Project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  deviceUID: ["null"], // [String] | A Device UID.
  tag: ["null"], // [String] | Tag filter
  serialNumber: ["null"], // [String] | Serial number filter
  fleetUID: ["null"], // [String] |
  notecardFirmware: ["null"], // [String] | Firmware version filter
  location: ["null"], // [String] | Location filter
  hostFirmware: ["null"], // [String] | Host firmware filter
  productUID: ["null"], // [String] |
  sku: ["null"], // [String] | SKU filter
};
apiInstance.getDevices(projectOrProductUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
pageSizeNumber[optional] [default to 50]
pageNumNumber[optional] [default to 1]
deviceUID[String]A Device UID.[optional]
tag[String]Tag filter[optional]
serialNumber[String]Serial number filter[optional]
fleetUID[String][optional]
notecardFirmware[String]Firmware version filter[optional]
location[String]Location filter[optional]
hostFirmware[String]Host firmware filter[optional]
productUID[String][optional]
sku[String]SKU filter[optional]
Return type

GetDevices200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getFleetDevices

GetDevices200Response getFleetDevices(projectOrProductUID, fleetUID, opts)

Get Devices of a Fleet within a Project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  deviceUID: ["null"], // [String] | A Device UID.
  tag: ["null"], // [String] | Tag filter
  serialNumber: ["null"], // [String] | Serial number filter
  notecardFirmware: ["null"], // [String] | Firmware version filter
  location: ["null"], // [String] | Location filter
  hostFirmware: ["null"], // [String] | Host firmware filter
  productUID: ["null"], // [String] |
  sku: ["null"], // [String] | SKU filter
};
apiInstance.getFleetDevices(projectOrProductUID, fleetUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
fleetUIDString
pageSizeNumber[optional] [default to 50]
pageNumNumber[optional] [default to 1]
deviceUID[String]A Device UID.[optional]
tag[String]Tag filter[optional]
serialNumber[String]Serial number filter[optional]
notecardFirmware[String]Firmware version filter[optional]
location[String]Location filter[optional]
hostFirmware[String]Host firmware filter[optional]
productUID[String][optional]
sku[String]SKU filter[optional]
Return type

GetDevices200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getNotefile

GetNotefile200Response getNotefile(projectOrProductUID, deviceUID, notefileID, opts)

For .qi files, returns the queued up notes. For .db files, returns all notes in the notefile

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let notefileID = "notefileID_example"; // String |
let opts = {
  max: 56, // Number | The maximum number of Notes to return in the request.
  deleted: true, // Boolean | true to return deleted notes.
  _delete: true, // Boolean | true to delete the notes returned by the request.
};
apiInstance.getNotefile(projectOrProductUID, deviceUID, notefileID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
notefileIDString
maxNumberThe maximum number of Notes to return in the request.[optional]
deletedBooleantrue to return deleted notes.[optional]
_deleteBooleantrue to delete the notes returned by the request.[optional]
Return type

GetNotefile200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

listNotefiles

[Notefile] listNotefiles(projectOrProductUID, deviceUID, opts)

Lists .qi and .db files for the device

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let opts = {
  files: ["null"], // [String] | One or more files to obtain change information from.
  pending: true, // Boolean | show only files that are pending sync to the Notecard
};
apiInstance.listNotefiles(projectOrProductUID, deviceUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
files[String]One or more files to obtain change information from.[optional]
pendingBooleanshow only files that are pending sync to the Notecard[optional]
Return type

[Notefile]

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

provisionDevice

Object provisionDevice(projectOrProductUID, deviceUID, provisionDeviceRequest)

Provision Device for a Project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let provisionDeviceRequest = new NotehubJs.ProvisionDeviceRequest(); // ProvisionDeviceRequest | Provision a device to a specific ProductUID
apiInstance
  .provisionDevice(projectOrProductUID, deviceUID, provisionDeviceRequest)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
provisionDeviceRequestProvisionDeviceRequestProvision a device to a specific ProductUID
Return type

Object

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

setDeviceEnvironmentVariables

EnvironmentVariables setDeviceEnvironmentVariables(projectOrProductUID, deviceUID, environmentVariables)

Set environment variables of a device

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let environmentVariables = new NotehubJs.EnvironmentVariables(); // EnvironmentVariables | Environment variables to be added to the device
apiInstance
  .setDeviceEnvironmentVariables(
    projectOrProductUID,
    deviceUID,
    environmentVariables
  )
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
environmentVariablesEnvironmentVariablesEnvironment variables to be added to the device
Return type

EnvironmentVariables

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

setDeviceEnvironmentVariablesByPin

EnvironmentVariables setDeviceEnvironmentVariablesByPin(productUID, deviceUID, xAuthToken, environmentVariables)

Set environment variables of a device with device pin authorization

Example
import * as NotehubJs from "@blues-inc/notehub-js";

let apiInstance = new NotehubJs.DeviceApi();
let productUID = "com.blues.bridge:sensors"; // String |
let deviceUID = "dev:000000000000000"; // String |
let xAuthToken = "xAuthToken_example"; // String | For accessing endpoints by Device pin.
let environmentVariables = new NotehubJs.EnvironmentVariables(); // EnvironmentVariables | Environment variables to be added to the device
apiInstance
  .setDeviceEnvironmentVariablesByPin(
    productUID,
    deviceUID,
    xAuthToken,
    environmentVariables
  )
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
productUIDString
deviceUIDString
xAuthTokenStringFor accessing endpoints by Device pin.
environmentVariablesEnvironmentVariablesEnvironment variables to be added to the device
Return type

EnvironmentVariables

Authorization

No authorization required

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

signalDevice

SignalDevice200Response signalDevice(projectOrProductUID, deviceUID, body)

Send a signal from Notehub to a Notecard.

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let body = new NotehubJs.Body(); // Body | Body or payload of signal to be sent to the device
apiInstance.signalDevice(projectOrProductUID, deviceUID, body).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
bodyBodyBody or payload of signal to be sent to the device
Return type

SignalDevice200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

updateDbNote

updateDbNote(projectOrProductUID, deviceUID, notefileID, noteID, noteInput)

Update a note in a .db or .qi notefile

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.DeviceApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let notefileID = "notefileID_example"; // String |
let noteID = "noteID_example"; // String |
let noteInput = new NotehubJs.NoteInput(); // NoteInput | Body or payload of note to be added to the device
apiInstance
  .updateDbNote(projectOrProductUID, deviceUID, notefileID, noteID, noteInput)
  .then(
    () => {
      console.log("API called successfully.");
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
notefileIDString
noteIDString
noteInputNoteInputBody or payload of note to be added to the device
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

Event API

All URIs are relative to https://api.notefile.net

MethodHTTP requestDescription
getEventsGET /v1/projects/{projectOrProductUID}/events
getEventsByCursorGET /v1/projects/{projectOrProductUID}/events-cursor
getFleetEventsGET /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events
getFleetEventsByCursorGET /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/events-cursor
getRouteLogsByEventGET /v1/projects/{projectOrProductUID}/events/{eventUID}/route-logs

getEvents

GetEvents200Response getEvents(projectOrProductUID, opts)

Get Events of a Project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.EventApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  deviceUID: ["null"], // [String] | A Device UID.
  sortBy: "'captured'", // String |
  sortOrder: "'asc'", // String |
  startDate: 1628631763, // Number | Start date for filtering results, specified as a Unix timestamp
  endDate: 1657894210, // Number | End date for filtering results, specified as a Unix timestamp
  dateType: "uploaded", // String | Which date to filter on, either 'captured' or 'uploaded'.  This will apply to the startDate and endDate parameters
  systemFilesOnly: true, // Boolean |
  files: "_health.qo, data.qo", // String |
  format: "'json'", // String | Response format (JSON or CSV)
  serialNumber: ["null"], // [String] | Filter by Serial Number
  fleetUID: ["null"], // [String] | Filter by Fleet UID
  sessionUID: ["null"], // [String] | Filter by Session UID
  eventUID: ["null"], // [String] | Filter by Event UID
  selectFields: "selectFields_example", // String | Comma-separated list of fields to select from JSON payload (e.g., \"field1,field2.subfield,field3\"), this will reflect the columns in the CSV output.
};
apiInstance.getEvents(projectOrProductUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
pageSizeNumber[optional] [default to 50]
pageNumNumber[optional] [default to 1]
deviceUID[String]A Device UID.[optional]
sortByString[optional] [default to 'captured']
sortOrderString[optional] [default to 'asc']
startDateNumberStart date for filtering results, specified as a Unix timestamp[optional]
endDateNumberEnd date for filtering results, specified as a Unix timestamp[optional]
dateTypeStringWhich date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters[optional] [default to 'captured']
systemFilesOnlyBoolean[optional]
filesString[optional]
formatStringResponse format (JSON or CSV)[optional] [default to 'json']
serialNumber[String]Filter by Serial Number[optional]
fleetUID[String]Filter by Fleet UID[optional]
sessionUID[String]Filter by Session UID[optional]
eventUID[String]Filter by Event UID[optional]
selectFieldsStringComma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output.[optional]
Return type

GetEvents200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json, text/csv

getEventsByCursor

GetEventsByCursor200Response getEventsByCursor(projectOrProductUID, opts)

Get Events of a Project by cursor

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.EventApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let opts = {
  limit: 50, // Number |
  cursor: "cursor_example", // String | A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
  sortOrder: "'asc'", // String |
  systemFilesOnly: true, // Boolean |
  files: "_health.qo, data.qo", // String |
  fleetUID: "fleetUID_example", // String |
  deviceUID: ["null"], // [String] | A Device UID.
};
apiInstance.getEventsByCursor(projectOrProductUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
limitNumber[optional] [default to 50]
cursorStringA cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.[optional]
sortOrderString[optional] [default to 'asc']
systemFilesOnlyBoolean[optional]
filesString[optional]
fleetUIDString[optional]
deviceUID[String]A Device UID.[optional]
Return type

GetEventsByCursor200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getFleetEvents

GetEvents200Response getFleetEvents(projectOrProductUID, fleetUID, opts)

Get Events of a Fleet

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.EventApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  deviceUID: ["null"], // [String] | A Device UID.
  sortBy: "'captured'", // String |
  sortOrder: "'asc'", // String |
  startDate: 1628631763, // Number | Start date for filtering results, specified as a Unix timestamp
  endDate: 1657894210, // Number | End date for filtering results, specified as a Unix timestamp
  dateType: "uploaded", // String | Which date to filter on, either 'captured' or 'uploaded'.  This will apply to the startDate and endDate parameters
  systemFilesOnly: true, // Boolean |
  files: "_health.qo, data.qo", // String |
  format: "'json'", // String | Response format (JSON or CSV)
  serialNumber: ["null"], // [String] | Filter by Serial Number
  sessionUID: ["null"], // [String] | Filter by Session UID
  eventUID: ["null"], // [String] | Filter by Event UID
  selectFields: "selectFields_example", // String | Comma-separated list of fields to select from JSON payload (e.g., \"field1,field2.subfield,field3\"), this will reflect the columns in the CSV output.
};
apiInstance.getFleetEvents(projectOrProductUID, fleetUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
fleetUIDString
pageSizeNumber[optional] [default to 50]
pageNumNumber[optional] [default to 1]
deviceUID[String]A Device UID.[optional]
sortByString[optional] [default to 'captured']
sortOrderString[optional] [default to 'asc']
startDateNumberStart date for filtering results, specified as a Unix timestamp[optional]
endDateNumberEnd date for filtering results, specified as a Unix timestamp[optional]
dateTypeStringWhich date to filter on, either 'captured' or 'uploaded'. This will apply to the startDate and endDate parameters[optional] [default to 'captured']
systemFilesOnlyBoolean[optional]
filesString[optional]
formatStringResponse format (JSON or CSV)[optional] [default to 'json']
serialNumber[String]Filter by Serial Number[optional]
sessionUID[String]Filter by Session UID[optional]
eventUID[String]Filter by Event UID[optional]
selectFieldsStringComma-separated list of fields to select from JSON payload (e.g., "field1,field2.subfield,field3"), this will reflect the columns in the CSV output.[optional]
Return type

GetEvents200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json, text/csv

getFleetEventsByCursor

GetEventsByCursor200Response getFleetEventsByCursor(projectOrProductUID, fleetUID, opts)

Get Events of a Fleet by cursor

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.EventApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
let opts = {
  limit: 50, // Number |
  cursor: "cursor_example", // String | A cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.
  sortOrder: "'asc'", // String |
  systemFilesOnly: true, // Boolean |
  files: "_health.qo, data.qo", // String |
  deviceUID: ["null"], // [String] | A Device UID.
  startDate: 1628631763, // Number | Start date for filtering results, specified as a Unix timestamp
  endDate: 1657894210, // Number | End date for filtering results, specified as a Unix timestamp
};
apiInstance.getFleetEventsByCursor(projectOrProductUID, fleetUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
fleetUIDString
limitNumber[optional] [default to 50]
cursorStringA cursor, which can be obtained from the `next_cursor` value from a previous call to this endpoint. The results set returned will include this event as its first result if the given identifier is actually the UID of an event. If this event UID is not found, the parameter is ignored and the results set is the same as if the parameter was not included.[optional]
sortOrderString[optional] [default to 'asc']
systemFilesOnlyBoolean[optional]
filesString[optional]
deviceUID[String]A Device UID.[optional]
startDateNumberStart date for filtering results, specified as a Unix timestamp[optional]
endDateNumberEnd date for filtering results, specified as a Unix timestamp[optional]
Return type

GetEventsByCursor200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getRouteLogsByEvent

[RouteLog] getRouteLogsByEvent(projectOrProductUID, eventUID)

Get Route Logs by Event UID

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.EventApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let eventUID = "4506f411-dea6-44a0-9743-1130f57d7747"; // String |
apiInstance.getRouteLogsByEvent(projectOrProductUID, eventUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
eventUIDString
Return type

[RouteLog]

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

Jobs API

All URIs are relative to https://api.notefile.net

MethodHTTP requestDescription
cancelJobRunPOST /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}/cancel
createJobPOST /v1/projects/{projectOrProductUID}/jobs
deleteJobDELETE /v1/projects/{projectOrProductUID}/jobs/{jobUID}
getJobGET /v1/projects/{projectOrProductUID}/jobs/{jobUID}
getJobRunGET /v1/projects/{projectOrProductUID}/jobs/runs/{reportUID}
getJobRunsGET /v1/projects/{projectOrProductUID}/jobs/{jobUID}/runs
getJobsGET /v1/projects/{projectOrProductUID}/jobs
runJobPOST /v1/projects/{projectOrProductUID}/jobs/{jobUID}/run

cancelJobRun

CancelJobRun200Response cancelJobRun(projectOrProductUID, reportUID)

Cancel a running job execution

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.JobsApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let reportUID = "my-reconciliation-job-1707654321000"; // String | Unique identifier for a job run report
apiInstance.cancelJobRun(projectOrProductUID, reportUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
reportUIDStringUnique identifier for a job run report
Return type

CancelJobRun200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

createJob

CreateJob201Response createJob(projectOrProductUID, name, body)

Create a new batch job with an optional name

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.JobsApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let name = "name_example"; // String | Name for the job
let body = { key: null }; // Object | The job definition as raw JSON
apiInstance.createJob(projectOrProductUID, name, body).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
nameStringName for the job
bodyObjectThe job definition as raw JSON
Return type

CreateJob201Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

deleteJob

DeleteJob200Response deleteJob(projectOrProductUID, jobUID)

Delete a batch job

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.JobsApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let jobUID = "my-reconciliation-job"; // String | Unique identifier for a batch job
apiInstance.deleteJob(projectOrProductUID, jobUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
jobUIDStringUnique identifier for a batch job
Return type

DeleteJob200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getJob

Job getJob(projectOrProductUID, jobUID)

Get a specific batch job definition

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.JobsApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let jobUID = "my-reconciliation-job"; // String | Unique identifier for a batch job
apiInstance.getJob(projectOrProductUID, jobUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
jobUIDStringUnique identifier for a batch job
Return type

Job

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getJobRun

JobRun getJobRun(projectOrProductUID, reportUID)

Get the result of a job execution

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.JobsApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let reportUID = "my-reconciliation-job-1707654321000"; // String | Unique identifier for a job run report
apiInstance.getJobRun(projectOrProductUID, reportUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
reportUIDStringUnique identifier for a job run report
Return type

JobRun

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getJobRuns

GetJobRuns200Response getJobRuns(projectOrProductUID, jobUID, opts)

List all runs for a specific job

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.JobsApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let jobUID = "my-reconciliation-job"; // String | Unique identifier for a batch job
let opts = {
  status: "status_example", // String | Filter runs by status
  dryRun: true, // Boolean | Filter runs by dry run flag
};
apiInstance.getJobRuns(projectOrProductUID, jobUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
jobUIDStringUnique identifier for a batch job
statusStringFilter runs by status[optional]
dryRunBooleanFilter runs by dry run flag[optional]
Return type

GetJobRuns200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getJobs

GetJobs200Response getJobs(projectOrProductUID)

List all batch jobs for a project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.JobsApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getJobs(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

GetJobs200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

runJob

RunJob200Response runJob(projectOrProductUID, jobUID, opts)

Execute a batch job

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.JobsApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let jobUID = "my-reconciliation-job"; // String | Unique identifier for a batch job
let opts = {
  dryRun: false, // Boolean | Run job in dry-run mode without making actual changes
};
apiInstance.runJob(projectOrProductUID, jobUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
jobUIDStringUnique identifier for a batch job
dryRunBooleanRun job in dry-run mode without making actual changes[optional] [default to false]
Return type

RunJob200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

Monitor API

All URIs are relative to https://api.notefile.net

MethodHTTP requestDescription
createMonitorPOST /v1/projects/{projectOrProductUID}/monitors
deleteMonitorDELETE /v1/projects/{projectOrProductUID}/monitors/{monitorUID}
getMonitorGET /v1/projects/{projectOrProductUID}/monitors/{monitorUID}
getMonitorsGET /v1/projects/{projectOrProductUID}/monitors
updateMonitorPUT /v1/projects/{projectOrProductUID}/monitors/{monitorUID}

createMonitor

Monitor createMonitor(projectOrProductUID, body)

Create a new Monitor

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.MonitorApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let body = new NotehubJs.Monitor(); // Monitor | Body or payload of monitor to be created
apiInstance.createMonitor(projectOrProductUID, body).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
bodyMonitorBody or payload of monitor to be created
Return type

Monitor

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

deleteMonitor

Monitor deleteMonitor(projectOrProductUID, monitorUID)

Delete Monitor

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.MonitorApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let monitorUID = "monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad"; // String |
apiInstance.deleteMonitor(projectOrProductUID, monitorUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
monitorUIDString
Return type

Monitor

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getMonitor

Monitor getMonitor(projectOrProductUID, monitorUID)

Get Monitor

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.MonitorApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let monitorUID = "monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad"; // String |
apiInstance.getMonitor(projectOrProductUID, monitorUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
monitorUIDString
Return type

Monitor

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getMonitors

[Monitor] getMonitors(projectOrProductUID)

Get list of defined Monitors

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.MonitorApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getMonitors(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

[Monitor]

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

updateMonitor

Monitor updateMonitor(projectOrProductUID, monitorUID, monitor)

Update Monitor

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.MonitorApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let monitorUID = "monitor:8bAdf00d-000f-51c-af-01d5eaf00dbad"; // String |
let monitor = new NotehubJs.Monitor(); // Monitor | Body or payload of monitor to be created
apiInstance.updateMonitor(projectOrProductUID, monitorUID, monitor).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
monitorUIDString
monitorMonitorBody or payload of monitor to be created
Return type

Monitor

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

Project API

All URIs are relative to https://api.notefile.net

MethodHTTP requestDescription
addDeviceToFleetsPUT /v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets
cloneProjectPOST /v1/projects/{projectOrProductUID}/clone
createFleetPOST /v1/projects/{projectOrProductUID}/fleets
createProductPOST /v1/projects/{projectOrProductUID}/products
createProjectPOST /v1/projects
deleteDeviceFromFleetsDELETE /v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets
deleteFleetDELETE /v1/projects/{projectOrProductUID}/fleets/{fleetUID}
deleteFleetEnvironmentVariableDELETE /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables/{key}
deleteProductDELETE /v1/projects/{projectOrProductUID}/products/{productUID}
deleteProjectDELETE /v1/projects/{projectOrProductUID}
deleteProjectEnvironmentVariableDELETE /v1/projects/{projectOrProductUID}/environment_variables/{key}
disableGlobalEventTransformationPOST /v1/projects/{projectOrProductUID}/global-transformation/disable
downloadFirmwareGET /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}
enableGlobalEventTransformationPOST /v1/projects/{projectOrProductUID}/global-transformation/enable
getAWSRoleConfigGET /v1/projects/{projectOrProductUID}/aws-role-configGet AWS role configuration for role-based authentication
getDeviceDfuHistoryGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/history
getDeviceDfuStatusGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/dfu/{firmwareType}/status
getDeviceFleetsGET /v1/projects/{projectOrProductUID}/devices/{deviceUID}/fleets
getDevicesDfuHistoryGET /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/history
getDevicesDfuStatusGET /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/status
getFirmwareInfoGET /v1/projects/{projectOrProductUID}/firmware
getFleetGET /v1/projects/{projectOrProductUID}/fleets/{fleetUID}
getFleetEnvironmentHierarchyGET /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_hierarchyGet environment variable hierarchy for a device
getFleetEnvironmentVariablesGET /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables
getFleetsGET /v1/projects/{projectOrProductUID}/fleets
getNotefileSchemasGET /v1/projects/{projectOrProductUID}/schemasGet variable format for a notefile
getProductsGET /v1/projects/{projectOrProductUID}/products
getProjectGET /v1/projects/{projectOrProductUID}
getProjectByProductGET /v1/products/{productUID}/project
getProjectEnvironmentHierarchyGET /v1/projects/{projectOrProductUID}/environment_hierarchyGet environment variable hierarchy for a device
getProjectEnvironmentVariablesGET /v1/projects/{projectOrProductUID}/environment_variables
getProjectMembersGET /v1/projects/{projectOrProductUID}/members
getProjectsGET /v1/projects
performDfuActionPOST /v1/projects/{projectOrProductUID}/dfu/{firmwareType}/{action}
setFleetEnvironmentVariablesPUT /v1/projects/{projectOrProductUID}/fleets/{fleetUID}/environment_variables
setGlobalEventTransformationPOST /v1/projects/{projectOrProductUID}/global-transformation
setProjectEnvironmentVariablesPUT /v1/projects/{projectOrProductUID}/environment_variables
updateFleetPUT /v1/projects/{projectOrProductUID}/fleets/{fleetUID}
uploadFirmwarePUT /v1/projects/{projectOrProductUID}/firmware/{firmwareType}/{filename}

addDeviceToFleets

GetDeviceFleets200Response addDeviceToFleets(projectOrProductUID, deviceUID, addDeviceToFleetsRequest)

Add Device to Fleets

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let addDeviceToFleetsRequest = new NotehubJs.AddDeviceToFleetsRequest(); // AddDeviceToFleetsRequest | The fleets to add to the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error.
apiInstance
  .addDeviceToFleets(projectOrProductUID, deviceUID, addDeviceToFleetsRequest)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
addDeviceToFleetsRequestAddDeviceToFleetsRequestThe fleets to add to the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error.
Return type

GetDeviceFleets200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

cloneProject

Project cloneProject(projectOrProductUID, cloneProjectRequest)

Clone a Project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let cloneProjectRequest = new NotehubJs.CloneProjectRequest(); // CloneProjectRequest | Project to be cloned
apiInstance.cloneProject(projectOrProductUID, cloneProjectRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
cloneProjectRequestCloneProjectRequestProject to be cloned
Return type

Project

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

createFleet

Fleet createFleet(projectOrProductUID, createFleetRequest)

Create Fleet

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let createFleetRequest = new NotehubJs.CreateFleetRequest(); // CreateFleetRequest | Fleet to be added
apiInstance.createFleet(projectOrProductUID, createFleetRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
createFleetRequestCreateFleetRequestFleet to be added
Return type

Fleet

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

createProduct

Product createProduct(projectOrProductUID, createProductRequest)

Create Product within a Project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let createProductRequest = new NotehubJs.CreateProductRequest(); // CreateProductRequest | Product to be created
apiInstance.createProduct(projectOrProductUID, createProductRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
createProductRequestCreateProductRequestProduct to be created
Return type

Product

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

createProject

Project createProject(createProjectRequest)

Create a Project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let createProjectRequest = new NotehubJs.CreateProjectRequest(); // CreateProjectRequest | Project to be created
apiInstance.createProject(createProjectRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
createProjectRequestCreateProjectRequestProject to be created
Return type

Project

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

deleteDeviceFromFleets

GetDeviceFleets200Response deleteDeviceFromFleets(projectOrProductUID, deviceUID, deleteDeviceFromFleetsRequest)

Remove Device from Fleets

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let deleteDeviceFromFleetsRequest =
  new NotehubJs.DeleteDeviceFromFleetsRequest(); // DeleteDeviceFromFleetsRequest | The fleets to remove from the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error.
apiInstance
  .deleteDeviceFromFleets(
    projectOrProductUID,
    deviceUID,
    deleteDeviceFromFleetsRequest
  )
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
deleteDeviceFromFleetsRequestDeleteDeviceFromFleetsRequestThe fleets to remove from the device. Note that the endpoint takes an array of fleetUIDs, to facilitate multi-fleet devices. Multi-fleet is not yet enabled on all SaaS plans - unless it is supported by the SaaS plan of the project, passing more than a single fleetUID in the array is an error.
Return type

GetDeviceFleets200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

deleteFleet

deleteFleet(projectOrProductUID, fleetUID)

Delete Fleet

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
apiInstance.deleteFleet(projectOrProductUID, fleetUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
fleetUIDString
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

deleteFleetEnvironmentVariable

EnvironmentVariables deleteFleetEnvironmentVariable(projectOrProductUID, fleetUID, key)

Delete environment variables of a fleet

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
let key = "key_example"; // String | The environment variable key to delete.
apiInstance
  .deleteFleetEnvironmentVariable(projectOrProductUID, fleetUID, key)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
fleetUIDString
keyStringThe environment variable key to delete.
Return type

EnvironmentVariables

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

deleteProduct

deleteProduct(projectOrProductUID, productUID)

Delete a product

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let productUID = "com.blues.bridge:sensors"; // String |
apiInstance.deleteProduct(projectOrProductUID, productUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
productUIDString
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

deleteProject

deleteProject(projectOrProductUID)

Delete a Project by ProjectUID

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.deleteProject(projectOrProductUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

deleteProjectEnvironmentVariable

EnvironmentVariables deleteProjectEnvironmentVariable(projectOrProductUID, key)

Delete an environment variable of a project by key

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let key = "key_example"; // String | The environment variable key to delete.
apiInstance.deleteProjectEnvironmentVariable(projectOrProductUID, key).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
keyStringThe environment variable key to delete.
Return type

EnvironmentVariables

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

disableGlobalEventTransformation

disableGlobalEventTransformation(projectOrProductUID)

Disable the project-level event JSONata transformation

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.disableGlobalEventTransformation(projectOrProductUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

downloadFirmware

File downloadFirmware(projectOrProductUID, firmwareType, filename)

Download firmware binary

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let firmwareType = "firmwareType_example"; // String |
let filename = "filename_example"; // String |
apiInstance.downloadFirmware(projectOrProductUID, firmwareType, filename).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
firmwareTypeString
filenameString
Return type

File

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/octet-stream, application/json

enableGlobalEventTransformation

enableGlobalEventTransformation(projectOrProductUID)

Enable the project-level event JSONata transformation

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.enableGlobalEventTransformation(projectOrProductUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getAWSRoleConfig

AWSRoleConfig getAWSRoleConfig(projectOrProductUID)

Get AWS role configuration for role-based authentication

Returns the AWS Account ID and External ID needed to configure an IAM role trust policy for role-based authentication on AWS routes.

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getAWSRoleConfig(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

AWSRoleConfig

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDeviceDfuHistory

DeviceDfuHistory getDeviceDfuHistory(projectOrProductUID, deviceUID, firmwareType)

Get device DFU history for host or Notecard firmware

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let firmwareType = "firmwareType_example"; // String |
apiInstance
  .getDeviceDfuHistory(projectOrProductUID, deviceUID, firmwareType)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
firmwareTypeString
Return type

DeviceDfuHistory

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDeviceDfuStatus

DeviceDfuStatus getDeviceDfuStatus(projectOrProductUID, deviceUID, firmwareType)

Get device DFU history for host or Notecard firmware

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
let firmwareType = "firmwareType_example"; // String |
apiInstance
  .getDeviceDfuStatus(projectOrProductUID, deviceUID, firmwareType)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
firmwareTypeString
Return type

DeviceDfuStatus

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDeviceFleets

GetDeviceFleets200Response getDeviceFleets(projectOrProductUID, deviceUID)

Get Device Fleets

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "dev:000000000000000"; // String |
apiInstance.getDeviceFleets(projectOrProductUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
deviceUIDString
Return type

GetDeviceFleets200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDevicesDfuHistory

DeviceDfuHistoryPage getDevicesDfuHistory(projectOrProductUID, firmwareType, opts)

Get host or Notecard DFU history for all devices that match the filter criteria

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let firmwareType = "firmwareType_example"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  sortBy: "'captured'", // String |
  sortOrder: "'asc'", // String |
  deviceUID: ["null"], // [String] | A Device UID.
  tag: ["null"], // [String] | Tag filter
  serialNumber: ["null"], // [String] | Serial number filter
  fleetUID: "fleetUID_example", // String |
  notecardFirmware: ["null"], // [String] | Firmware version filter
  location: ["null"], // [String] | Location filter
  hostFirmware: ["null"], // [String] | Host firmware filter
  productUID: ["null"], // [String] |
  sku: ["null"], // [String] | SKU filter
};
apiInstance.getDevicesDfuHistory(projectOrProductUID, firmwareType, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
firmwareTypeString
pageSizeNumber[optional] [default to 50]
pageNumNumber[optional] [default to 1]
sortByString[optional] [default to 'captured']
sortOrderString[optional] [default to 'asc']
deviceUID[String]A Device UID.[optional]
tag[String]Tag filter[optional]
serialNumber[String]Serial number filter[optional]
fleetUIDString[optional]
notecardFirmware[String]Firmware version filter[optional]
location[String]Location filter[optional]
hostFirmware[String]Host firmware filter[optional]
productUID[String][optional]
sku[String]SKU filter[optional]
Return type

DeviceDfuHistoryPage

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getDevicesDfuStatus

DeviceDfuStatusPage getDevicesDfuStatus(projectOrProductUID, firmwareType, opts)

Get host or Notecard DFU history for all devices that match the filter criteria

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let firmwareType = "firmwareType_example"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  sortBy: "'captured'", // String |
  sortOrder: "'asc'", // String |
  deviceUID: ["null"], // [String] | A Device UID.
  tag: ["null"], // [String] | Tag filter
  serialNumber: ["null"], // [String] | Serial number filter
  fleetUID: "fleetUID_example", // String |
  notecardFirmware: ["null"], // [String] | Firmware version filter
  location: ["null"], // [String] | Location filter
  hostFirmware: ["null"], // [String] | Host firmware filter
  productUID: ["null"], // [String] |
  sku: ["null"], // [String] | SKU filter
};
apiInstance.getDevicesDfuStatus(projectOrProductUID, firmwareType, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
firmwareTypeString
pageSizeNumber[optional] [default to 50]
pageNumNumber[optional] [default to 1]
sortByString[optional] [default to 'captured']
sortOrderString[optional] [default to 'asc']
deviceUID[String]A Device UID.[optional]
tag[String]Tag filter[optional]
serialNumber[String]Serial number filter[optional]
fleetUIDString[optional]
notecardFirmware[String]Firmware version filter[optional]
location[String]Location filter[optional]
hostFirmware[String]Host firmware filter[optional]
productUID[String][optional]
sku[String]SKU filter[optional]
Return type

DeviceDfuStatusPage

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getFirmwareInfo

[FirmwareInfo] getFirmwareInfo(projectOrProductUID, opts)

Get Available Firmware Information

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let opts = {
  product: "product_example", // String |
  firmwareType: "firmwareType_example", // String |
  version: "version_example", // String |
  target: "target_example", // String |
  filename: "notecard-7.2.2.16518$20240410043100.bin", // String |
  md5: "md5_example", // String |
  unpublished: true, // Boolean |
  sortBy: "'created'", // String | Field to sort by
  sortOrder: "'desc'", // String | Sort order (asc for ascending, desc for descending)
};
apiInstance.getFirmwareInfo(projectOrProductUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
productString[optional]
firmwareTypeString[optional]
versionString[optional]
targetString[optional]
filenameString[optional]
md5String[optional]
unpublishedBoolean[optional]
sortByStringField to sort by[optional] [default to 'created']
sortOrderStringSort order (asc for ascending, desc for descending)[optional] [default to 'desc']
Return type

[FirmwareInfo]

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getFleet

Fleet getFleet(projectOrProductUID, fleetUID)

Get Fleet

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
apiInstance.getFleet(projectOrProductUID, fleetUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
fleetUIDString
Return type

Fleet

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getFleetEnvironmentHierarchy

EnvTreeJsonNode getFleetEnvironmentHierarchy(projectOrProductUID, fleetUID)

Get environment variable hierarchy for a device

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
apiInstance.getFleetEnvironmentHierarchy(projectOrProductUID, fleetUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
fleetUIDString
Return type

EnvTreeJsonNode

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getFleetEnvironmentVariables

EnvironmentVariables getFleetEnvironmentVariables(projectOrProductUID, fleetUID)

Get environment variables of a fleet

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
apiInstance.getFleetEnvironmentVariables(projectOrProductUID, fleetUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
fleetUIDString
Return type

EnvironmentVariables

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getFleets

GetDeviceFleets200Response getFleets(projectOrProductUID)

Get Project Fleets

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getFleets(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

GetDeviceFleets200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getNotefileSchemas

[NotefileSchema] getNotefileSchemas(projectOrProductUID)

Get variable format for a notefile

Example
import * as NotehubJs from "@blues-inc/notehub-js";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getNotefileSchemas(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

[NotefileSchema]

Authorization

No authorization required

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getProducts

GetProducts200Response getProducts(projectOrProductUID)

Get Products within a Project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getProducts(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

GetProducts200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getProject

Project getProject(projectOrProductUID)

Get a Project by ProjectUID

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getProject(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

Project

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getProjectByProduct

Project getProjectByProduct(productUID)

Get a Project by ProductUID

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let productUID = com.blues.airnote; // String |
apiInstance.getProjectByProduct(productUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
productUIDString
Return type

Project

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getProjectEnvironmentHierarchy

EnvTreeJsonNode getProjectEnvironmentHierarchy(projectOrProductUID)

Get environment variable hierarchy for a device

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getProjectEnvironmentHierarchy(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

EnvTreeJsonNode

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getProjectEnvironmentVariables

EnvironmentVariables getProjectEnvironmentVariables(projectOrProductUID)

Get environment variables of a project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getProjectEnvironmentVariables(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

EnvironmentVariables

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getProjectMembers

GetProjectMembers200Response getProjectMembers(projectOrProductUID)

Get Project Members

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getProjectMembers(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

GetProjectMembers200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getProjects

GetProjects200Response getProjects()

Get Projects accessible by the api_key

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
apiInstance.getProjects().then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters

This endpoint does not need any parameter.

Return type

GetProjects200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

performDfuAction

performDfuAction(projectOrProductUID, firmwareType, action, opts)

Update/cancel host or notecard firmware updates

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let firmwareType = "firmwareType_example"; // String |
let action = "action_example"; // String |
let opts = {
  deviceUID: ["null"], // [String] | A Device UID.
  tag: ["null"], // [String] | Tag filter
  serialNumber: ["null"], // [String] | Serial number filter
  fleetUID: "fleetUID_example", // String |
  notecardFirmware: ["null"], // [String] | Firmware version filter
  location: ["null"], // [String] | Location filter
  hostFirmware: ["null"], // [String] | Host firmware filter
  productUID: ["null"], // [String] |
  sku: ["null"], // [String] | SKU filter
  dfuActionRequest: new NotehubJs.DfuActionRequest(), // DfuActionRequest | Which firmware in the case of an update action
};
apiInstance
  .performDfuAction(projectOrProductUID, firmwareType, action, opts)
  .then(
    () => {
      console.log("API called successfully.");
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
firmwareTypeString
actionString
deviceUID[String]A Device UID.[optional]
tag[String]Tag filter[optional]
serialNumber[String]Serial number filter[optional]
fleetUIDString[optional]
notecardFirmware[String]Firmware version filter[optional]
location[String]Location filter[optional]
hostFirmware[String]Host firmware filter[optional]
productUID[String][optional]
sku[String]SKU filter[optional]
dfuActionRequestDfuActionRequestWhich firmware in the case of an update action[optional]
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

setFleetEnvironmentVariables

EnvironmentVariables setFleetEnvironmentVariables(projectOrProductUID, fleetUID, environmentVariables)

Set environment variables of a fleet

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
let environmentVariables = new NotehubJs.EnvironmentVariables(); // EnvironmentVariables | Environment variables to be added to the fleet
apiInstance
  .setFleetEnvironmentVariables(
    projectOrProductUID,
    fleetUID,
    environmentVariables
  )
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
fleetUIDString
environmentVariablesEnvironmentVariablesEnvironment variables to be added to the fleet
Return type

EnvironmentVariables

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

setGlobalEventTransformation

setGlobalEventTransformation(projectOrProductUID, body)

Set the project-level event JSONata transformation

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let body = { key: null }; // Object | JSONata expression which will be applied to each event before it is persisted and routed
apiInstance.setGlobalEventTransformation(projectOrProductUID, body).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
bodyObjectJSONata expression which will be applied to each event before it is persisted and routed
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

setProjectEnvironmentVariables

EnvironmentVariables setProjectEnvironmentVariables(projectOrProductUID, opts)

Set environment variables of a project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let opts = {
  environmentVariables: new NotehubJs.EnvironmentVariables(), // EnvironmentVariables |
};
apiInstance.setProjectEnvironmentVariables(projectOrProductUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
environmentVariablesEnvironmentVariables[optional]
Return type

EnvironmentVariables

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

updateFleet

Fleet updateFleet(projectOrProductUID, fleetUID, updateFleetRequest)

Update Fleet

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
let updateFleetRequest = new NotehubJs.UpdateFleetRequest(); // UpdateFleetRequest | Fleet details to update
apiInstance.updateFleet(projectOrProductUID, fleetUID, updateFleetRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
fleetUIDString
updateFleetRequestUpdateFleetRequestFleet details to update
Return type

Fleet

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

uploadFirmware

FirmwareInfo uploadFirmware(projectOrProductUID, firmwareType, filename, body, opts)

Upload firmware binary

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.ProjectApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let firmwareType = "firmwareType_example"; // String |
let filename = "filename_example"; // String |
let body = "/path/to/file"; // File | contents of the firmware binary
let opts = {
  version: "version_example", // String | Firmware version (optional). If not provided, the version will be extracted from firmware binary if available, otherwise left empty
  notes: "notes_example", // String | Optional notes describing what's different about this firmware version
};
apiInstance
  .uploadFirmware(projectOrProductUID, firmwareType, filename, body, opts)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
firmwareTypeString
filenameString
bodyFilecontents of the firmware binary
versionStringFirmware version (optional). If not provided, the version will be extracted from firmware binary if available, otherwise left empty[optional]
notesStringOptional notes describing what's different about this firmware version[optional]
Return type

FirmwareInfo

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/octet-stream
  • Accept: application/json

Route API

All URIs are relative to https://api.notefile.net

MethodHTTP requestDescription
createRoutePOST /v1/projects/{projectOrProductUID}/routes
deleteRouteDELETE /v1/projects/{projectOrProductUID}/routes/{routeUID}
getRouteGET /v1/projects/{projectOrProductUID}/routes/{routeUID}
getRouteLogsByRouteGET /v1/projects/{projectOrProductUID}/routes/{routeUID}/route-logs
getRoutesGET /v1/projects/{projectOrProductUID}/routes
updateRoutePUT /v1/projects/{projectOrProductUID}/routes/{routeUID}

createRoute

NotehubRoute createRoute(projectOrProductUID, notehubRoute)

Create Route within a Project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.RouteApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let notehubRoute = {
  http: {
    disable_http_headers: false,
    filter: {},
    fleets: ["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"],
    http_headers: { "X-My-Header": "value" },
    throttle_ms: 100,
    timeout: 5000,
    transform: {},
    url: "https://example.com/ingest",
  },
  label: "Route Label",
}; // NotehubRoute | Route to be created
apiInstance.createRoute(projectOrProductUID, notehubRoute).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
notehubRouteNotehubRouteRoute to be created
Return type

NotehubRoute

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

deleteRoute

deleteRoute(projectOrProductUID, routeUID)

Delete single route within a project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.RouteApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let routeUID = "route:cbd20093cba58392c9f9bbdd0cdeb1a0"; // String |
apiInstance.deleteRoute(projectOrProductUID, routeUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
routeUIDString
Return type

null (empty response body)

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getRoute

NotehubRoute getRoute(projectOrProductUID, routeUID)

Get single route within a project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.RouteApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let routeUID = "route:cbd20093cba58392c9f9bbdd0cdeb1a0"; // String |
apiInstance.getRoute(projectOrProductUID, routeUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
routeUIDString
Return type

NotehubRoute

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getRouteLogsByRoute

[RouteLog] getRouteLogsByRoute(projectOrProductUID, routeUID, opts)

Get Route Logs by Route UID

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.RouteApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let routeUID = "route:cbd20093cba58392c9f9bbdd0cdeb1a0"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  deviceUID: ["null"], // [String] | A Device UID.
  sortBy: "'date'", // String |
  sortOrder: "'desc'", // String |
  startDate: 1628631763, // Number | Start date for filtering results, specified as a Unix timestamp
  endDate: 1657894210, // Number | End date for filtering results, specified as a Unix timestamp
  systemFilesOnly: true, // Boolean |
  mostRecentOnly: true, // Boolean |
  files: "_health.qo, data.qo", // String |
  routingStatus: failure, // [String] |
  responseStatus: 500, // [String] |
};
apiInstance.getRouteLogsByRoute(projectOrProductUID, routeUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
routeUIDString
pageSizeNumber[optional] [default to 50]
pageNumNumber[optional] [default to 1]
deviceUID[String]A Device UID.[optional]
sortByString[optional] [default to 'date']
sortOrderString[optional] [default to 'desc']
startDateNumberStart date for filtering results, specified as a Unix timestamp[optional]
endDateNumberEnd date for filtering results, specified as a Unix timestamp[optional]
systemFilesOnlyBoolean[optional]
mostRecentOnlyBoolean[optional]
filesString[optional]
routingStatus[String][optional]
responseStatus[String][optional]
Return type

[RouteLog]

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getRoutes

[NotehubRouteSummary] getRoutes(projectOrProductUID)

Get all Routes within a Project

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.RouteApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getRoutes(projectOrProductUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
Return type

[NotehubRouteSummary]

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

updateRoute

NotehubRoute updateRoute(projectOrProductUID, routeUID, notehubRoute)

Update route by UID

Example
import * as NotehubJs from '@blues-inc/notehub-js';
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications['personalAccessToken'];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new NotehubJs.RouteApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let routeUID = "route:cbd20093cba58392c9f9bbdd0cdeb1a0"; // String |
let notehubRoute = {
  "http" {
    "filter": {
      "type": "include",
      "system_notefiles": true,
      "files": ["somefile.qo"],
    },
    "throttle_ms": 50,
    "url": "http://new-route.url",
  },
}
; // NotehubRoute | Route settings to be updated
apiInstance.updateRoute(projectOrProductUID, routeUID, notehubRoute).then((data) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
  console.error(error);
});
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
routeUIDString
notehubRouteNotehubRouteRoute settings to be updated
Return type

NotehubRoute

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: application/json
  • Accept: application/json

Usage API

All URIs are relative to https://api.notefile.net

MethodHTTP requestDescription
getDataUsageGET /v1/projects/{projectOrProductUID}/usage/data
getEventsUsageGET /v1/projects/{projectOrProductUID}/usage/events
getRouteLogsUsageGET /v1/projects/{projectOrProductUID}/usage/route-logs
getSessionsUsageGET /v1/projects/{projectOrProductUID}/usage/sessions

getDataUsage

GetDataUsage200Response getDataUsage(projectOrProductUID, period, opts)

Get data usage in bytes for a project with time range and period aggregation

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.UsageApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let period = "period_example"; // String | Period type for aggregation
let opts = {
  startDate: 1628631763, // Number | Start date for filtering results, specified as a Unix timestamp
  endDate: 1657894210, // Number | End date for filtering results, specified as a Unix timestamp
  deviceUID: ["null"], // [String] | A Device UID.
  fleetUID: ["null"], // [String] | Filter by Fleet UID
  limit: 200000, // Number | Limit the number of data points returned
  aggregate: "'device'", // String | Aggregation level for results
};
apiInstance.getDataUsage(projectOrProductUID, period, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
periodStringPeriod type for aggregation
startDateNumberStart date for filtering results, specified as a Unix timestamp[optional]
endDateNumberEnd date for filtering results, specified as a Unix timestamp[optional]
deviceUID[String]A Device UID.[optional]
fleetUID[String]Filter by Fleet UID[optional]
limitNumberLimit the number of data points returned[optional] [default to 200000]
aggregateStringAggregation level for results[optional] [default to 'device']
Return type

GetDataUsage200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getEventsUsage

UsageEventsResponse getEventsUsage(projectOrProductUID, period, opts)

Get events usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.UsageApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let period = "period_example"; // String | Period type for aggregation
let opts = {
  startDate: 1628631763, // Number | Start date for filtering results, specified as a Unix timestamp
  endDate: 1657894210, // Number | End date for filtering results, specified as a Unix timestamp
  deviceUID: ["null"], // [String] | A Device UID.
  fleetUID: ["null"], // [String] | Filter by Fleet UID
  limit: 200000, // Number | Limit the number of data points returned
  aggregate: "'device'", // String | Aggregation level for results
  notefile: ["null"], // [String] | Filter to specific notefiles
  skipRecentData: false, // Boolean | When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.
  includeNotefiles: false, // Boolean | Include per-notefile event counts in the response
};
apiInstance.getEventsUsage(projectOrProductUID, period, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
periodStringPeriod type for aggregation
startDateNumberStart date for filtering results, specified as a Unix timestamp[optional]
endDateNumberEnd date for filtering results, specified as a Unix timestamp[optional]
deviceUID[String]A Device UID.[optional]
fleetUID[String]Filter by Fleet UID[optional]
limitNumberLimit the number of data points returned[optional] [default to 200000]
aggregateStringAggregation level for results[optional] [default to 'device']
notefile[String]Filter to specific notefiles[optional]
skipRecentDataBooleanWhen true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.[optional] [default to false]
includeNotefilesBooleanInclude per-notefile event counts in the response[optional] [default to false]
Return type

UsageEventsResponse

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getRouteLogsUsage

GetRouteLogsUsage200Response getRouteLogsUsage(projectOrProductUID, period, opts)

Get route logs usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.UsageApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let period = "period_example"; // String | Period type for aggregation
let opts = {
  startDate: 1628631763, // Number | Start date for filtering results, specified as a Unix timestamp
  endDate: 1657894210, // Number | End date for filtering results, specified as a Unix timestamp
  routeUID: ["null"], // [String] | A Route UID.
  limit: 200000, // Number | Limit the number of data points returned
  aggregate: "'route'", // String | Aggregation level for results
  skipRecentData: false, // Boolean | When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.
};
apiInstance.getRouteLogsUsage(projectOrProductUID, period, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
periodStringPeriod type for aggregation
startDateNumberStart date for filtering results, specified as a Unix timestamp[optional]
endDateNumberEnd date for filtering results, specified as a Unix timestamp[optional]
routeUID[String]A Route UID.[optional]
limitNumberLimit the number of data points returned[optional] [default to 200000]
aggregateStringAggregation level for results[optional] [default to 'route']
skipRecentDataBooleanWhen true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.[optional] [default to false]
Return type

GetRouteLogsUsage200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json

getSessionsUsage

GetSessionsUsage200Response getSessionsUsage(projectOrProductUID, period, opts)

Get sessions usage for a project with time range and period aggregation, when endDate is 0 or unspecified the current time is implied

Example
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
let personalAccessToken = defaultClient.authentications["personalAccessToken"];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN";

let apiInstance = new NotehubJs.UsageApi();
let projectOrProductUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let period = "period_example"; // String | Period type for aggregation
let opts = {
  startDate: 1628631763, // Number | Start date for filtering results, specified as a Unix timestamp
  endDate: 1657894210, // Number | End date for filtering results, specified as a Unix timestamp
  deviceUID: ["null"], // [String] | A Device UID.
  fleetUID: ["null"], // [String] | Filter by Fleet UID
  limit: 200000, // Number | Limit the number of data points returned
  aggregate: "'device'", // String | Aggregation level for results
  skipRecentData: false, // Boolean | When true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.
};
apiInstance.getSessionsUsage(projectOrProductUID, period, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
Parameters
NameTypeDescriptionNotes
projectOrProductUIDString
periodStringPeriod type for aggregation
startDateNumberStart date for filtering results, specified as a Unix timestamp[optional]
endDateNumberEnd date for filtering results, specified as a Unix timestamp[optional]
deviceUID[String]A Device UID.[optional]
fleetUID[String]Filter by Fleet UID[optional]
limitNumberLimit the number of data points returned[optional] [default to 200000]
aggregateStringAggregation level for results[optional] [default to 'device']
skipRecentDataBooleanWhen true, skips fetching recent data from raw event tables and only returns data from summary tables. Use this for better performance on large projects.[optional] [default to false]
Return type

GetSessionsUsage200Response

Authorization

personalAccessToken

HTTP request headers
  • Content-Type: Not defined
  • Accept: application/json
Can we improve this page? Send us feedback
© 2026 Blues Inc.
© 2026 Blues Inc.
TermsPrivacy