🚀 Browse our open source reference applications to accelerate your IoT project!

Search
Documentation Results
End of results
Community Results
End of results
Support
Blues.io
Notehub.io
Shop
Sign In
Search
Documentation Results
End of results
Community Results
End of results
Support
Blues.io
Notehub.io
Shop
×
HomeTools & SDKs
Notecard CLI
Firmware Libraries
Libraries Overview
Arduino Library
Python Library
Zephyr SDK
Notehub JS LibraryInstallationUsageAuthorization APIBilling Account APIDevice APIDevices APIEnvironment Variables APIEvent APIFiles APIFleet APINotes APIProduct APIProject APIRoute API
Samples
Samples Overview
Host MCU Samples
Rate this page  
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★
Can we improve this page? Send us feedbackRate this page
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★
  • ★
    ★
© 2023 Blues Inc.Terms & ConditionsPrivacy
blues.ioTwitterLinkedInGitHubHackster.io
Disconnected
Notecard Disconnected
Having trouble connecting?

Try changing your Micro 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 Notecard's latest firmware on a Simulator assigned to your free Notehub account.

Don't have an account? Sign up

Notehub JS Library Overview

The Notehub JS library is an npm library built specifically for use in JavaScript-based applications.

It is designed to get you connected to the Notehub API quickly, and allow you to access all the API routes relevant to interacting with Notehub in a JavaScript-friendly way.

Installation

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

In the root of the project where you wish to use Notehub JS, run the following command from the terminal.

Using npm:

$
npm install @blues-inc/notehub-js

Using yarn:

$
yarn add @blues-inc/notehub-js

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

Using import:

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

const defaultClient = NotehubJs.ApiClient.instance;
note

Using import to access the library in a TypeScript project currently will cause an error because there is not yet a @types file for it. To make the error disappear, declare the module in a file with a .d.ts extension.

>
declare module '@blues-inc/notehub-js';

Using require:

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

const defaultClient = NotehubJs.ApiClient.instance;

Usage

Below is documentation and code examples for all the Notehub API methods.

Notehub JS Authorization

There is one main type of authorization the Notehub API uses for nearly all requests:

API Key

The api_key referenced in the following code examples is an API key (also known locally as an X-Session-Token).

The API key is an authentication token that can be obtained in two ways:

Manually cURL the token from the command line

Using the command line, a user can request a new token from the Notehub API /auth/login endpoint using a Notehub username and password in the body of the request.

Use NotehubJs.AuthorizationApi login

Using the Notehub JS library, a user can programmatically call the Notehub API's /auth/login endpoint via the NotehubJs.AuthorizationApi's login() method while supplying a Notehub username and password in the loginRequest object.

API Calls and Consumption Credits

Be aware that all Notehub API calls made using the Notehub JS library utilize your account's Consumption Credits (CCs). For more information, please consult our pricing page .

note

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

Async/Await Syntax

If you'd like to use async/await syntax in any of the documented code examples below, add the async keyword to the outer function/mthod with the following implementation.

// add the async keyword to your outer function/method 

// sample code above stays the same 

try {
  data = await apiInstance.getRoutes(projectUID)
  console.log('API called successfully. Returned data: ' + JSON.stringify(data));
} catch (error) {
    console.error(error);
}

Real World Use Cases of Notehub JS Library

As this library gains adoptions, we'll continue to provide new links to repos where this library being used in real world projects.

Indoor Floor Level Tracker Project

If you'd like to see examples of this library being used in real-world applications, check out this indoor floor-level tracker project in the Blues App Accelerator repo on GitHub.

The files that deserve special attention are:

  • ServiceLocatorServer.ts - this file makes the variety of services composing the backend logic of the application discoverable to each other. For DRY-er code, the Notehub JS library's instances were created and passed to the various services that would require them to fetch and update data via the Notehub API. An instance of the Notehub JS client is created via const notehubJsClient = NotehubJs.ApiClient.instance, and passed to the getDataProvider() and getAttributeStore() services that will need to interact with the Notehub API to perform their duties.
  • NotehubDataProvider.ts - this file is responsible for fetching data from the Notehub API for the application to display. It calls the project API's getProjectFleetDevices() and getProjectEvents() methods, and the fleet API's getFleetEnvironmentVariables() method as well.
  • NotehubAttributeStore.ts - this file sends updates to the Notehub API from the application like updated device name or updated environment variables. It calls two of the environment variable API's methods: putDeviceEnvironmentVariables() and putFleetEnvironmentVariables().

Authorization API

MethodHTTP requestDescription
loginPOST /auth/login

This is the only Notehub API call that does not require some form of authentication token, and it is used to generate the token which can then be used for almost all subsequent API requests.

login

Gets a session token from the API from a username and password.

Example

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

