diff 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
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp	Wed Apr 05 09:07:47 2023 +0200
+++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp	Wed Apr 05 10:02:19 2023 +0200
@@ -89,6 +89,7 @@
     static const char* const MAXIMUM_STORAGE_SIZE = "MaximumStorageSize";
     static const char* const MAXIMUM_STORAGE_MODE = "MaximumStorageMode";
     static const char* const USER_METADATA = "UserMetadata";
+    static const char* const HAS_LABELS = "HasLabels";
 
     if (call.IsDocumentation())
     {
@@ -131,6 +132,8 @@
                         "The configured MaximumStorageMode (new in Orthanc 1.11.3)")
         .SetAnswerField(USER_METADATA, RestApiCallDocumentation::Type_JsonObject,
                         "The configured UserMetadata (new in Orthanc 1.12.0)")
+        .SetAnswerField(HAS_LABELS, RestApiCallDocumentation::Type_Boolean,
+                        "Whether the database back-end supports labels (new in Orthanc 1.12.0)")
         .SetHttpGetSample("https://demo.orthanc-server.com/system", true);
       return;
     }
@@ -187,6 +190,8 @@
     result[USER_METADATA] = Json::objectValue;
     GetUserMetadataConfiguration(result[USER_METADATA]);
 
+    result[HAS_LABELS] = OrthancRestApi::GetIndex(call).HasLabelsSupport();
+    
     call.GetOutput().AnswerJson(result);
   }