Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b9be38f
docs(tutorials): fix manifest-discovery param names and unmanifested_…
bburda Mar 7, 2026
4e7384e
docs(config): add Logging and Rate Limiting sections to server reference
bburda Mar 7, 2026
494c36d
docs(config): add merge pipeline reference to discovery options
bburda Mar 7, 2026
571a262
docs(api): update server capabilities example response
bburda Mar 7, 2026
5e454b1
docs(tutorials): update plugin system - IntrospectionProvider wired, …
bburda Mar 7, 2026
1d9a21b
fix(api): complete handle_root endpoint/capability list, fix version-…
bburda Mar 7, 2026
f969523
fix: address PR #258 review comments and CI failure
bburda Mar 7, 2026
b358a41
fix: address self-review findings
bburda Mar 7, 2026
a7eee5a
fix(discovery): prevent topic components leaking in manifest_only mode
bburda Mar 7, 2026
e745c3f
test: rename SovdEntry tests to ItemsEntry, add manifest_only regress…
bburda Mar 7, 2026
04d8b3b
feat: extend entity capabilities and add log endpoints for areas/func…
bburda Mar 13, 2026
0abfa01
docs: add SOVD compliance philosophy and fix resource collection claims
bburda Mar 13, 2026
478233e
fix: address review findings - sampler scoping, log dedup, handle_roo…
bburda Mar 13, 2026
8dd462e
fix: use effective_fqn() for App FQN resolution in manifest_only mode
bburda Mar 13, 2026
c2ec423
fix: address PR #258 review - effective_fqn, capabilities, fault filt…
bburda Mar 13, 2026
f55c576
build(gateway): export include directories for downstream plugin pack…
bburda Mar 13, 2026
6aa9dc8
feat(plugins): add PluginContext::get_child_apps() for Component aggr…
bburda Mar 13, 2026
b7fd62c
feat(discovery): scaffold ros2_medkit_linux_introspection package
bburda Mar 13, 2026
04eadf0
feat(linux-introspection): implement proc_reader with TDD
bburda Mar 13, 2026
0137a19
feat(linux-introspection): implement cgroup_reader with TDD
bburda Mar 13, 2026
135731f
feat(linux-introspection): implement PidCache with TTL-based refresh
bburda Mar 13, 2026
21cda05
feat(linux-introspection): implement container_plugin
bburda Mar 13, 2026
cfc2706
feat(linux-introspection): implement procfs_plugin
bburda Mar 13, 2026
85bdad8
feat(linux-introspection): implement systemd_plugin
bburda Mar 13, 2026
4cfd733
docs: add Linux introspection plugins user guide
bburda Mar 13, 2026
a033e2e
test(linux-introspection): add launch_testing integration tests
bburda Mar 13, 2026
65808e6
test(linux-introspection): add Docker-based integration tests
bburda Mar 13, 2026
69376b7
build(devcontainer): add libsystemd-dev for systemd introspection plugin
bburda Mar 13, 2026
f7aba1d
fix: resolve cross-distro plugin loading failures (Humble/Rolling)
bburda Mar 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
graphviz \
plantuml \
lcov \
libsystemd-dev \
&& locale-gen en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*

Expand Down
175 changes: 149 additions & 26 deletions docs/api/rest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,54 @@ Server Capabilities
.. code-block:: json

{
"api_version": "1.0.0",
"gateway_version": "0.1.0",
"name": "ROS 2 Medkit Gateway",
"version": "0.3.0",
"api_base": "/api/v1",
"endpoints": [
{"path": "/areas", "supported_methods": ["GET"]},
{"path": "/components", "supported_methods": ["GET"]},
{"path": "/apps", "supported_methods": ["GET"]}
]
"GET /api/v1/health",
"GET /api/v1/areas",
"GET /api/v1/components",
"GET /api/v1/apps",
"GET /api/v1/functions",
"GET /api/v1/faults",
"..."
],
"capabilities": {
"discovery": true,
"data_access": true,
"operations": true,
"async_actions": true,
"configurations": true,
"faults": true,
"logs": true,
"bulk_data": true,
"cyclic_subscriptions": true,
"updates": false,
"authentication": false,
"tls": false
}
}

``GET /api/v1/version-info``
Get gateway version and status information.

**Example Response:**

.. code-block:: json

{
"items": [
{
"version": "1.0.0",
"base_uri": "/api/v1",
"vendor_info": {
"version": "0.3.0",
"name": "ros2_medkit"
}
}
]
}

``GET /api/v1/health``
Health check endpoint. Returns HTTP 200 if gateway is operational.

Expand All @@ -57,7 +93,7 @@ Areas
{
"id": "powertrain",
"name": "Powertrain",
"self": "/api/v1/areas/powertrain"
"href": "/api/v1/areas/powertrain"
}
]
}
Expand All @@ -71,6 +107,13 @@ Areas
``GET /api/v1/areas/{area_id}/components``
List components in a specific area.

.. note::

**ros2_medkit extension:** Areas support resource collections beyond the SOVD spec,
which only defines them for apps and components. Areas provide ``/data``, ``/operations``,
``/configurations``, ``/faults``, ``/logs`` (namespace prefix aggregation), and read-only
``/bulk-data``. See :ref:`sovd-compliance` for details.

Components
~~~~~~~~~~

Expand All @@ -86,9 +129,7 @@ Components
{
"id": "temp_sensor",
"name": "temp_sensor",
"self": "/api/v1/components/temp_sensor",
"area": "powertrain",
"resource_collections": ["data", "operations", "configurations", "faults"]
"href": "/api/v1/components/temp_sensor"
}
]
}
Expand Down Expand Up @@ -128,6 +169,13 @@ Functions
``GET /api/v1/functions/{function_id}/hosts``
List apps that host this function.