let apiInstance = new NotehubJs.AuthorizationApi();
let loginRequest = {"username":"name@example.com","password":"test-password"}; // LoginRequest | 
apiInstance.login(loginRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
loginRequestLoginRequest

Authorization

No authorization required

Billing Account API

MethodHTTP requestDescription
getBillingAccountsGET /v1/billing-accounts

getBillingAccounts

Get Billing Accounts accessible by the api_key

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

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

Successful 200 getBillingAccounts response

Authorization

api_key

Device API

MethodHTTP requestDescription
deleteDeviceEnvironmentVariableDELETE /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables/{key}
deleteDeviceFleetsDELETE /v1/projects/{projectUID}/devices/{deviceUID}/fleets
disableDevicePOST /v1/projects/{projectUID}/devices/{deviceUID}/disable
enableDevicePOST /v1/projects/{projectUID}/devices/{deviceUID}/enable
getDeviceEnvironmentVariablesGET /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables
getDeviceEnvironmentVariablesByPinGET /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables_with_pin
getDeviceFleetsGET /v1/projects/{projectUID}/devices/{deviceUID}/fleets
getDeviceHealthLogGET /v1/projects/{projectUID}/devices/{deviceUID}/health-log
getDeviceLatestGET /v1/projects/{projectUID}/devices/{deviceUID}/latest
getDevicePublicKeyGET /v1/projects/{projectUID}/devices/{deviceUID}/public-key
getDeviceSessionsGET /v1/projects/{projectUID}/devices/{deviceUID}/sessions
handleNoteSignalPOST /v1/projects/{projectUID}/devices/{deviceUID}/signal
putDeviceEnvironmentVariablesPUT /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables
putDeviceEnvironmentVariablesByPinPUT /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables_with_pin
putDeviceFleetsPUT /v1/projects/{projectUID}/devices/{deviceUID}/fleets

deleteDeviceEnvironmentVariable

Delete environment variable of a device

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

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

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
keyStringThe environment variable key to delete.

Return type

Successful 200 deleteDeviceEnvironmentVariable response

Authorization

api_key

deleteDeviceFleets

Remove Device from Fleets

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let deleteDeviceFleetsRequest = new NotehubJs.DeleteDeviceFleetsRequest(); // DeleteDeviceFleetsRequest | 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
  .deleteDeviceFleets(projectUID, deviceUID, deleteDeviceFleetsRequest)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
deleteDeviceFleetsRequestDeleteDeviceFleetsRequestThe 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

Successful 200 deleteDeviceFleets response

Authorization

api_key

disableDevice

Disable Device

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.disableDevice(projectUID, deviceUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Return type

Successful 200 disableDevice response

Authorization

api_key

enableDevice

Enable Device

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.enableDevice(projectUID, deviceUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Return type

Successful 200 enableDevice response

Authorization

api_key

getDeviceEnvironmentVariables

Get environment variables of a device

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.getDeviceEnvironmentVariables(projectUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Return type

Successful 200 getDeviceEnvironmentVariables response

Authorization

api_key

getDeviceEnvironmentVariablesByPin

Get environment variables of a device with device pin authorization

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: pin
let pin = defaultClient.authentications["pin"];
pin.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.getDeviceEnvironmentVariablesByPin(projectUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Authorization

pin

getDeviceFleets

Get Device Fleets

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.getDeviceFleets(projectUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Return type

Successful 200 getDeviceFleets response

Authorization

api_key

getDeviceHealthLog

Get Device Health Log

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.getDeviceHealthLog(projectUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Return type

Successful 200 getDeviceHealthLog response

Authorization

api_key

getDeviceLatest

Get Device Latest Events

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.getDeviceLatest(projectUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Return type

Successful 200 getDeviceLatest response

Authorization

api_key

getDevicePublicKey

Get Device Public Key

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.getDevicePublicKey(projectUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Authorization

api_key

getDeviceSessions

Get Device Sessions

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
};
apiInstance.getDeviceSessions(projectUID, deviceUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
pageSizeNumber[optional][default to 50]
pageNumNumber[optional][default to 1]

Return type

Successful 200 getDeviceSessions response

Authorization

api_key

handleNoteSignal

Send a signal from Notehub to a Notecard.

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let body = new NotehubJs.Body(); // Body | Body or payload of singnal to be sent to the device
apiInstance.handleNoteSignal(projectUID, deviceUID, body).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
bodyBodyBody or payload of signal to be sent to the device

Authorization

api_key

putDeviceEnvironmentVariables

Put environment variables of a device

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let environmentVariables = new NotehubJs.EnvironmentVariables(); // EnvironmentVariables | Environment variables to be added to the device
apiInstance
  .putDeviceEnvironmentVariables(projectUID, deviceUID, environmentVariables)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
environmentVariablesEnvironmentVariablesEnvironment variables to be added to the device

Return type

Successful 200 putDeviceEnvironmentVariables response

Authorization

api_key

putDeviceEnvironmentVariablesByPin

Put environment variables of a device with device pin authorization

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: pin
let pin = defaultClient.authentications["pin"];
pin.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let environmentVariables = new NotehubJs.EnvironmentVariables(); // EnvironmentVariables | Environment variables to be added to the device
apiInstance
  .putDeviceEnvironmentVariablesByPin(
    projectUID,
    deviceUID,
    environmentVariables
  )
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
environmentVariablesEnvironmentVariablesEnvironment variables to be added to the device

Authorization

pin

putDeviceFleets

Add Device to Fleets

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DeviceApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let putDeviceFleetsRequest = new NotehubJs.PutDeviceFleetsRequest(); // PutDeviceFleetsRequest | 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.putDeviceFleets(projectUID, deviceUID, putDeviceFleetsRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
putDeviceFleetsRequestPutDeviceFleetsRequestThe 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

Successful 200 putDeviceFleets response

Authorization

api_key

Devices API

MethodHTTP requestDescription
deleteProjectDeviceDELETE /v1/projects/{projectUID}/devices/{deviceUID}
getDeviceGET /v1/projects/{projectUID}/devices/{deviceUID}
getProjectDevicePublicKeysGET /v1/projects/{projectUID}/devices/public-keys
getProjectDevicesGET /v1/projects/{projectUID}/devices
getProjectFleetDevicesGET /v1/projects/{projectUID}/fleets/{fleetUID}/devices

deleteProjectDevice

Delete Device

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DevicesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let purge = "false"; // String |
apiInstance.deleteProjectDevice(projectUID, deviceUID, purge).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
purgeString[default to 'false']

Return type

Successful 200 deleteProjectDevice response

Authorization

api_key

getDevice

Get Device

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DevicesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.getDevice(projectUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Return type

Successful 200 getDevice response

Authorization

api_key

getProjectDevicePublicKeys

Get Device Public Keys of a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DevicesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
};
apiInstance.getProjectDevicePublicKeys(projectUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
pageSizeNumber[optional][default to 50]
pageNumNumber[optional][default to 1]

Authorization

api_key

getProjectDevices

Get Devices of a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DevicesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
};
apiInstance.getProjectDevices(projectUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
pageSizeNumber[optional][default to 50]
pageNumNumber[optional][default to 1]

Return type

Successful 200 getProjectDevices response

Authorization

api_key

getProjectFleetDevices

Get Devices of a Fleet within a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.DevicesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
};
apiInstance.getProjectFleetDevices(projectUID, fleetUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString
pageSizeNumber[optional][default to 50]
pageNumNumber[optional][default to 1]

Return type

Successful 200 getProjectFleetDevices response

Authorization

api_key

Environment Variables API

MethodHTTP requestDescription
deleteDeviceEnvironmentVariableDELETE /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables/{key}
deleteFleetEnvironmentVariableDELETE /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables/{key}
deleteProjectEnvironmentVariableDELETE /v1/projects/{projectUID}/environment_variables/{key}
getDeviceEnvironmentVariablesGET /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables
getDeviceEnvironmentVariablesByPinGET /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables_with_pin
getFleetEnvironmentVariablesGET /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables
getProjectEnvironmentVariablesGET /v1/projects/{projectUID}/environment_variables
putDeviceEnvironmentVariablesPUT /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables
putDeviceEnvironmentVariablesByPinPUT /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables_with_pin
putFleetEnvironmentVariablesPUT /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables
putProjectEnvironmentVariablesPUT /v1/projects/{projectUID}/environment_variables

deleteDeviceEnvironmentVariable

Delete environment variable of a device

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.EnvironmentVariablesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let key = "key_example"; // String | The environment variable key to delete.
apiInstance.deleteDeviceEnvironmentVariable(projectUID, deviceUID, key).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
keyStringThe environment variable key to delete.

Return type

Successful 200 deleteDeviceEnvironmentVariable response

Authorization

api_key

deleteFleetEnvironmentVariable

Delete environment variables of a fleet

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.EnvironmentVariablesApi();
let projectUID = "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(projectUID, fleetUID, key).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString
keyStringThe environment variable key to delete.

Return type

Successful 200 deleteFleetEnvironmentVariable response

Authorization

api_key

deleteProjectEnvironmentVariable

Delete an environment variable of a project by key

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

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

Parameters

NameTypeDescriptionNotes
projectUIDString
keyStringThe environment variable key to delete.

Return type

Successful 200 deleteProjectEnvironmentVariable response

Authorization

api_key

getDeviceEnvironmentVariables

Get environment variables of a device

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.EnvironmentVariablesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.getDeviceEnvironmentVariables(projectUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Return type

Successful 200 getDeviceEnvironmentVariables response

Authorization

api_key

getDeviceEnvironmentVariablesByPin

Get environment variables of a device with device pin authorization

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: pin
let pin = defaultClient.authentications["pin"];
pin.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.EnvironmentVariablesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.getDeviceEnvironmentVariablesByPin(projectUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Authorization

pin

getFleetEnvironmentVariables

Get environment variables of a fleet

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

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

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString

Return type

Successful 200 getFleetEnvironmentVariables response

Authorization

api_key

getProjectEnvironmentVariables

Get environment variables of a project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

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

Parameters

NameTypeDescriptionNotes
projectUIDString

Return type

Successful 200 getProjectEnvironmentVariables response

Authorization

api_key

putDeviceEnvironmentVariables

Put environment variables of a device

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.EnvironmentVariablesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let environmentVariables = new NotehubJs.EnvironmentVariables(); // EnvironmentVariables | Environment variables to be added to the device
apiInstance
  .putDeviceEnvironmentVariables(projectUID, deviceUID, environmentVariables)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
environmentVariablesEnvironmentVariablesEnvironment variables to be added to the device

Return type

Successful 200 putDeviceEnvironmentVariables response

Authorization

api_key

putDeviceEnvironmentVariablesByPin

Put environment variables of a device with device pin authorization

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: pin
let pin = defaultClient.authentications["pin"];
pin.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.EnvironmentVariablesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let environmentVariables = new NotehubJs.EnvironmentVariables(); // EnvironmentVariables | Environment variables to be added to the device
apiInstance
  .putDeviceEnvironmentVariablesByPin(
    projectUID,
    deviceUID,
    environmentVariables
  )
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
environmentVariablesEnvironmentVariablesEnvironment variables to be added to the device

Authorization

pin

putFleetEnvironmentVariables

Put environment variables of a fleet

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.EnvironmentVariablesApi();
let projectUID = "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
  .putFleetEnvironmentVariables(projectUID, fleetUID, environmentVariables)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString
environmentVariablesEnvironmentVariablesEnvironment variables to be added to the fleet

Return type

Successful 200 putFleetEnvironmentVariables response

Authorization

api_key

putProjectEnvironmentVariables

Put environment variables of a project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.EnvironmentVariablesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let opts = {
  environmentVariables: new NotehubJs.EnvironmentVariables(), // EnvironmentVariables |
};
apiInstance.putProjectEnvironmentVariables(projectUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
environmentVariablesEnvironmentVariables[optional]

Return type

Successful 200 putProjectEnvironmentVariables response

Authorization

api_key

Event API

MethodHTTP requestDescription
getFleetEventsGET /v1/projects/{projectUID}/fleets/{fleetUID}/events
getFleetEventsByCursorGET /v1/projects/{projectUID}/fleets/{fleetUID}/events-cursor
getProjectEventsGET /v1/projects/{projectUID}/events
getProjectEventsByCursorGET /v1/projects/{projectUID}/events-cursor

getFleetEvents

Get Events of a Fleet

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.EventApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  deviceUIDs: ["null"], // [String] | A comma separated list of Device UIDs.
  sortBy: "captured", // String |
  sortOrder: "asc", // String |
  startDate: 1628631763, // Number | Unix timestamp
  endDate: 1657894210, // Number | Unix timestamp
};
apiInstance.getFleetEvents(projectUID, fleetUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString
pageSizeNumber[optional][default to 50]
pageNumNumber[optional][default to 1]
deviceUIDs[String]A comma separated list of Device UIDs.[optional]
sortByString[optional][default to 'captured']
sortOrderString[optional][default to 'asc']
startDateNumberUnix timestamp[optional]
endDateNumberUnix timestamp[optional]

Return type

Successful 200 getFleetEvents response

Authorization

api_key

getFleetEventsByCursor

Get Events of a Fleet by cursor

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.EventApi();
let projectUID = "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 |
};
apiInstance.getFleetEventsByCursor(projectUID, fleetUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
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']

Return type

Successful 200 getFleetEventsByCursor response

Authorization

api_key

getProjectEvents

Get Events of a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.EventApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  deviceUIDs: ["null"], // [String] | A comma separated list of Device UIDs.
  sortBy: "captured", // String |
  sortOrder: "asc", // String |
  startDate: 1628631763, // Number | Unix timestamp
  endDate: 1657894210, // Number | Unix timestamp
};
apiInstance.getProjectEvents(projectUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
pageSizeNumber[optional][default to 50]
pageNumNumber[optional][default to 1]
deviceUIDs[String]A comma separated list of Device UIDs.[optional]
sortByString[optional][default to 'captured']
sortOrderString[optional][default to 'asc']
startDateNumberUnix timestamp[optional]
endDateNumberUnix timestamp[optional]

Return type

Successful 200 getProjectEvents response

Authorization

api_key

getProjectEventsByCursor

Get Events of a Project by cursor

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.EventApi();
let projectUID = "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 |
};
apiInstance.getProjectEventsByCursor(projectUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
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']

Return type

Successful 200 getProjectEventsByCursor response

Authorization

api_key

Files API

MethodHTTP requestDescription
handleNotefileChangesGET /v1/projects/{projectUID}/devices/{deviceUID}/files/changes
handleNotefileChangesPendingGET /v1/projects/{projectUID}/devices/{deviceUID}/files/changes/pending
handleNotefileDeleteDELETE /v1/projects/{projectUID}/devices/{deviceUID}/files

handleNotefileChanges

Used to perform queries on a single or multiple files to determine if new Notes are available to read

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FilesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let opts = {
  tracker: "tracker_example", // String | The change tracker ID.
  files: ["null"], // [String] | One or more files to obtain change information from.
};
apiInstance.handleNotefileChanges(projectUID, deviceUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
trackerStringThe change tracker ID.[optional]
files[String]One or more files to obtain change information from.[optional]

Return type

Successful 200 handleNotefileChanges response

Authorization

api_key

handleNotefileChangesPending

Returns info about file changes that are pending upload to Notehub or download to the Notecard.

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FilesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.handleNotefileChangesPending(projectUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Return type

Successful 200 handleNotefileChangesPending response

Authorization

api_key

handleNotefileDelete

Deletes Notefiles and the Notes they contain.

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FilesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let handleNotefileDeleteRequest = new NotehubJs.HandleNotefileDeleteRequest(); // HandleNotefileDeleteRequest |
apiInstance
  .handleNotefileDelete(projectUID, deviceUID, handleNotefileDeleteRequest)
  .then(
    () => {
      console.log("API called successfully.");
    },
    (error) => {
      console.error(error);
    }
  );

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
handleNotefileDeleteRequestHandleNotefileDeleteRequest

Return type

Successful 200 handleNotefileDelete response

Authorization

api_key

Fleet API

MethodHTTP requestDescription
createFleetPOST /v1/projects/{projectUID}/fleets
deleteDeviceFleetsDELETE /v1/projects/{projectUID}/devices/{deviceUID}/fleets
deleteFleetDELETE /v1/projects/{projectUID}/fleets/{fleetUID}
deleteFleetEnvironmentVariableDELETE /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables/{key}
getDeviceFleetsGET /v1/projects/{projectUID}/devices/{deviceUID}/fleets
getFleetEnvironmentVariablesGET /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables
getFleetEventsGET /v1/projects/{projectUID}/fleets/{fleetUID}/events
getFleetEventsByCursorGET /v1/projects/{projectUID}/fleets/{fleetUID}/events-cursor
getProjectFleetDevicesGET /v1/projects/{projectUID}/fleets/{fleetUID}/devices
getProjectFleetsGET /v1/projects/{projectUID}/fleets
putDeviceFleetsPUT /v1/projects/{projectUID}/devices/{deviceUID}/fleets
putFleetEnvironmentVariablesPUT /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables
updateFleetPUT /v1/projects/{projectUID}/fleets/{fleetUID}

createFleet

Create Fleet

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

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

Parameters

NameTypeDescriptionNotes
projectUIDString
createFleetRequestCreateFleetRequestFleet to be added

Return type

Successful 200 createFleet response

Authorization

api_key

deleteDeviceFleets

Remove Device from Fleets

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FleetApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let deleteDeviceFleetsRequest = new NotehubJs.DeleteDeviceFleetsRequest(); // DeleteDeviceFleetsRequest | 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
  .deleteDeviceFleets(projectUID, deviceUID, deleteDeviceFleetsRequest)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
deleteDeviceFleetsRequestDeleteDeviceFleetsRequestThe 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

Successful 200 deleteDeviceFleets response

Authorization

api_key

deleteFleet

Delete Fleet

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FleetApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
apiInstance.deleteFleet(projectUID, fleetUID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString

Return type

Successful 200 deleteFleet response

Authorization

api_key

deleteFleetEnvironmentVariable

Delete environment variables of a fleet

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FleetApi();
let projectUID = "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(projectUID, fleetUID, key).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString
keyStringThe environment variable key to delete.

Return type

Successful 200 deleteFleetEnvironmentVariable response

Authorization

api_key

getDeviceFleets

Get Device Fleets

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FleetApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
apiInstance.getDeviceFleets(projectUID, deviceUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString

Return type

Successful 200 getDeviceFleets response

Authorization

api_key

getFleetEnvironmentVariables

Get environment variables of a fleet

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

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

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString

Return type

Successful 200 getFleetEnvironmentVariables response

Authorization

api_key

getFleetEvents

Get Events of a Fleet

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FleetApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
  deviceUIDs: ["null"], // [String] | A comma separated list of Device UIDs.
  sortBy: "captured", // String |
  sortOrder: "asc", // String |
  startDate: 1628631763, // Number | Unix timestamp
  endDate: 1657894210, // Number | Unix timestamp
};
apiInstance.getFleetEvents(projectUID, fleetUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString
pageSizeNumber[optional][default to 50]
pageNumNumber[optional][default to 1]
deviceUIDs[String]A comma separated list of Device UIDs.[optional]
sortByString[optional][default to 'captured']
sortOrderString[optional][default to 'asc']
startDateNumberUnix timestamp[optional]
endDateNumberUnix timestamp[optional]

Return type

Successful 200 getFleetEvents response

Authorization

api_key

getFleetEventsByCursor

Get Events of a Fleet by cursor

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FleetApi();
let projectUID = "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 |
};
apiInstance.getFleetEventsByCursor(projectUID, fleetUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
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']

Return type

Successful 200 getFleetEventsByCursor response

Authorization

api_key

getProjectFleetDevices

Get Devices of a Fleet within a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FleetApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let fleetUID = "fleetUID_example"; // String |
let opts = {
  pageSize: 50, // Number |
  pageNum: 1, // Number |
};
apiInstance.getProjectFleetDevices(projectUID, fleetUID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString
pageSizeNumber[optional][default to 50]
pageNumNumber[optional][default to 1]

Return type

Successful 200 getProjectFleetDevices response

Authorization

api_key

getProjectFleets

Get Project Fleets

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FleetApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
apiInstance.getProjectFleets(projectUID).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString

Return type

Successful 200 getProjectFleets response

Authorization

api_key

putDeviceFleets

Add Device to Fleets

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FleetApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let putDeviceFleetsRequest = new NotehubJs.PutDeviceFleetsRequest(); // PutDeviceFleetsRequest | 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.putDeviceFleets(projectUID, deviceUID, putDeviceFleetsRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
putDeviceFleetsRequestPutDeviceFleetsRequestThe 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

Successful 200 putDeviceFleets response

Authorization

api_key

putFleetEnvironmentVariables

Put environment variables of a fleet

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.FleetApi();
let projectUID = "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
  .putFleetEnvironmentVariables(projectUID, fleetUID, environmentVariables)
  .then(
    (data) => {
      console.log(
        "API called successfully. Returned data: " + JSON.stringify(data)
      );
    },
    (error) => {
      console.error(error);
    }
  );

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString
environmentVariablesEnvironmentVariablesEnvironment variables to be added to the fleet

Return type

Successful 200 putFleetEnvironmentVariables response

Authorization

api_key

updateFleet

Update Fleet

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

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

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString
updateFleetRequestUpdateFleetRequestFleet details to update

Return type

Successful 200 updateFleet response

Authorization

api_key

Notes API

MethodHTTP requestDescription
handleNoteAddPOST /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}
handleNoteChangesGET /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/changes
handleNoteCreateAddPOST /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
handleNoteDeleteDELETE /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
handleNoteGetGET /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
handleNoteUpdatePUT /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}

The note requests enable the quick creation and management of Notes in Notefiles.

handleNoteAdd

Adds a Note to a Notefile.

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.NotesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let notefileID = "notefileID_example"; // String |
let note = new NotehubJs.Note(); // Note | Body or payload of note to be added to the device
apiInstance.handleNoteAdd(projectUID, deviceUID, notefileID, note).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
notefileIDString
noteNoteBody or payload of note to be added to the device

Return type

Successful 200 handleNoteAdd response

Authorization

api_key

handleNoteChanges

Incrementally retrieve changes within a specific Notefile.

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.NotesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let notefileID = "notefileID_example"; // String |
let opts = {
  tracker: "tracker_example", // String | The change tracker ID.
  max: 56, // Number | The maximum number of Notes to return in the request.
  start: true, // Boolean | true to reset the tracker to the beginning.
  stop: true, // Boolean | true to delete the tracker.
  deleted: true, // Boolean | true to return deleted notes.
  _delete: true, // Boolean | true to delete the notes returned by the request.
};
apiInstance.handleNoteChanges(projectUID, deviceUID, notefileID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
notefileIDString
trackerStringThe change tracker ID.[optional]
maxNumberThe maximum number of Notes to return in the request.[optional]
startBooleantrue to reset the tracker to the beginning.[optional]
stopBooleantrue to delete the tracker.[optional]
deletedBooleantrue to return deleted notes.[optional]
_deleteBooleantrue to delete the notes returned by the request.[optional]

Return type

Successful 200 handleNoteChanges response

Authorization

api_key

handleNoteCreateAdd

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;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.NotesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let notefileID = "notefileID_example"; // String |
let noteID = "noteID_example"; // String |
let note = new NotehubJs.Note(); // Note | Body or payload of note to be added to the device
apiInstance
  .handleNoteCreateAdd(projectUID, deviceUID, notefileID, noteID, note)
  .then(
    () => {
      console.log("API called successfully.");
    },
    (error) => {
      console.error(error);
    }
  );

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
notefileIDString
noteIDString
noteNoteBody or payload of note to be added to the device

Return type

Successful 200 handleNoteCreateAdd response

Authorization

api_key

handleNoteDelete

Delete a note from a DB notefile

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.NotesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let notefileID = "notefileID_example"; // String |
let noteID = "noteID_example"; // String |
apiInstance.handleNoteDelete(projectUID, deviceUID, notefileID, noteID).then(
  () => {
    console.log("API called successfully.");
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
notefileIDString
noteIDString

Return type

Successful 200 handleNoteDelete response

Authorization

api_key

handleNoteGet

Get a note from a DB notefile

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.NotesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // 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.handleNoteGet(projectUID, deviceUID, notefileID, noteID, opts).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
notefileIDString
noteIDString
_deleteBooleanWhether to delete the note from the DB notefile[optional]
deletedBooleanWhether to return deleted notes[optional]

Return type

Successful 200 handleNoteGet response

Authorization

api_key

handleNoteUpdate

Update a note in a DB notefile

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.NotesApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String |
let deviceUID = "deviceUID_example"; // String |
let notefileID = "notefileID_example"; // String |
let noteID = "noteID_example"; // String |
let note = new NotehubJs.Note(); // Note | Body or payload of note to be added to the device
apiInstance
  .handleNoteUpdate(projectUID, deviceUID, notefileID, noteID, note)
  .then(
    () => {
      console.log("API called successfully.");
    },
    (error) => {
      console.error(error);
    }
  );

Parameters

NameTypeDescriptionNotes
projectUIDString
deviceUIDString
notefileIDString
noteIDString
noteNoteBody or payload of note to be added to the device

Return type

Successful 200 handleNoteUpdate response

Authorization

api_key

Product API

MethodHTTP requestDescription
createProductPOST /v1/projects/{projectUID}/products
getProjectByProductGET /v1/products/{productUID}/project
getProjectProductsGET /v1/projects/{projectUID}/products

createProduct

Create Product within a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Parameters

NameTypeDescriptionNotes
projectUIDString
createProductRequestCreateProductRequestProduct to be created

Return type

Successful 200 createProduct response

Authorization

api_key

getProjectByProduct

Get a Project by ProductUID

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

let apiInstance = new NotehubJs.ProductApi();
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

Successful 200 getProjectByProduct response

Authorization

api_key

getProjectProducts

Get Products within a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

let apiInstance = new NotehubJs.ProductApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String | 
apiInstance.getProjectProducts(projectUID).then((data) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
  console.error(error);
});

Parameters

NameTypeDescriptionNotes
projectUIDString

Return type

Successful 200 getProjectProducts response

Authorization

api_key

Project API

MethodHTTP requestDescription
createProductPOST /v1/projects/{projectUID}/products
createProjectPOST /v1/projects
deleteProjectEnvironmentVariableDELETE /v1/projects/{projectUID}/environment_variables/{key}
getProjectGET /v1/projects/{projectUID}
getProjectByProductGET /v1/products/{productUID}/project
getProjectDevicePublicKeysGET /v1/projects/{projectUID}/devices/public-keys
getProjectDevicesGET /v1/projects/{projectUID}/devices
getProjectEnvironmentVariablesGET /v1/projects/{projectUID}/environment_variables
getProjectEventsGET /v1/projects/{projectUID}/events
getProjectEventsByCursorGET /v1/projects/{projectUID}/events-cursor
getProjectFleetDevicesGET /v1/projects/{projectUID}/fleets/{fleetUID}/devices
getProjectMembersGET /v1/projects/{projectUID}/members
getProjectProductsGET /v1/projects/{projectUID}/products
getProjectsGET /v1/projects
putProjectEnvironmentVariablesPUT /v1/projects/{projectUID}/environment_variables

createProduct

Create Product within a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Parameters

NameTypeDescriptionNotes
projectUIDString
createProductRequestCreateProductRequestProduct to be created

Return type

Successful 200 createProduct response

Authorization

api_key

createProject

Create a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Successful 200 createProject response

Authorization

api_key

deleteProjectEnvironmentVariable

Delete an environment variable of a project by key

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Parameters

NameTypeDescriptionNotes
projectUIDString
keyStringThe environment variable key to delete.

Return type

Successful 200 deleteProjectEnvironmentVariable response

Authorization

api_key

getProject

Get a Project by ProjectUID

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Parameters

NameTypeDescriptionNotes
projectUIDString

Return type

Successful 200 getProject response

Authorization

api_key

getProjectByProduct

Get a Project by ProductUID

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Successful 200 getProjectByProduct response

Authorization

api_key

getProjectDevicePublicKeys

Get Device Public Keys of a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

let apiInstance = new NotehubJs.ProjectApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String | 
let opts = {
  'pageSize': 50, // Number | 
  'pageNum': 1 // Number | 
};
apiInstance.getProjectDevicePublicKeys(projectUID, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
  console.error(error);
});

Parameters

NameTypeDescriptionNotes
projectUIDString
pageSizeNumber[optional][default to 50]
pageNumNumber[optional][default to 1]

Authorization

api_key

getProjectDevices

Get Devices of a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

let apiInstance = new NotehubJs.ProjectApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String | 
let opts = {
  'pageSize': 50, // Number | 
  'pageNum': 1 // Number | 
};
apiInstance.getProjectDevices(projectUID, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
  console.error(error);
});

Parameters

NameTypeDescriptionNotes
projectUIDString
pageSizeNumber[optional][default to 50]
pageNumNumber[optional][default to 1]

Return type

Successful 200 getProjectDevices response

Authorization

api_key

getProjectEnvironmentVariables

Get environment variables of a project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Parameters

NameTypeDescriptionNotes
projectUIDString

Return type

Successful 200 getProjectEnvironmentVariables response

Authorization

api_key

getProjectEvents

Get Events of a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

let apiInstance = new NotehubJs.ProjectApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String | 
let opts = {
  'pageSize': 50, // Number | 
  'pageNum': 1, // Number | 
  'deviceUIDs': ["null"], // [String] | A comma separated list of Device UIDs.
  'sortBy': "'captured'", // String | 
  'sortOrder': "'asc'", // String | 
  'startDate': 1628631763, // Number | Unix timestamp
  'endDate': 1657894210 // Number | Unix timestamp
};
apiInstance.getProjectEvents(projectUID, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
  console.error(error);
});

Parameters

NameTypeDescriptionNotes
projectUIDString
pageSizeNumber[optional][default to 50]
pageNumNumber[optional][default to 1]
deviceUIDs[String]A comma separated list of Device UIDs.[optional]
sortByString[optional][default to 'captured']
sortOrderString[optional][default to 'asc']
startDateNumberUnix timestamp[optional]
endDateNumberUnix timestamp[optional]

Return type

Successful 200 getProjectEvents response

Authorization

api_key

getProjectEventsByCursor

Get Events of a Project by cursor

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

let apiInstance = new NotehubJs.ProjectApi();
let projectUID = "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 | 
};
apiInstance.getProjectEventsByCursor(projectUID, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
  console.error(error);
});

Parameters

NameTypeDescriptionNotes
projectUIDString
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']

Return type

Successful 200 getProjectEvents response

Authorization

api_key

getProjectFleetDevices

Get Devices of a Fleet within a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

let apiInstance = new NotehubJs.ProjectApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String | 
let fleetUID = "fleetUID_example"; // String | 
let opts = {
  'pageSize': 50, // Number | 
  'pageNum': 1 // Number | 
};
apiInstance.getProjectFleetDevices(projectUID, fleetUID, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
  console.error(error);
});

Parameters

NameTypeDescriptionNotes
projectUIDString
fleetUIDString
pageSizeNumber[optional][default to 50]
pageNumNumber[optional][default to 1]

Return type

Successful 200 getProjectFleetDevices response

Authorization

api_key

getProjectMembers

Get Project Members

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Parameters

NameTypeDescriptionNotes
projectUIDString

Return type

Successful 200 getProjectMembers response

Authorization

api_key

getProjectProducts

Get Products within a Project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Parameters

NameTypeDescriptionNotes
projectUIDString

Return type

Successful 200 getProjectProducts response

Authorization

api_key

getProjects

Get Projects accessible by the api_key

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Successful 200 getProjects response

Authorization

api_key

putProjectEnvironmentVariables

Put environment variables of a project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

let apiInstance = new NotehubJs.ProjectApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String | 
let opts = {
  'environmentVariables': new NotehubJs.EnvironmentVariables() // EnvironmentVariables | 
};
apiInstance.putProjectEnvironmentVariables(projectUID, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
  console.error(error);
});

Parameters

NameTypeDescriptionNotes
projectUIDString
environmentVariablesEnvironmentVariables[optional]

Return type

Successful 200 putProjectEnvironmentVariables response

Authorization

api_key

Route API

MethodHTTP requestDescription
createRoutePOST /v1/projects/{projectUID}/routes
deleteRouteDELETE /v1/projects/{projectUID}/routes/{routeUID}
getRouteGET /v1/projects/{projectUID}/routes/{routeUID}
getRoutesGET /v1/projects/{projectUID}/routes
updateRoutePUT /v1/projects/{projectUID}/routes/{routeUID}

createRoute

Create Route within a Project.

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

let apiInstance = new NotehubJs.RouteApi();
let projectUID = "app:2606f411-dea6-44a0-9743-1130f57d77d8"; // String | 
let route = {"label":"Route Label","type":"http","http":{"fleets":["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"],"throttle_ms":100,"url":"http://route.url"}}; // Route | Route to be Created
apiInstance.createRoute(projectUID, route).then((data) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
  console.error(error);
});

Parameters

NameTypeDescriptionNotes
projectUIDString
routeRoute Route to be Created

Return type

Successful 200 createRoute response

Authorization

api_key

deleteRoute

Delete single route within a project

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Parameters

NameTypeDescriptionNotes
projectUIDString
routeUIDString

Return type

Successful 200 deleteRoute response

Authorization

api_key

getRoute

Get single route within a project.

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Parameters

NameTypeDescriptionNotes
projectUIDString
routeUIDString

Return type

Successful 200 getRoute response

Authorization

api_key

getRoutes

Get all Routes within a Project.

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Parameters

NameTypeDescriptionNotes
projectUIDString

Return type

Successful 200 getRoutes response

Authorization

api_key

updateRoute

Update route by UID

Example

import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

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

Parameters

NameTypeDescriptionNotes
projectUIDString
routeUIDString
routeRouteRoute settings to be updated

Return type

Successful 200 updateRoute response

Authorization

api_key