Using the XNAT Event Service

Introduction to the Event Service

The XNAT Event Service, introduced in XNAT 1.8, allows site administrators and project owners to schedule automated actions in response to defined data events within XNAT. With the Event Service enabled, your XNAT server is actively "listening" for the occurrence of data-related events that match defined event subscriptions, and will automatically perform tasks in response to those events.

Key Terms

Event Triggers - XNAT has an enumerated list of data events that can trigger an automated response. For example, "session archived" or "project created".

Actions in the Event Service - XNAT and its plugin ecosystem provide a set of executable tasks that can be performed on data based on an event trigger. For example, "Log event" or "Launch container"

Event Subscriptions - A subscription ties together the type of data, the event trigger, and the action to perform to build a recipe for automation.

Data Filters - A subset of the subscription definition, it is possible (and often recommended) to only perform automated actions based on data that matches a narrowly defined filter.

Example Usage

For example, a project owner wishes to run the xnat/dcm2niix container on every DICOM-formatted scan uploaded to their project. They would first need to make sure that the container is enabled in their project, so it can be selected as a valid action. Then they would build an event subscription by selecting the 'Scan Created' Event and the 'dcm2niix-scan' Action, and write a quick filter to ensure that only scans with DICOM resources are affected. After enabled, this Subscription will detect each new DICOM scan created in the selected project and launch the dcm2niix-scan container command on that scan. 

See more example uses: Event Service Examples

Event Service Quick Start

This tutorial demonstrates how to set up a simple container processing action in response to a scan-archive event. It requires a site administrator to Enable the XNAT Event Service and Install the Container Service in XNAT and set up the xnat/dcm2niiix container image.

See: Event Service Quick Start

Other Topics

Event Service History

Caveats and Limitations


$label.name