Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkNodeQueryParams.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkNodeQueryParams_h
14 #define mitkNodeQueryParams_h
15 
16 #include <optional>
17 #include <string>
18 #include <vector>
19 
20 #include <MitkRESTAPIExports.h>
21 
22 namespace mitk
23 {
32  enum class Hierarchy
33  {
34  All,
35  Toplevel
36  };
37 
47  enum class PropertyScope
48  {
49  All,
50  Node,
51  Data
52  };
53 
66  struct MITKRESTAPI_EXPORT PropertyFilter
67  {
68  std::string key;
69  std::string value;
70  bool negated = false;
71  };
72 
82  {
83  std::string field;
84  bool ascending = true;
85  };
86 
96  {
97  int limit = 50;
98  int offset = 0;
99 
100  Hierarchy hierarchy = Hierarchy::All;
101 
102  std::optional<std::string> path;
103  std::optional<std::string> dataType;
104  std::optional<std::string> parentUid;
105 
106  std::vector<PropertyFilter> propertyFilters;
107 
108  std::optional<std::string> context;
110 
111  std::vector<std::string> fields;
112 
113  std::optional<SortSpec> sort;
114  };
115 
125  {
126  std::optional<std::string> context;
128  bool includeContent = true;
129  std::vector<std::string> names;
130  };
131 }
132 
133 #endif
#define MITKRESTAPI_EXPORT
std::string key
The property key to filter on.
std::string value
The value to match against (may contain wildcards).
Find image slices visible on a given plane.
PropertyScope
Enumeration for property scope in REST API queries.
@ Node
Only properties from the DataNode's property list.
@ All
Both node and data properties (node takes precedence on conflicts).
@ Data
Only properties from the BaseData's property list.
Hierarchy
Enumeration for hierarchy filter used in node queries.
@ Toplevel
Return only root nodes (nodes with no parent).
@ All
Return all nodes in the DataStorage.
Query parameters for the GET /datastorage/nodes endpoint.
std::vector< std::string > fields
Fields to include in the response (empty means all fields).
std::optional< std::string > path
Filter by path-based lookup.
std::optional< std::string > parentUid
Filter by parent node UID (use "null" for root nodes).
std::vector< PropertyFilter > propertyFilters
Property-based filter criteria.
std::optional< SortSpec > sort
Optional sort specification.
std::optional< std::string > context
Renderer context name for property lookups.
std::optional< std::string > dataType
Filter by MITK data type name.
Query parameters for the GET /datastorage/nodes/{uid}/properties endpoint.
std::vector< std::string > names
Specific property names to return (empty means all properties).
std::optional< std::string > context
Renderer context name for property lookup.
Sort specification for node query results.
std::string field
The field name to sort by (e.g., "name", "timestamp").