Managing System Health

Overview

N-central's System Health APIs enable you to monitor system availability, verify version compatibility, and retrieve detailed system information. These APIs help you ensure your N-central deployment is running smoothly and maintain version compatibility across your integration.

API Methods

Root API Links

Lists all available API endpoints in your N-central deployment.

Example Request

GET /api

Example Response

{
    "_links": {
        "root": "/api",
        "server-info": "/api/server-info",
        "health": "/api/health",
        "auth": "/api/auth",
        "customers": "/api/customers",
        "devices": "/api/devices",
        "scheduled-tasks": "/api/scheduled-tasks"
    }
}

Health Check

Returns the server's current time to confirm system availability.

Example Request

GET /api/health

Example Response

{
    "currentTime": "2023-09-27T15:43:16.793Z"
}

Version Information

Retrieves basic version details about the API service.

Example Request

GET /api/server-info

Example Response

{
    "jvmVersion": "17.0.9",
    "version": "3.1.0",
    "ncentral": null
}

System Version Information

Returns detailed version information about N-central system components.

Types

  • Basic (GET /api/server-info/extra): Retrieves version information without authentication
  • Authenticated (POST /api/server-info/extra/authenticated): Provides comprehensive version details with authentication

Key Parameters for Authenticated Version

  • username: Your N-central username
  • password: Your N-central password

Integration Steps

  1. Set Up Health Monitoring

    • Implement regular calls to /api/health
    • Store timestamp responses for availability tracking
    • Set up alerts for failed health checks
  2. Version Management

    • Check /api/server-info for API version compatibility
    • Use /api/server-info/extra for basic system version info
    • Implement authenticated version checks for detailed diagnostics
  3. API Discovery

    • Use /api to discover available endpoints
    • Cache endpoint links for efficient access
    • Refresh endpoint cache periodically

Common Responses

Successful Operations

{
    "currentTime": "2023-09-27T15:43:16.793Z"
}

Error States

  • 400: Bad Request - Check request format
  • 401: Authentication Failure - Verify credentials
  • 403: Forbidden - Check permissions
  • 429: Too Many Requests - Implement backoff
  • 500: Internal Server Error - Report to support