Developer Guide

API Authentication

Applications must first authenticate before communicating with INNORIX.

Login and Tokens

Description

Log in with your account to obtain an access token (JWT), then include both the Authorization: Bearer and x-workspace-id headers with all subsequent requests. When the token expires, refresh it with POST /api/auth/token/refresh (header: X-Refresh-Token). If you need a long-lived key for command automation, issue one with POST /api/auth/api-keys and use it in the x-api-key header.

APIs Used

PurposeMethodEndpoint
LoginPOST/api/auth/login
Refresh tokenPOST/api/auth/token/refresh
Issue API keyPOST/api/auth/api-keys
Get current userGET/api/auth/me

Request

POST /api/auth/login

json
{
  "email": "<YOUR_EMAIL>",
  "password": "<YOUR_PASSWORD>"
}

Response

json
{
  "status_code": 200,
  "message": "success",
  "data": {
    "user": {
      "email": "user@example.com",
      "userName": "User Name",
      "userId": "usr_abc123",
      "accessToken": "<ACCESS_TOKEN>",
      "refreshToken": "<REFRESH_TOKEN>"
    }
  }
}

Process

  1. Log in with POST /api/auth/login → receive data.user.accessToken
  2. Include the Authorization: Bearer <ACCESS_TOKEN> and x-workspace-id headers in subsequent requests
  3. When the token expires, refresh it with POST /api/auth/token/refresh (header: X-Refresh-Token)

Implementation Examples

BASE_URL="https://app.innorix.com"
WORKSPACE_ID="<WORKSPACE_ID>"

ACCESS_TOKEN=$(curl -s -X POST "$BASE_URL/api/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"email":"<YOUR_EMAIL>","password":"<YOUR_PASSWORD>"}' \
  | jq -r '.data.user.accessToken')

AUTH=(-H "Authorization: Bearer $ACCESS_TOKEN" -H "x-workspace-id: $WORKSPACE_ID")

System Connectivity

File transfers take place between connected devices.

Check Devices and Browse Files

Description

Retrieve the device list to identify the source and target deviceId, check their connectivity, then browse the source device path to obtain the hash of the item to transfer. (This assumes the agent has already been installed and registered. Once the installed agent connects to the server, the device appears in the device list.)

APIs Used

PurposeMethodEndpoint
List devicesGET/api/devices
Check connectivityGET/api/devices/{deviceId}/connectivity
Search filesPOST/api/devices/{deviceId}/files/search
List folder contents (non-streaming)GET/api/devices/{deviceId}/files

Request

POST /api/devices/{deviceId}/files/search

json
{
  "path": "/data/export",
  "onlyFolder": false
}

Response

GET /api/devices

json
{
  "status_code": 200,
  "message": "success",
  "data": {
    "devices": [
      { "deviceId": "dev_a1", "name": "seoul-node-01", "os": "linux", "status": "online" },
      { "deviceId": "dev_b2", "name": "hanoi-node-02", "os": "windows", "status": "offline" }
    ],
    "total_rows": 2
  }
}

Process

  1. Use GET /api/devices to identify the source and target deviceId
  2. Use GET /api/devices/{deviceId}/connectivity to verify that both devices are online
  3. Use POST /api/devices/{deviceId}/files/search to browse the path → obtain the item's hash

Implementation Examples

# --- List devices ---
curl -s "$BASE_URL/api/devices?page=1&size=20" "${AUTH[@]}"

# --- Check connectivity ---
curl -s "$BASE_URL/api/devices/<DEVICE_ID>/connectivity" "${AUTH[@]}"

# --- Browse a device path ---
curl -s -X POST "$BASE_URL/api/devices/<DEVICE_ID>/files/search" "${AUTH[@]}" \
  -H "Content-Type: application/json" \
  -d '{"path":"C:/data/export","onlyFolder":false}'

File · Folder Transfer

Send files from a source device to a target device, control transfers in progress, and check transfer results.

Immediate Transfer and Control

Description

Create sourceItem using the hash from the browse results and start a transfer. The API returns a monitorId (data.monitorId in the response). Use this value to pause, resume, cancel, retry failed items, and check results. Poll transfer status with GET /api/transfer-history/{monitorId}?idType=monitor, and retrieve file-level results with GET /api/transfers/{monitorId}/files?idType=monitor.

APIs Used

PurposeMethodEndpoint
Create transferPOST/api/transfers/manual
Control transferPOST/api/transfers/{monitorId}/pause · resume · cancel
Retry failed itemsPOST/api/transfers/{monitorId}/retry
Get statusGET/api/transfer-history/{monitorId}
Get transfer filesGET/api/transfers/{monitorId}/files

Request

POST /api/transfers/manual

json
{
  "sourceId": "6901ae48ca578216fd739f78",
  "targetId": "690037c22d309a7bc494bc53",
  "targetPath": "/data/incoming",
  "sourceItem": [{ "hash": "a1b2c3d4", "isDir": true }]
}

Response

json
{
  "status_code": 201,
  "message": "Created",
  "data": { "monitorId": "mon_7788", "transferId": "tr_5566" }
}

Process

  1. Call POST /api/transfers/manual → receive data.monitorId
  2. Poll status with GET /api/transfer-history/{monitorId}?idType=monitor
  3. When needed, control the transfer with POST /api/transfers/{monitorId}/pause · resume · cancel; retry failures with .../retry

Implementation Examples

# --- Create a transfer ---
curl -s -X POST "$BASE_URL/api/transfers/manual" "${AUTH[@]}" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceId": "6901ae48ca578216fd739f78",
    "targetId": "690037c22d309a7bc494bc53",
    "targetPath": "C:/Users/innorix/Downloads/New folder (3)",
    "sourceItem": [
      { "hash": "<FILE_HASH>", "isDir": true }
    ]
  }'

