# HG changeset patch # User Sebastien Jodogne # Date 1715247126 -7200 # Node ID f1ce8dd361b75bd9e7d24806fe5a422368138b56 # Parent 599ce5ed126c61f515d7d4d5bda7907eda4db8ff# Parent 1a995c6f9dae5f2c2e24435cba245ac5455ebc46 integration default->find-refactoring diff -r 599ce5ed126c -r f1ce8dd361b7 NEWS --- a/NEWS Thu May 09 11:31:05 2024 +0200 +++ b/NEWS Thu May 09 11:32:06 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". * TODO-FIND: complete the list of updated routes: /studies?expand and sibbling routes now also return "Metadata" (if the DB implements 'extended-api-v1') diff -r 599ce5ed126c -r f1ce8dd361b7 OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp Thu May 09 11:31:05 2024 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp Thu May 09 11:32:06 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)