# HG changeset patch # User Sebastien Jodogne # Date 1715244190 -7200 # Node ID 1a995c6f9dae5f2c2e24435cba245ac5455ebc46 # Parent c2a2fb8e868d6fd21a3f5af57dccd6a776b18e76 deprecating the "requestedTags" GET argument in favor of "requested-tags" diff -r c2a2fb8e868d -r 1a995c6f9dae NEWS --- a/NEWS Wed May 08 10:30:34 2024 +0200 +++ b/NEWS Thu May 09 10:43:10 2024 +0200 @@ -10,6 +10,7 @@ /patients|studies|series/instances/../reconstruct to speed up the reconstruction in case you just want to update the MainDicomTags of that resource level only e.g. after you have updated the 'ExtraMainDicomTags' for this level. +* The "requestedTags" GET argument was deprecated in favor of "requested-tags". Plugins ------- diff -r c2a2fb8e868d -r 1a995c6f9dae OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp Wed May 08 10:30:34 2024 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp Thu May 09 10:43:10 2024 +0200 @@ -489,7 +489,8 @@ static const std::string GET_SIMPLIFY = "simplify"; static const std::string GET_FULL = "full"; static const std::string GET_SHORT = "short"; - static const std::string GET_REQUESTED_TAGS = "requestedTags"; + static const std::string GET_REQUESTED_TAGS_OLD = "requestedTags"; // This was the only option in Orthanc <= 1.12.3 + static const std::string GET_REQUESTED_TAGS = "requested-tags"; static const std::string POST_SIMPLIFY = "Simplify"; static const std::string POST_FULL = "Full"; @@ -603,18 +604,29 @@ { requestedTags.clear(); + std::string s; + if (call.HasArgument(GET_REQUESTED_TAGS)) { + s = call.GetArgument(GET_REQUESTED_TAGS, ""); + } + else if (call.HasArgument(GET_REQUESTED_TAGS_OLD)) + { + // This is for backward compatibility with Orthanc <= 1.12.3 + s = call.GetArgument(GET_REQUESTED_TAGS_OLD, ""); + } + + if (!s.empty()) + { try { - FromDcmtkBridge::ParseListOfTags(requestedTags, call.GetArgument("requestedTags", "")); + FromDcmtkBridge::ParseListOfTags(requestedTags, s); } catch (OrthancException& ex) { throw OrthancException(ErrorCode_BadRequest, std::string("Invalid requestedTags argument: ") + ex.What() + " " + ex.GetDetails()); } } - } void OrthancRestApi::DocumentRequestedTags(RestApiGetCall& call)