Retrieve Device Details

Overview

This guide walks you through retrieving device information using the N-able N-central Device Management APIs. Learn how to list devices, get detailed information about specific devices, and access asset and lifecycle information.

Core Operations

1. List All Devices

Retrieve a paginated list of all devices you have permission to access.

Required Parameters

  • pageNumber - The page number to retrieve (starts at 1)
  • pageSize - Number of items per page (default: 50)

Optional Parameters

  • filterId - Filter devices by predefined criteria
  • sortBy - Field to sort results by
  • sortOrder - Sort direction (asc/desc)

Request

GET /api/devices
Authorization: Bearer <YOUR_ACCESS_TOKEN>

Response

{
    "data": [
        {
            "deviceId": 1299930810,
            "uri": "52.141.77.215",
            "longName": "WS_01-12091-001001",
            "deviceClass": "Workstations - Windows",
            "description": "Network device",
            "osId": "winnt",
            "supportedOs": "Microsoft Windows 10 Enterprise",
            "orgUnitId": 12091,
            "soId": 12091,
            "customerId": 12091
        }
    ],
    "pageNumber": 1,
    "pageSize": 50,
    "totalItems": 125
}

2. Get Device Details

Retrieve comprehensive information about a specific device.

Required Parameters

  • deviceId - The unique identifier of the device

Request

GET /api/devices/{deviceId}
Authorization: Bearer <YOUR_ACCESS_TOKEN>

Response

{
    "deviceId": 1299930810,
    "uri": "52.141.77.215",
    "longName": "WS_01-12091-001001",
    "deviceClass": "Workstations - Windows",
    "description": "Network device",
    "isProbe": false,
    "osId": "winnt",
    "supportedOs": "Microsoft Windows 10 Enterprise",
    "licenseMode": "Professional",
    "orgUnitId": 12091,
    "soId": 12091,
    "customerId": 12091
}

3. Get Device Asset Information

Retrieve detailed hardware and software inventory for a device.

Required Parameters

  • deviceId - The unique identifier of the device

Request

GET /api/devices/{deviceId}/assets
Authorization: Bearer <YOUR_ACCESS_TOKEN>

Response

{
    "os": {
        "reportedos": "Microsoft Windows 10 Enterprise",
        "osarchitecture": "64-bit",
        "version": "10.0.19045"
    },
    "computersystem": {
        "serialnumber": "ABC123",
        "netbiosname": "WS-001",
        "model": "Latitude 5520",
        "manufacturer": "Dell Inc."
    },
    "networkadapter": {
        "ipaddress": "10.120.207.82",
        "macaddress": "00:50:56:87:23:5f"
    }
}

4. Get Device Lifecycle Information

Retrieve warranty, lease, and lifecycle information for device management planning.

Required Parameters

  • deviceId - The unique identifier of the device

Request

GET /api/devices/{deviceId}/assets/lifecycle-info
Authorization: Bearer <YOUR_ACCESS_TOKEN>

Response

{
    "warrantyExpiryDate": "2024-12-31",
    "leaseExpiryDate": "2024-12-31",
    "expectedReplacementDate": "2025-01-01",
    "purchaseDate": "2022-01-01",
    "cost": 1200.00,
    "location": "Head Office",
    "assetTag": "LAP-2022-001"
}

Implementation Notes

Authentication

All requests must include a valid access token in the Authorization header:

Authorization: Bearer <YOUR_ACCESS_TOKEN>

Pagination

When retrieving lists of devices:

  1. Start with pageNumber=1
  2. Use pageSize to control results per page
  3. Check totalItems in response to determine total available results
  4. Increment pageNumber to retrieve subsequent pages

Error Handling

Common HTTP status codes:

  • 200: Successful operation
  • 400: Invalid request parameters
  • 401: Authentication failure
  • 403: Insufficient permissions
  • 404: Device not found
  • 429: Too many requests

Example error response:

{
    "status": 400,
    "message": "Invalid device ID format"
}

Working with Device Data

Here are examples of common API calls when working with device information. These examples show how to combine different endpoints to retrieve comprehensive device information.

Basic Device Information

# List all devices with pagination
GET /api/devices?pageSize=50&pageNumber=1

# Get detailed information for a specific device
GET /api/devices/{deviceId}

Asset Information

# Get hardware and software inventory
GET /api/devices/{deviceId}/assets

# Check device warranty and lifecycle dates
GET /api/devices/{deviceId}/assets/lifecycle-info

Device Status

# Get current monitoring status
GET /api/devices/{deviceId}/service-monitor-status

# View scheduled tasks
GET /api/devices/{deviceId}/scheduled-tasks