Device Management APIs Overview

The Device Management APIs enable you to retrieve comprehensive information about devices across your N-central environment. Through these endpoints, you can access device details, monitor service status, and track asset information.

Understanding Devices in N-central

N-central monitors and manages three main device types:

Network Devices

  • Workstations and laptops
  • Servers
  • Routers and switches
  • Printers and scanners
  • Storage devices

Mobile Devices

  • Smartphones
  • Tablets

Cloud Service Devices

  • Office 365 resources
  • Other SaaS offerings

API Methods

The Device Management API provides endpoints for retrieving device information, monitoring status, and managing device properties. For detailed information about using these endpoints, see our Retrieving Device Details guide.

Available Endpoints

Core Device Operations

  • GET /api/devices - Retrieves a paginated list of all managed devices in your N-central environment.
  • GET /api/devices/{deviceId} - Retrieves detailed information about a specific device.
  • GET /api/devices/{deviceId}/assets - Retrieves hardware and software inventory details for a device.
  • GET /api/devices/{deviceId}/assets/lifecycle-info - Retrieves warranty, lease, and lifecycle information for a device.

Device Monitoring

  • GET /api/devices/{deviceId}/service-monitor-status - Retrieves current service monitoring status and health information.
  • GET /api/devices/{deviceId}/scheduled-tasks - Retrieves a list of scheduled tasks associated with a device.
  • GET /api/devices/{deviceId}/maintenance-windows - Retrieves maintenance window schedules for a device.

Device Properties

  • GET /api/devices/{deviceId}/custom-properties - Retrieves custom fields and attributes configured for a device.

Key Features

Comprehensive Device Information

Access detailed device information including hardware specifications, network configuration, and installed software. This data helps you maintain accurate asset records and track your device inventory.

Status Monitoring

View device health and service status through service monitoring endpoints. Track task execution and maintain visibility into service quality across your managed devices.

Lifecycle Tracking

Access device lifecycle information including warranty, lease, and replacement dates. This data helps you plan hardware refreshes and maintain accurate asset records.

Custom Property Support

View and manage custom properties to track organization-specific device attributes.

Selecting a subset of devices to retrieve

The GET /api/devices endpoint has a powerful query parameter called select that can be used to narrow down the selection of devices that are retrieved from this endpoint.

The select query parameter's format is implemented by RSQL a query language for parametrized filtering of entries in RESTful APIs which in turn is based on FIQL . This query format can be used to specify the criteria of the devices in a very flexible way.

Predicate Expressions

The main building block for the selection expression is the comparison or predicate expression, where we can specify the data field, the operator and operand.

<field-name><operator><operand>
The field name is the name of the data field name. This only support the immediate fields under the data.
The operator and the operand together forms a predicate against the value in the field.

For all data type, the following operators are supported.

  • == – equals – test if the value in the field exactly matches the operand.
  • != – does not equal – test if the value in the field does not exactly match the operand.
  • =isnull= – null check – test if the value in the field is null (true) or not null (false).
  • =in= – one of – test if the value in the field is one of the provided values. For example, country=in=(US,CA) will select any records which country is either US or CA.
  • =out= – none of – test if the value in the field is not one of the provided values.

For string values, the following operators are supported.

  • =like= – RegEx match – tests if the value in the field matches the provided RegEx expression. For example, externalId2=like="NCFC-.\*" will select any record with externalId2 that starts with NCFC=.
  • =unlike= – RegEx mismatch – tests if the value in the field does not match the provided RegEx expression.

For numeric values, the following operators are supported.

  • =lt= or < – less than – test if the value in the field is less than the provided operand.
  • =le= or <= – less than or equals to – test if the value in the field is less than or equals to the provided operand.
  • =gt=or> – greater than – test if the value in the field is greater than the provided operand.
  • =ge= or >= – greater than or equals to – test if the value in the field is greater than or equals to the provided operand.

Compound Expressions

Sometimes one predicate is not sufficient. We can combine them using the following compound operators.

  • ; – and – test if all the predicates are true.
  • , – or – test if one of the predicates are true.

The ; (and) operator has a precedence over the , (or) operator – meaning that all the “and” will be performed first before the “or”. The parenthesis – ( and ) – can be used to change the order of precedence.
Here is an example of using compound expressions

/api/cutomers?country=in=(US,CA);(externalId2=like="NCFC-._",externalId2=isnull=true)
Which is processed as follows:

  • country=in=(US,CA) – Customer in either US or Canada, and
    (externalId2=like="NCFC-._",externalId2=isnull=true)
    externalId2=like="NCFC-.\*" – Customer with externalId2 starts with NCFC-, or
    externalId2=isnull=true - Customer with externalId2 is null.

More Select Examples

  • longName==AUT-8375 Retrieve the device that has a longName equal to AUT-8375
  • longName==AUT-8375 or licenseMode!=Professional Retrieve all device that have a longName equal to AUT-8375 OR licenseMode is NOT Professional
  • deviceClass=out=("Workstations - Windows","Servers - Windows") Retrieve all devices that are NOT in "Workstations - Windows" OR "Servers - Windows" device classes.
  • deviceClass=in=("Laptop - Windows","Servers - Windows") Retrieve all devices that are either a "Laptop - Windows" class or a "Servers - Windows" class