# --- Control a transfer (pause / resume / cancel) ---
curl -s -X POST "$BASE_URL/api/transfers/<MONITOR_ID>/pause"  "${AUTH[@]}"
curl -s -X POST "$BASE_URL/api/transfers/<MONITOR_ID>/resume" "${AUTH[@]}"
curl -s -X POST "$BASE_URL/api/transfers/<MONITOR_ID>/cancel" "${AUTH[@]}"

# --- Retry failed files ---
curl -s -X POST "$BASE_URL/api/transfers/<MONITOR_ID>/retry" "${AUTH[@]}" \
  -H "Content-Type: application/json" \
  -d '{
    "filesRetry": [
      { "filePath": "C:/data/export/file.txt", "isDir": false }
    ]
  }'

# --- Poll transfer result ---
curl -s "$BASE_URL/api/transfer-history/<MONITOR_ID>?idType=monitor" "${AUTH[@]}"

Scheduled Automation

Configure scheduled transfers that run repeatedly at specified times.

Recurring Automation

Description

Create an automation with a schedule and transfer details (details). The API returns an automationId, which you can use to pause, resume, update, or delete the automation. Retrieve progress and status with GET /api/automations/{automationId}/details.

APIs Used

PurposeMethodEndpoint
Create automationPOST/api/automations
Get automation detailsGET/api/automations/{automationId}/details
Pause automationPOST/api/automations/{automationId}/pause
Update automationPATCH/api/automations/{automationId}
Delete automationDELETE/api/automations/{automationId}

Request

POST /api/automations

json
{
  "name": "Nightly backup",
  "transferType": "scheduled",
  "timezone": "Asia/Seoul",
  "schedules": [
    { "type": "day", "hour": "02", "minute": "00" }
  ],
  "details": [
    {
      "sourceItem": ["D:/Projects/data/exported_users.csv"],
      "targetPath": "D:/Backup/Daily_Reports",
      "senderId": "user123",
      "receiverId": "backup_sys_001",
      "step": 1
    }
  ]
}

Response

json
{
  "status_code": 200,
  "message": "success",
  "data": { "automationId": "auto_301", "status": "active" }
}

Process

  1. Call POST /api/automations → receive data.automationId
  2. Check progress and status with GET /api/automations/{automationId}/details
  3. Pause/resume with POST /api/automations/{automationId}/pause; update/delete with PATCH · DELETE

Implementation Examples

# --- Build a schedule ---
{
  "type": "day",
  "hour": "02",
  "minute": "00",
  "timezone": "Asia/Seoul",
  "startDate": "2026-01-01T00:00:00.000Z",
  "endDate": "2026-12-31T00:00:00.000Z"
}

# --- Create an automation ---
curl -s -X POST "$BASE_URL/api/automations" "${AUTH[@]}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Nightly backup",
    "schedules": [
      {
        "type": "day",
        "hour": "02",
        "minute": "00",
        "timezone": "Asia/Seoul",
        "startDate": "2026-01-01T00:00:00.000Z",
        "endDate": "2026-12-31T00:00:00.000Z"
      }
    ],
    "details": [
      {
        "sourceItem": [
          "D:/Projects/data/exported_users.csv",
          "D:/Projects/data/sales_report.pdf"
        ],
        "targetPath": "D:/Backup/Daily_Reports",
        "senderId": "6901ae48ca578216fd739f78",
        "receiverId": "690037c22d309a7bc494bc53",
        "step": 1,
        "fileCount": 2,
        "folderCount": 0,
        "sizeCount": 0
      }
    ]
  }'

# --- Pause / resume an automation ---
curl -s -X POST "$BASE_URL/api/automations/<AUTOMATION_ID>/pause" "${AUTH[@]}" \
  -H "Content-Type: application/json" \
  -d '{"pause": true}'

# --- Update / delete an automation ---
curl -s -X PATCH "$BASE_URL/api/automations/<AUTOMATION_ID>" "${AUTH[@]}" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Nightly backup (updated)" }'

curl -s -X DELETE "$BASE_URL/api/automations/<AUTOMATION_ID>" "${AUTH[@]}"