|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
The REST API View provides monitoring and control for the MITK REST API server. This server enables external applications such as Python scripts, web applications, or other tools to interact with MITK Workbench programmatically via standard HTTP requests.
With the REST API, external processes can:
The REST API View allows you to:
The Server Status section displays the current state of the REST API server:
A colored indicator shows the server state at a glance:
When the server is running, the full URL is displayed (e.g., http://localhost:8080). Click the Copy button to copy this URL to the clipboard for use in external applications.
Shows the current host and port configuration (e.g., :::8080 for the default dual-stack bind). This can be changed in the preferences.
Click the Start Server / Stop Server button to control the server lifecycle. The button text changes based on the current server state.
The Request Activity section provides information about client connections and requests:
Displays a list of IP addresses that have sent requests to the server since it was started. This helps you identify which machines or processes are connected.
Shows the most recent request processed by the server, including:
/api/v1/datastorage/nodes)Shows the HTTP response code of the last request:
The view includes two tabs that show which nodes have been accessed via the REST API:
Lists all data nodes that have been accessed (read) through the REST API. When a node is queried via the API, it receives a restapi.uid property that uniquely identifies it for API operations.
Lists all data nodes that have been modified through the REST API. This includes nodes where properties have been changed, or nodes that have been created via the API. Modified nodes receive a restapi.modified property.
These lists help you track which parts of your data have been touched by external processes.
The REST API preferences can be accessed via Window > Preferences > REST API or by pressing Ctrl+P and navigating to REST API.
/health and /datastorage/* endpoints respond as soon as the server is up, as do the /rendering/* endpoints that drive the rendering manager directly (update, reinit, selected-time) – though these still return 503 until the data they need exists (reinit needs a loaded Data Storage, selected-time a time navigation controller). The render-window endpoints (/rendering/selected-position, /rendering/screenshot and /rendering/editors/*) additionally require the REST API workbench plugin (org.mitk.gui.qt.restapi) to be active and return 503 until it is – open the REST API view once to activate it.::, the IPv6 wildcard, which also accepts IPv4 connections via 4-mapped addresses on Linux/macOS/Windows):: avoids the ~2 s IPv6-first / IPv4-fallback latency that Windows clients otherwise pay when resolving localhost127.0.0.1 to pin the server to IPv4 loopback only0.0.0.0 to allow connections from any IPv4 network interface (use with caution)8080)The REST API provides the following main endpoints (base URL: http://host:port/api/v1):
| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Health check |
| GET | /info | API information |
| GET | /datastorage/nodes | List all nodes |
| POST | /datastorage/nodes | Create a new node |
| GET | /datastorage/nodes/{uid} | Get node details |
| DELETE | /datastorage/nodes/{uid} | Delete a node |
| GET | /datastorage/nodes/{uid}/properties | Get node properties |
| PUT | /datastorage/nodes/{uid}/properties/{key} | Set a property |
Here is a simple Python example to list all nodes:
You can test the API using curl from the command line:
Important: The REST API is intended for local development and trusted network environments.
:: (the IPv6 wildcard, dual-stack). The default client-access mode (LocalhostOnly) still rejects requests whose remote address is not 127.0.0.1, ::1, or ::ffff:127.0.0.1, so even though the socket itself can accept off-host connections, only loopback clients are served.0.0.0.0, the server becomes accessible from other machines on your network. Only do this in trusted environments.Prior versions bound to 127.0.0.1 by default. From this version onwards the default host is :: (IPv6 dual-stack) to eliminate the ~2 s Windows localhost resolution latency that the IPv4-only default incurred. Filtering of remote clients is now done by the client-access mode, not by the bind address. If you change ClientAccessMode away from LocalhostOnly (for example to AllowAll), the server immediately becomes reachable from the network on the default host – you no longer need to also flip the host to 0.0.0.0. Review both the host and the access mode together before deploying.
This message appears when the REST API module is not loaded. Ensure:
If the server fails to start, the status will show an error message. Common causes:
0.0.0.0 and no firewall is blocking the connectionOn Linux hosts with net.ipv6.bindv6only=1 (a system-wide sysctl set by some distributions and security baselines), a socket bound to :: accepts IPv6 connections only – it will not accept IPv4 traffic, even on the loopback. Clients that connect to 127.0.0.1 or use an IPv4-only resolver will see "connection refused".
If you cannot disable the kernel flag, change the configured host to 0.0.0.0 (IPv4 wildcard) or to a specific IPv4 address. The MITK server sets the per-socket IPV6_V6ONLY=false hint, but it cannot override the system-wide kernel default.