comparison OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp @ 5238:367e8af46cfd db-protobuf

added "HasLabels" in /system
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Apr 2023 10:02:19 +0200
parents 08e0c9c0ab39
children f22c8fac764b
comparison
equal deleted inserted replaced
5237:cd2258ca7894 5238:367e8af46cfd
87 static const char* const OVERWRITE_INSTANCES = "OverwriteInstances"; 87 static const char* const OVERWRITE_INSTANCES = "OverwriteInstances";
88 static const char* const INGEST_TRANSCODING = "IngestTranscoding"; 88 static const char* const INGEST_TRANSCODING = "IngestTranscoding";
89 static const char* const MAXIMUM_STORAGE_SIZE = "MaximumStorageSize"; 89 static const char* const MAXIMUM_STORAGE_SIZE = "MaximumStorageSize";
90 static const char* const MAXIMUM_STORAGE_MODE = "MaximumStorageMode"; 90 static const char* const MAXIMUM_STORAGE_MODE = "MaximumStorageMode";
91 static const char* const USER_METADATA = "UserMetadata"; 91 static const char* const USER_METADATA = "UserMetadata";
92 static const char* const HAS_LABELS = "HasLabels";
92 93
93 if (call.IsDocumentation()) 94 if (call.IsDocumentation())
94 { 95 {
95 call.GetDocumentation() 96 call.GetDocumentation()
96 .SetTag("System") 97 .SetTag("System")
129 "The configured MaximumStorageSize in MB (new in Orthanc 1.11.3)") 130 "The configured MaximumStorageSize in MB (new in Orthanc 1.11.3)")
130 .SetAnswerField(MAXIMUM_STORAGE_MODE, RestApiCallDocumentation::Type_String, 131 .SetAnswerField(MAXIMUM_STORAGE_MODE, RestApiCallDocumentation::Type_String,
131 "The configured MaximumStorageMode (new in Orthanc 1.11.3)") 132 "The configured MaximumStorageMode (new in Orthanc 1.11.3)")
132 .SetAnswerField(USER_METADATA, RestApiCallDocumentation::Type_JsonObject, 133 .SetAnswerField(USER_METADATA, RestApiCallDocumentation::Type_JsonObject,
133 "The configured UserMetadata (new in Orthanc 1.12.0)") 134 "The configured UserMetadata (new in Orthanc 1.12.0)")
135 .SetAnswerField(HAS_LABELS, RestApiCallDocumentation::Type_Boolean,
136 "Whether the database back-end supports labels (new in Orthanc 1.12.0)")
134 .SetHttpGetSample("https://demo.orthanc-server.com/system", true); 137 .SetHttpGetSample("https://demo.orthanc-server.com/system", true);
135 return; 138 return;
136 } 139 }
137 140
138 ServerContext& context = OrthancRestApi::GetContext(call); 141 ServerContext& context = OrthancRestApi::GetContext(call);
185 GetMainDicomTagsConfiguration(result[MAIN_DICOM_TAGS]); 188 GetMainDicomTagsConfiguration(result[MAIN_DICOM_TAGS]);
186 189
187 result[USER_METADATA] = Json::objectValue; 190 result[USER_METADATA] = Json::objectValue;
188 GetUserMetadataConfiguration(result[USER_METADATA]); 191 GetUserMetadataConfiguration(result[USER_METADATA]);
189 192
193 result[HAS_LABELS] = OrthancRestApi::GetIndex(call).HasLabelsSupport();
194
190 call.GetOutput().AnswerJson(result); 195 call.GetOutput().AnswerJson(result);
191 } 196 }
192 197
193 static void GetStatistics(RestApiGetCall& call) 198 static void GetStatistics(RestApiGetCall& call)
194 { 199 {