XNAT OHIF Plugin API

REST XAPI

The /viewer XAPI has these end points:

GET /viewer/projects/{projectId}/experiments/{experimentId}/exists
Returns 200 if JSON metadata exists for the specified session.
GET /viewer/projects/{projectId}/experiments/{experimentId}
Returns cached JSON metadata for the specified session or generates it if it doesn't exist.
POST /viewer/generate-all-metadata
Admin only command to rebuild all JSON metadata on the entire XNAT instance. This operation may take a long time if used on an instance with a large number of sessions.
POST /viewer/projects/{projectId}
Admin only command to regenerate JSON metadata for all sessions in the specified project.
POST /viewer/projects/{projectId}/subjects/{subjectId}
Admin only command to regenerate JSON metadata for all sessions in the specified subject.
POST /viewer/projects/{projectId}/experiments/{experimentId}
Admin only command to regenerate JSON metadata for the specified session. A tool used if automation is down for any reason.

Missing JSON being generated and cached in the GET request means a user with READ only permissions to a session can view a session without the need for admin/owner/member intervention.


The /ohifaiaa XAPI has these end points:

GET /ohifaiaa/projects/{projectId}/servers
Returns the AIAA server JSON for the specified project ID.
PUT /ohifaiaa/projects/{projectId}/servers
Sets the AIAA server JSON for the specified project.
GET /ohifaiaa/servers
Returns the AIAA server JSON for the site.
PUT /ohifaiaa/servers
Sets the AIAA server JSON for the site.

The /ohifroicolor XAPI has these end points:

GET /ohifroicolor/projects/{projectId}/roicolor
Returns the ROI Colors JSON for the specified project ID.
PUT /ohifroicolor/projects/{projectId}/roicolor

Sets the ROI Colors JSON for the specified project. Use a list of JSON objects with each item defining both ROI label and color values. The color should be specified with a comma-separated list of three numeric values (ranging from 0 to 255). Example:

[
  {
    "label": "Kidney (Right)",
    "color": "0, 204, 0"
  },
  {
    "label": "Kidney (Left)",
    "color": "255, 51, 51"
  },
  {
    "label": "liver",
    "color": "255, 255, 51"
  }
]

$label.name