All URIs are relative to https://api.notefile.net
Method | HTTP request | Description |
---|---|---|
createRoute | POST /v1/projects/{projectUID}/routes | |
deleteRoute | DELETE /v1/projects/{projectUID}/routes/{routeUID} | |
getRoute | GET /v1/projects/{projectUID}/routes/{routeUID} | |
getRouteLogsByRoute | GET /v1/projects/{projectUID}/routes/{routeUID}/route-logs | |
getRoutes | GET /v1/projects/{projectUID}/routes | |
updateRoute | PUT /v1/projects/{projectUID}/routes/{routeUID} |
NotehubRoute createRoute(projectUID, notehubRoute)
Create Route within a Project
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 notehubRoute = {
"label": "Route Label",
"type":"http",
"http": {
"fleets": ["fleet:1042ddc5-3b2c-4cec-b1fb-d3040538094d"],
"throttle_ms": 100,
"url": "http://route.url"
}
}
; // NotehubRoute | Route to be Created
apiInstance.createRoute(projectUID, notehubRoute).then((data) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
projectUID | String | ||
notehubRoute | NotehubRoute | Route to be Created |
- Content-Type: application/json
- Accept: application/json
Object deleteRoute(projectUID, routeUID)
Delete single route within a project
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);
});
Name | Type | Description | Notes |
---|---|---|---|
projectUID | String | ||
routeUID | String |
Object
- Content-Type: Not defined
- Accept: application/json
NotehubRoute getRoute(projectUID, routeUID)
Get single route within a project
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);
});
Name | Type | Description | Notes |
---|---|---|---|
projectUID | String | ||
routeUID | String |
- Content-Type: Not defined
- Accept: application/json
[GetRouteLogsByRoute200ResponseInner] getRouteLogsByRoute(projectUID, routeUID, opts)
Get Route Logs by Route UID
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 opts = {
'pageSize': 50, // Number |
'pageNum': 1, // Number |
'deviceUID': ["null"], // [String] | A Device UID.
'sortBy': "'captured'", // String |
'sortOrder': "'asc'", // String |
'startDate': 1628631763, // Number | Unix timestamp
'endDate': 1657894210, // Number | Unix timestamp
'systemFilesOnly': true, // Boolean |
'files': _health.qo, data.qo // String |
};
apiInstance.getRouteLogsByRoute(projectUID, routeUID, opts).then((data) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
projectUID | String | ||
routeUID | String | ||
pageSize | Number | [optional] [default to 50] | |
pageNum | Number | [optional] [default to 1] | |
deviceUID | [String] | A Device UID. | [optional] |
sortBy | String | [optional] [default to 'captured'] | |
sortOrder | String | [optional] [default to 'asc'] | |
startDate | Number | Unix timestamp | [optional] |
endDate | Number | Unix timestamp | [optional] |
systemFilesOnly | Boolean | [optional] | |
files | String | [optional] |
[GetRouteLogsByRoute200ResponseInner]
- Content-Type: Not defined
- Accept: application/json
[UserDbRoute] getRoutes(projectUID)
Get all Routes within a Project
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);
});
Name | Type | Description | Notes |
---|---|---|---|
projectUID | String |
- Content-Type: Not defined
- Accept: application/json
NotehubRoute updateRoute(projectUID, routeUID, notehubRoute)
Update route by UID
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 notehubRoute = {
"http" {
"filter": {
"type": "include",
"system_notefiles": true,
"files": ["somefile.qo"],
},
"throttle_ms": 50,
"url": "http://new-route.url",
},
}
; // NotehubRoute | Route settings to be updated
apiInstance.updateRoute(projectUID, routeUID, notehubRoute).then((data) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
projectUID | String | ||
routeUID | String | ||
notehubRoute | NotehubRoute | Route settings to be updated |
- Content-Type: application/json
- Accept: application/json