/systems/{id}/inventory/timeline - Get inventory timeline grouped by date

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://api.my.nethesis.it/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "my.nethesis.it MCP server": {
    "url": "https://api.my.nethesis.it/mcp"
  }
}

Close
GET /systems/{id}/inventory/timeline

Get a date-grouped inventory timeline for a specific system. Returns a filtered summary (severity counters) and groups of inventory dates. Each group includes inventory_ids — the IDs of inventory records collected that day. Groups with no matching diffs still appear with change_count: 0, allowing the UI to display "X inventories, no changes" badges. Pagination is over date groups. To fetch the actual diffs for a group, call GET /systems/{id}/inventory/diffs?inventory_id=42&inventory_id=43 with the inventory_ids from the group. Supports text search on diff field paths and values.

Path parameters

  • id string Required

    System ID

Query parameters

  • page integer

    Page number

    Minimum value is 1. Default value is 1.

  • page_size integer

    Items per page

    Minimum value is 1, maximum value is 200. Default value is 20.

  • severity array[string]

    Filter by severity level. Supports multiple values.

    Values are low, medium, high, or critical.

  • category array[string]

    Filter by change category. Supports multiple values.

    Values are os, hardware, network, security, backup, features, modules, cluster, nodes, or system.

  • diff_type array[string]

    Filter by diff type. Supports multiple values.

    Values are create, update, or delete.

  • from_date string(date-time)

    Show dates from this timestamp (RFC3339 format)

  • to_date string(date-time)

    Show dates up to this timestamp (RFC3339 format)

Responses

  • 200 application/json

    Inventory timeline retrieved successfully

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

        Filtered severity counts for the timeline view

        Hide summary attributes Show summary attributes object
        • total integer

          Total number of changes matching the active filters

        • critical integer

          Number of critical-severity changes matching the active filters

        • high integer

          Number of high-severity changes matching the active filters

        • medium integer

          Number of medium-severity changes matching the active filters

        • low integer

          Number of low-severity changes matching the active filters

      • groups array[object]

        A date group in the inventory timeline

        Hide groups attributes Show groups attributes object

        A date group in the inventory timeline

        • date string

          Date in YYYY-MM-DD format (UTC)

        • inventory_count integer

          Number of inventory snapshots collected on this date

        • change_count integer

          Number of diffs on this date matching the active filters (0 means no changes)

        • inventory_ids array[integer(int64)]

          IDs of the inventory records collected on this date. Pass these as repeated params to GET /systems/{id}/inventory/diffs?inventory_id=42&inventory_id=43 to fetch the actual diffs.

      • pagination object
        Hide pagination attributes Show pagination attributes object
        • page integer

          Current page number

          Minimum value is 1.

        • page_size integer

          Number of items per page

          Minimum value is 1, maximum value is 200.

        • total_count integer

          Total number of items

          Minimum value is 0.

        • total_pages integer

          Total number of pages

          Minimum value is 0.

        • has_next boolean

          Whether there is a next page

        • has_prev boolean

          Whether there is a previous page

        • next_page integer | null

          Next page number if available

        • prev_page integer | null

          Previous page number if available

        • sort_by string | null

          Field used for sorting

        • sort_direction string | null

          Sort direction

          Values are asc or desc.

  • 401 application/json

    Unauthorized - invalid or missing token

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

    Forbidden - insufficient permissions

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

    Resource not found

    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

GET /systems/{id}/inventory/timeline
curl \
 --request GET 'https://collect.your-domain.com/api/systems/sys_123456789/inventory/timeline' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "code": 200,
  "message": "inventory timeline retrieved successfully",
  "data": {
    "summary": {
      "total": 12,
      "critical": 1,
      "high": 3,
      "medium": 8,
      "low": 0
    },
    "groups": [
      {
        "date": "2026-03-04",
        "inventory_count": 3,
        "change_count": 2,
        "inventory_ids": [
          42,
          43
        ]
      }
    ],
    "pagination": {
      "page": 1,
      "page_size": 20,
      "total_count": 156,
      "total_pages": 8,
      "has_next": true,
      "has_prev": false,
      "next_page": 2,
      "prev_page": 42,
      "sort_by": "name",
      "sort_direction": "asc"
    }
  }
}
Response examples (401)
{
  "code": 401,
  "message": "invalid token",
  "data": {}
}
Response examples (403)
{
  "code": 403,
  "message": "insufficient permissions",
  "data": {}
}
Response examples (404)
{
  "code": 400,
  "message": "validation failed",
  "data": {
    "type": "validation_error",
    "errors": [
      {
        "key": "username",
        "message": "required",
        "value": "string"
      }
    ]
  }
}