Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions plugins/N-Central/v1/configValidation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"steps": [
{
"displayName": "Authenticate",
"dataStream": { "name": "serverInfoAuthenticated" },
"required": true,
"error": "Could not authenticate with N-central. Check the Base URL and User-API Token are correct and that the token hasn't expired.",
"success": "Connected successfully."
}
]
}
30 changes: 30 additions & 0 deletions plugins/N-Central/v1/custom_types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[
{
"name": "N-central Service Organization",
"sourceType": "N-central Service Organization",
"icon": "building",
"singular": "Service Organization",
"plural": "Service Organizations"
},
{
"name": "N-central Customer",
"sourceType": "N-central Customer",
"icon": "briefcase",
"singular": "Customer",
"plural": "Customers"
},
{
"name": "N-central Site",
"sourceType": "N-central Site",
"icon": "location-dot",
"singular": "Site",
"plural": "Sites"
},
{
"name": "N-central Device",
"sourceType": "N-central Device",
"icon": "microchip",
"singular": "Device",
"plural": "Devices"
}
]
58 changes: 58 additions & 0 deletions plugins/N-Central/v1/dataStreams/customerActiveIssues.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "customerActiveIssues",
"displayName": "Customer Active Issues",
"description": "Currently active issues and alerts for a customer",
"tags": ["Customer", "Alerts"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "api/org-units/{{object.rawId}}/active-issues",
"pathToData": "data",
"expandInnerObjects": true,
"paging": {
"mode": "offset",
"pageSize": { "realm": "queryArg", "path": "pageSize", "value": "200" },
"offset": {
"mode": "page",
"rowCountIn": { "realm": "payloadArraySize", "path": "data" },
"base": 1
},
"out": { "realm": "queryArg", "path": "pageNumber" }
}
},
"matches": { "sourceType": { "type": "oneOf", "values": ["N-central Customer"] } },
"metadata": [
{ "name": "orgUnitId", "shape": "number", "visible": false },
{ "name": "deviceId", "shape": "number", "visible": false },
{
"name": "_extra.deviceName",
"displayName": "Device",
"shape": "string",
"role": "label",
"sourceId": "deviceId",
"sourceType": "N-central Device"
},
{ "name": "serviceName", "displayName": "Service", "shape": "string" },
{ "name": "serviceType", "displayName": "Service Type", "shape": "string" },
{ "name": "notificationState", "displayName": "Notification State", "shape": "number" },
{
"name": "_extra.transitionTime",
"displayName": "Since",
"shape": "date",
"role": "timestamp"
},
{ "name": "_extra.licenseMode", "displayName": "License Mode", "shape": "string" },
{
"name": "_extra.remoteControllable",
"displayName": "Remote Controllable",
"shape": "boolean"
},
{ "name": "serviceId", "shape": "number", "visible": false },
{ "name": "taskId", "shape": "number", "visible": false },
{ "name": "serviceItemId", "shape": "number", "visible": false },
{ "name": "_extra.customerTree.0", "shape": "string", "visible": false },
{ "name": "_extra.customerTree.1", "shape": "string", "visible": false },
{ "name": "_extra.customerTree.2", "shape": "string", "visible": false }
],
"timeframes": false
}
26 changes: 26 additions & 0 deletions plugins/N-Central/v1/dataStreams/customers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "customers",
"displayName": "Customers",
"description": "Customers, one row per customer",
"tags": ["Organization"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "api/customers",
"pathToData": "data",
"paging": {
"mode": "offset",
"pageSize": { "realm": "queryArg", "path": "pageSize", "value": "200" },
"offset": {
"mode": "page",
"rowCountIn": { "realm": "payloadArraySize", "path": "data" },
"base": 1
},
"out": { "realm": "queryArg", "path": "pageNumber" }
}
},
"matches": "none",
"metadata": [{ "pattern": ".*" }],
"timeframes": false,
"visibility": { "type": "hidden" }
}
20 changes: 20 additions & 0 deletions plugins/N-Central/v1/dataStreams/deviceAssets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "deviceAssets",
"displayName": "Device Assets",
"description": "Hardware and software inventory for a device",
"tags": ["Device", "Inventory"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "api/devices/{{object.rawId}}/assets",
"postRequestScript": "deviceAssets.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["N-central Device"] } },
"metadata": [
{ "name": "category", "displayName": "Category", "shape": "string" },
{ "name": "name", "displayName": "Name", "shape": "string", "role": "label" },
{ "name": "id", "displayName": "ID", "shape": "string", "role": "id", "visible": false },
{ "pattern": ".*" }
],
"timeframes": false
}
25 changes: 25 additions & 0 deletions plugins/N-Central/v1/dataStreams/deviceLifecycleInfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "deviceLifecycleInfo",
"displayName": "Device Lifecycle Info",
"description": "Warranty, lease, and hardware replacement details for a device",
"tags": ["Device", "Inventory"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "api/devices/{{object.rawId}}/assets/lifecycle-info"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["N-central Device"] } },
"metadata": [
{ "name": "warrantyExpiryDate", "displayName": "Warranty Expiry Date", "shape": "date" },
{ "name": "leaseExpiryDate", "displayName": "Lease Expiry Date", "shape": "date" },
{ "name": "expectedReplacementDate", "displayName": "Expected Replacement Date", "shape": "date" },
{ "name": "purchaseDate", "displayName": "Purchase Date", "shape": "date" },
{ "name": "cost", "displayName": "Cost", "shape": ["number", { "decimalPlaces": 2 }] },
{ "name": "location", "displayName": "Location", "shape": "string" },
{ "name": "assetTag", "displayName": "Asset Tag", "shape": "string" },
{ "name": "description", "displayName": "Description", "shape": "string" },
{ "name": "updateWarrantyError", "displayName": "Update Warranty Error", "shape": "string" },
{ "pattern": ".*" }
],
"timeframes": false
}
62 changes: 62 additions & 0 deletions plugins/N-Central/v1/dataStreams/deviceList.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "deviceList",
"displayName": "Devices",
"description": "Managed devices, optionally filtered to a customer or site, one row per device",
"tags": ["Customer", "Site", "Device"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "{{ (typeof site !== 'undefined' && site && site.length) ? 'api/org-units/' + (Array.isArray(site[0].rawId) ? site[0].rawId[0] : site[0].rawId) + '/devices' : ((typeof customer !== 'undefined' && customer && customer.length) ? 'api/org-units/' + (Array.isArray(customer[0].rawId) ? customer[0].rawId[0] : customer[0].rawId) + '/devices' : 'api/devices') }}",
"pathToData": "data",
"paging": {
"mode": "offset",
"pageSize": { "realm": "queryArg", "path": "pageSize", "value": "100" },
"offset": {
"mode": "page",
"rowCountIn": { "realm": "payloadArraySize", "path": "data" },
"base": 1
},
"out": { "realm": "queryArg", "path": "pageNumber" }
}
},
"matches": "none",
"ui": [
{
"type": "objects",
"name": "customer",
"label": "Customer (optional)",
"objectLimit": 1,
"matches": {
"sourceType": { "type": "oneOf", "values": ["N-central Customer"] }
}
},
{
"type": "objects",
"name": "site",
"label": "Site (optional)",
"objectLimit": 1,
"matches": {
"sourceType": { "type": "oneOf", "values": ["N-central Site"] }
}
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
],
"metadata": [
{
"name": "longName",
"displayName": "Device",
"shape": "string",
"role": "label",
"sourceId": "deviceId",
"sourceType": "N-central Device"
},
{ "name": "deviceId", "shape": "number", "visible": false },
{ "name": "deviceClass", "displayName": "Device Class", "shape": "string" },
{ "name": "supportedOs", "displayName": "OS", "shape": "string" },
{ "name": "isProbe", "displayName": "Probe", "shape": "boolean" },
{ "name": "licenseMode", "displayName": "License Mode", "shape": "string" },
{ "name": "customerId", "shape": "number", "visible": false },
{ "name": "siteId", "shape": "number", "visible": false },
{ "pattern": ".*" }
],
"timeframes": false
}
47 changes: 47 additions & 0 deletions plugins/N-Central/v1/dataStreams/deviceServiceMonitorStatus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "deviceServiceMonitorStatus",
"displayName": "Device Service Monitor Status",
"description": "Current service monitor health status for a device",
"tags": ["Device", "Monitoring"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "api/devices/{{object.rawId}}/service-monitor-status",
"pathToData": "data"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["N-central Device"] } },
"metadata": [
{ "name": "moduleName", "displayName": "Service", "shape": "string", "role": "label" },
{ "name": "taskIdent", "displayName": "Instance", "shape": "string" },
{
"name": "stateStatus",
"displayName": "Status",
"shape": [
"state",
{
"map": {
"success": ["Normal"],
"warning": ["Misconfigured", "Stale", "Warning"],
"error": ["Failed"],
"unmonitored": ["Disabled", "Unmanaged"]
}
}
]
},
{ "name": "taskNote", "displayName": "Template", "shape": "string" },
{
"name": "lastScanTime",
"displayName": "Last Scan",
"shape": ["date", { "inputPattern": "yyyy-MM-dd HH:mm:ss.SSS xx" }]
},
{ "name": "transitionTime", "displayName": "Status Changed", "shape": "date" },
{ "name": "timeToStale", "displayName": "Time to Stale (s)", "shape": "seconds" },
{ "name": "applianceName", "displayName": "Probe", "shape": "string" },
{ "name": "isManagedTask", "displayName": "Managed", "shape": "boolean" },
{ "name": "taskId", "displayName": "Task ID", "shape": "string", "role": "id", "visible": false },
{ "name": "serviceId", "displayName": "Service ID", "shape": "string", "visible": false },
{ "name": "serviceItemId", "displayName": "Service Item ID", "shape": "string", "visible": false },
{ "name": "applianceId", "displayName": "Appliance ID", "shape": "string", "visible": false }
],
"timeframes": false
}
26 changes: 26 additions & 0 deletions plugins/N-Central/v1/dataStreams/devices.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "devices",
"displayName": "Devices",
"description": "Managed devices, one row per device",
"tags": ["Device"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "api/devices",
"pathToData": "data",
"paging": {
"mode": "offset",
"pageSize": { "realm": "queryArg", "path": "pageSize", "value": "100" },
"offset": {
"mode": "page",
"rowCountIn": { "realm": "payloadArraySize", "path": "data" },
"base": 1
},
"out": { "realm": "queryArg", "path": "pageNumber" }
}
},
"matches": "none",
"metadata": [{ "pattern": ".*" }],
"timeframes": false,
"visibility": { "type": "hidden" }
}
Loading