.. note::

**ros2_medkit extension:** Functions support resource collections beyond the SOVD spec.
``/data`` and ``/operations`` aggregate from hosted apps (per SOVD). Additionally,
``/configurations``, ``/faults``, ``/logs`` aggregate from hosts, and read-only
``/bulk-data`` is available. See :ref:`sovd-compliance` for details.

Data Endpoints
--------------

Expand Down Expand Up @@ -477,6 +525,16 @@ Query and manage faults.
- **204:** Fault cleared
- **404:** Fault not found

``DELETE /api/v1/components/{id}/faults``
Clear all faults for an entity.

Accepts the optional ``?status=`` query parameter (same values as ``GET /faults``).
Without it, clears pending and confirmed faults.

- **204:** Faults cleared (or none to clear)
- **400:** Invalid status parameter
- **503:** Fault manager unavailable

``DELETE /api/v1/faults``
Clear all faults across the system *(ros2_medkit extension, not SOVD)*.

Expand All @@ -491,7 +549,8 @@ Logs Endpoints
--------------

Query and configure the /rosout ring buffer for an entity. Supported entity types:
**components** and **apps**.
**areas** (namespace prefix match), **components** (namespace prefix match), **apps** (exact FQN match),
and **functions** (aggregated from hosted apps).

.. note::

Expand Down Expand Up @@ -595,10 +654,10 @@ The ``context.function``, ``context.file``, and ``context.line`` fields are omit
"max_entries": 500
}

``severity_filter`` minimum severity to return in query results (``debug`` | ``info`` | ``warning`` |
``severity_filter`` - minimum severity to return in query results (``debug`` | ``info`` | ``warning`` |
``error`` | ``fatal``). Entries below this level are excluded from queries. Default: ``debug``.

``max_entries`` maximum number of entries returned per query. Must be between 1 and 10,000
``max_entries`` - maximum number of entries returned per query. Must be between 1 and 10,000
(inclusive). Default: ``100``.

**Response 204:** No content.
Expand Down Expand Up @@ -1235,33 +1294,97 @@ Topic and parameter paths containing ``/`` must be URL-encoded:
* - ``/chassis/brakes/command``
- ``chassis%2Fbrakes%2Fcommand``

.. _sovd-compliance:

SOVD Compliance
---------------

The gateway implements a subset of the SOVD (Service-Oriented Vehicle Diagnostics) specification:
The gateway implements a **pragmatic subset** of the SOVD (Service-Oriented Vehicle
Diagnostics) standard. We follow SOVD where it matters for interoperability -
endpoint contracts, data model, entity hierarchy - but extend it where ROS 2
use cases benefit.

**SOVD-Compliant Endpoints:**
**SOVD-Aligned Capabilities:**

- Discovery (``/areas``, ``/components``, ``/apps``, ``/functions``)
- Data access (``/data``)
- Operations (``/operations``, ``/executions``)
- Data access (``/data``) with topic sampling and JSON serialization
- Operations (``/operations``, ``/executions``) with async action support
- Configurations (``/configurations``)
- Faults (``/faults``) with ``environment_data`` and SOVD status object
- Bulk Data (``/bulk-data``) for binary data downloads (rosbags, logs)
- Logs (``/logs``) with severity filtering and per-entity configuration
- Bulk Data (``/bulk-data``) with custom categories and rosbag downloads
- Software Updates (``/updates``) with async prepare/execute lifecycle
- Cyclic Subscriptions (``/cyclic-subscriptions``) with SSE-based periodic data delivery
- Cyclic Subscriptions (``/cyclic-subscriptions``) with SSE-based delivery

**Pragmatic Extensions:**

**ros2_medkit Extensions:**
The SOVD spec defines resource collections only for apps and components. ros2_medkit
extends this to areas and functions where aggregation makes practical sense:

- ``/health`` - Health check endpoint
.. list-table:: Resource Collection Support Matrix
:header-rows: 1
:widths: 20 16 16 16 16 16

* - Resource
- Areas
- Components
- Apps
- Functions
- SOVD Spec
* - data
- aggregated
- yes
- yes
- aggregated
- apps, components
* - operations
- aggregated
- yes
- yes
- aggregated
- apps, components
* - configurations
- aggregated
- yes
- yes
- aggregated
- apps, components
* - faults
- aggregated
- yes
- yes
- aggregated
- apps, components
* - logs
- prefix match
- prefix match
- exact match
- from hosts
- apps, components
* - bulk-data
- read-only
- full CRUD
- full CRUD
- read-only
- apps, components
* - cyclic-subscriptions
- \-
- yes
- yes
- \-
- apps, components

Other extensions beyond SOVD:

- Vendor extension fields using ``x-medkit`` prefix (per SOVD extension mechanism)
- ``DELETE /faults`` - Clear all faults globally
- ``GET /faults/stream`` - SSE real-time fault notifications
- ``/health`` - Health check with discovery pipeline diagnostics
- ``/version-info`` - Gateway version information
- ``/manifest/status`` - Manifest discovery status
- SSE fault streaming - Real-time fault notifications
- ``x-medkit`` extension fields in responses

See Also
--------
~~~~~~~~

- :doc:`/config/discovery-options` for merge pipeline configuration
- :doc:`/tutorials/authentication` - Configure authentication
- :doc:`/config/server` - Server configuration options
- `Postman Collection <https://github.com/selfpatch/ros2_medkit/tree/main/postman>`_ - Interactive API testing
Loading
Loading