/systems/inventory - Collect system inventory

POST /systems/inventory

System inventory collection endpoint with HTTP Basic authentication

application/json

Body Required

  • data object

    System inventory data (structure varies by system type)

    Additional properties are allowed.

Responses

  • 202 application/json

    Inventory received and queued for processing

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object
      Hide data attributes Show data attributes object
      • data_size integer

        Inventory data size in bytes

      • message string

        A message from server

      • queue_status string

        Queue status message

      • system_key string

        System KEY

      • timestamp string(date-time)

        Timestamp of received inventory

  • 400 application/json

    Bad request - validation error

    Hide response attributes Show response attributes object
    • code integer

      HTTP error code

    • message string

      Error message

    • data object
      Hide data attributes Show data attributes object
      • type string

        Type of error

        Values are validation_error or external_api_error.

      • errors array[object]
        Hide errors attributes Show errors attributes object
        • key string

          Field name that failed validation

        • message string

          Error code or message

        • value string

          Value that failed validation

      • details

        Additional error details

  • 401 application/json

    Unauthorized - invalid or missing token

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
  • 413 application/json

    Request Entity Too Large

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object
      Hide data attributes Show data attributes object
      • max_size_bytes integer

        Maximum allowed request size in bytes

      • received_bytes integer

        Size of received request in bytes

  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object
      Hide data attribute Show data attribute object
      • error string
POST /systems/inventory
curl \
 --request POST 'https://collect.your-domain.com/api/systems/inventory' \
 --user "username:password" \
 --header "Content-Type: application/json" \
 --data '{"data":{"os":{"name":"NethSec","type":"nethsecurity","family":"OpenWRT","release":{"full":"8.6.0-dev+859b9708e.20251014104339","major":7}},"dmi":{"bios":{"vendor":"American Megatrends Inc.","version":"4.6.5"},"board":{"product":"SHARKBAY","manufacturer":"To be filled by O.E.M."},"product":{"name":"To be filled by O.E.M.","uuid":"03000200-0400-0500-0006-000700080009"}},"kernel":"Linux","memory":{"swap":{"used_bytes":0,"total_bytes":0,"available_bytes":0},"system":{"used_bytes":653488128,"total_bytes":7347437568,"available_bytes":7347683328}},"virtual":"physical","arp_macs":"111","features":{"ha":{"vips":0,"enabled":false},"qos":{"count":2,"rules":[{"upload":20,"enabled":true,"download":40}]},"subscription_status":{"status":"enterprise"}},"timezone":"Europe/Rome","public_ip":"2.119.67.169","networking":{"fqdn":"fw.nethesis.it"},"processors":{"isa":"x86_64","count":"4","models":["Intel(R) Core(TM) i5-4570S CPU @ 2.90GHz"]},"mountpoints":{"/":{"size_bytes":258080768,"used_bytes":57765888,"available_bytes":200314880}},"kernelrelease":"6.6.104","system_uptime":{"seconds":"54150"}}}'
Request examples
{
  "data": {
    "os": {
      "name": "NethSec",
      "type": "nethsecurity",
      "family": "OpenWRT",
      "release": {
        "full": "8.6.0-dev+859b9708e.20251014104339",
        "major": 7
      }
    },
    "dmi": {
      "bios": {
        "vendor": "American Megatrends Inc.",
        "version": "4.6.5"
      },
      "board": {
        "product": "SHARKBAY",
        "manufacturer": "To be filled by O.E.M."
      },
      "product": {
        "name": "To be filled by O.E.M.",
        "uuid": "03000200-0400-0500-0006-000700080009"
      }
    },
    "kernel": "Linux",
    "memory": {
      "swap": {
        "used_bytes": 0,
        "total_bytes": 0,
        "available_bytes": 0
      },
      "system": {
        "used_bytes": 653488128,
        "total_bytes": 7347437568,
        "available_bytes": 7347683328
      }
    },
    "virtual": "physical",
    "arp_macs": "111",
    "features": {
      "ha": {
        "vips": 0,
        "enabled": false
      },
      "qos": {
        "count": 2,
        "rules": [
          {
            "upload": 20,
            "enabled": true,
            "download": 40
          }
        ]
      },
      "subscription_status": {
        "status": "enterprise"
      }
    },
    "timezone": "Europe/Rome",
    "public_ip": "2.119.67.169",
    "networking": {
      "fqdn": "fw.nethesis.it"
    },
    "processors": {
      "isa": "x86_64",
      "count": "4",
      "models": [
        "Intel(R) Core(TM) i5-4570S CPU @ 2.90GHz"
      ]
    },
    "mountpoints": {
      "/": {
        "size_bytes": 258080768,
        "used_bytes": 57765888,
        "available_bytes": 200314880
      }
    },
    "kernelrelease": "6.6.104",
    "system_uptime": {
      "seconds": "54150"
    }
  }
}
Response examples (202)
{
  "code": 200,
  "message": "Inventory received and queued for processing",
  "data": {
    "data_size": 10145,
    "message": "Your inventory data has been received and will be processed shortly",
    "queue_status": "queued",
    "system_key": "NOC-4cf3053f-d0d5-4b10-b752-ff8f7b63c2f7",
    "timestamp": "2025-07-16T15:46:51.571831+02:00"
  }
}
Response examples (400)
{
  "code": 400,
  "message": "validation failed",
  "data": {
    "type": "validation_error",
    "errors": [
      {
        "key": "username",
        "message": "required",
        "value": "string"
      }
    ]
  }
}
Response examples (401)
{
  "code": 401,
  "message": "invalid token",
  "data": {}
}
Response examples (413)
{
  "code": 413,
  "message": "Request too large",
  "data": {
    "max_size_bytes": 10485760,
    "received_bytes": 20971520
  }
}
Response examples (500)
{
  "code": 500,
  "message": "Failed to process inventory",
  "data": {
    "error": "Processing queue unavailable"
  }
}