NodeCoreX
HomeHelp CenterAPI Docs
English • Deutsch 日本語 Español Français Русский 简体中文 繁體中文
Get StartedStart
HomeHelp CenterAPI Docs
LoginCreate Account

API Documentation

Integrate with NodeCoreX using local device APIs (port 5200) and remote server APIs. Remote requests require a SHA-256 signature built from your account, password, machine code, and timestamp.

Local device API

Base URL: http://localhost:5200

GET http://localhost:5200/nodes/count

Get node count

Get the total number of ad nodes running on the current node.

Success (HTTP 200):
{
  "success": true,
  "count": 4
}
Error (non-200):
{
  "success": false,
  "message": "Service unavailable"
}
GET http://localhost:5200/nodes/list

Get node index list

Get the list of all node indexes for subsequent operations by index.

Success (HTTP 200):
{
  "success": true,
  "nodeIndexes": [
    0,
    1,
    2,
    3
  ]
}
Error (non-200):
{
  "success": false,
  "message": "Failed to list nodes"
}
GET http://localhost:5200/nodes/status

Get node status

Get the run status of each node (running, stopped, error, etc.).

Success (HTTP 200):
{
  "success": true,
  "statuses": [
    {
      "index": 0,
      "status": "running",
      "uptime": 3600
    },
    {
      "index": 1,
      "status": "stopped",
      "uptime": 0
    },
    {
      "index": 2,
      "status": "error",
      "message": "Proxy timeout"
    }
  ]
}
Error (non-200):
{
  "success": false,
  "message": "Unable to read node status"
}
POST http://localhost:5200/nodes/{nodeIndex}/start

Start a node

Start the ad playback node for the given node index.

Parameters:
  • nodeIndex (path) — Node index (0-based)
Success (HTTP 200):
{
  "success": true,
  "message": "Node started",
  "index": 0
}
Error (non-200):
{
  "success": false,
  "message": "Invalid node index or already running"
}
POST http://localhost:5200/nodes/{nodeIndex}/stop

Stop a node

Stop the ad playback node for the given node index.

Parameters:
  • nodeIndex (path) — Node index (0-based)
Success (HTTP 200):
{
  "success": true,
  "message": "Node stopped",
  "index": 0
}
Error (non-200):
{
  "success": false,
  "message": "Invalid node index or already stopped"
}
POST http://localhost:5200/nodes/{nodeIndex}/proxy

Set proxy for a node

Configure the proxy connection (host, port, auth, etc.) for the given node index.

Parameters:
  • nodeIndex (path) — Node index
  • ip (body) — Proxy endpoint
  • port (body) — Proxy port
  • username (body) — Proxy username (optional)
  • password (body) — Proxy password (optional)
Request body example:
{
  "ip": "127.0.0.1",
  "port": 7890,
  "username": null,
  "password": null
}
Success (HTTP 200):
{
  "success": true,
  "message": "Proxy updated",
  "index": 0
}
Error (non-200):
{
  "success": false,
  "message": "Invalid proxy or connection failed"
}
GET http://localhost:5200/device/info

Get node info

Get basic node info such as node code, model, and version.

Success (HTTP 200):
{
  "success": true,
  "machineCode": "PM-XXXX-YYYY",
  "model": "Standard",
  "version": "1.0.0",
  "firmware": "1.2.3"
}
Error (non-200):
{
  "success": false,
  "message": "Node info unavailable"
}
GET http://localhost:5200/device/health

Node health check

Check if the local service is running; can be used for heartbeat reporting.

Success (HTTP 200):
{
  "success": true,
  "healthy": true,
  "uptime": 3600,
  "nodesActive": 4
}
Error (non-200):
{
  "success": false,
  "healthy": false,
  "message": "Service unhealthy"
}

Remote server API

Base URL: your platform API host (see app console for environment-specific endpoints).

GET /api/device/ads

Get ad task list

Get ad source sites, ad types, ad IDs, playback URLs, and related content.

Parameters:
  • sign (query) required — Signature; see Sign Algorithm below
  • machineCode (query) required — Hardware node code
  • timestamp (query) required — Request timestamp (seconds)
Success (HTTP 200):
{
  "success": true,
  "data": {
    "ads": [
      {
        "id": "ad-001",
        "adType": "Video",
        "source": "example.com",
        "sourceUrl": "https://example.com/campaign/1",
        "playUrl": "https://cdn.example.com/ad-001",
        "duration": 30,
        "rewardPerView": 0.001
      }
    ]
  }
}
Error (non-200):
{
  "success": false,
  "message": "Invalid sign or expired timestamp",
  "code": "AUTH_FAILED"
}
GET /api/device/earnings

Get earnings by node

Get earnings details or summary by node code and optional node index.

Parameters:
  • sign (query) required — Signature
  • machineCode (query) required — Node code
  • timestamp (query) required — Timestamp
  • nodeIndex (query) — Node index; omit for node-wide earnings
  • startDate (query) — Start date YYYY-MM-DD
  • endDate (query) — End date YYYY-MM-DD
Success (HTTP 200):
{
  "success": true,
  "data": {
    "totalPoints": 1200,
    "currency": "points",
    "details": [
      {
        "date": "2025-03-01",
        "nodeIndex": 0,
        "points": 300,
        "adCount": 120
      },
      {
        "date": "2025-03-01",
        "nodeIndex": 1,
        "points": 280,
        "adCount": 115
      }
    ]
  }
}
Error (non-200):
{
  "success": false,
  "message": "Node not found or access denied",
  "code": "FORBIDDEN"
}
POST /api/device/heartbeat

Node heartbeat

Report node online status and node run status periodically.

Parameters:
  • sign (query) required — Signature
  • machineCode (query) required — Node code
  • timestamp (query) required — Timestamp
Request body example:
{
  "nodeStatuses": [
    {
      "index": 0,
      "status": "running",
      "uptime": 3600
    },
    {
      "index": 1,
      "status": "running",
      "uptime": 3600
    },
    {
      "index": 2,
      "status": "stopped",
      "uptime": 0
    }
  ],
  "deviceHealthy": true
}
Success (HTTP 200):
{
  "success": true,
  "message": "Heartbeat received",
  "nextReportIn": 60
}
Error (non-200):
{
  "success": false,
  "message": "Invalid sign or machineCode",
  "code": "AUTH_FAILED"
}
GET /api/device/config

Get node config

Get run config for the node (e.g. task interval, region limits).

Parameters:
  • sign (query) required — Signature
  • machineCode (query) required — Node code
  • timestamp (query) required — Timestamp
Success (HTTP 200):
{
  "success": true,
  "data": {
    "taskInterval": 30,
    "allowedRegions": [
      "US",
      "GB",
      "DE"
    ],
    "maxConcurrentAds": 4,
    "reportInterval": 60
  }
}
Error (non-200):
{
  "success": false,
  "message": "Invalid sign or node",
  "code": "AUTH_FAILED"
}

Sign algorithm

Remote API requests require query parameters sign, machineCode, and timestamp.

sign = SHA256(account + password + machineCode + timestamp)
Create account Help Center

© 2026 NodeCoreX. All rights reserved.

Home·Help Center·API Docs·Terms·Privacy