comparison OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp @ 5275:8686476e9d12

fix inclusion of winsock.h
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 14 Apr 2023 13:16:41 +0200
parents e5b0bd6b2242
children c04230962098 78c59b02b121
comparison
equal deleted inserted replaced
5274:e5b0bd6b2242 5275:8686476e9d12
428 call.GetDocumentation() 428 call.GetDocumentation()
429 .SetTag("Instances") 429 .SetTag("Instances")
430 .SetSummary("Write DICOM onto filesystem") 430 .SetSummary("Write DICOM onto filesystem")
431 .SetDescription("Write the DICOM file onto the filesystem where Orthanc is running. This is insecure for " 431 .SetDescription("Write the DICOM file onto the filesystem where Orthanc is running. This is insecure for "
432 "Orthanc servers that are remotely accessible since one could overwrite any system file. " 432 "Orthanc servers that are remotely accessible since one could overwrite any system file. "
433 "Since Orthanc 1.12.0, this route is disabled by default and can be enabled thanks to " 433 "Since Orthanc 1.12.0, this route is disabled by default, but can be enabled using "
434 "the `RestApiWriteToFileSystemEnabled` configuration.") 434 "the `RestApiWriteToFileSystemEnabled` configuration option.")
435 .AddRequestType(MimeType_PlainText, "The Lua script to be executed")
436
437 .SetUriArgument("id", "Orthanc identifier of the DICOM instance of interest") 435 .SetUriArgument("id", "Orthanc identifier of the DICOM instance of interest")
438 .AddRequestType(MimeType_PlainText, "Target path on the filesystem"); 436 .AddRequestType(MimeType_PlainText, "Target path on the filesystem");
439 return; 437 return;
440 } 438 }
441 439
1999 { 1997 {
2000 ResourceType t = StringToResourceType(call.GetFullUri()[0].c_str()); 1998 ResourceType t = StringToResourceType(call.GetFullUri()[0].c_str());
2001 std::string r = GetResourceTypeText(t, false /* plural */, false /* upper case */); 1999 std::string r = GetResourceTypeText(t, false /* plural */, false /* upper case */);
2002 call.GetDocumentation() 2000 call.GetDocumentation()
2003 .SetTag(GetResourceTypeText(t, true /* plural */, true /* upper case */)) 2001 .SetTag(GetResourceTypeText(t, true /* plural */, true /* upper case */))
2004 .SetSummary("List labels (new in Orthanc 1.12.0)") 2002 .SetSummary("List labels")
2005 .SetDescription("Get the labels that are associated with the given " + r) 2003 .SetDescription("Get the labels that are associated with the given " + r + " (new in Orthanc 1.12.0)")
2006 .SetUriArgument("id", "Orthanc identifier of the " + r + " of interest") 2004 .SetUriArgument("id", "Orthanc identifier of the " + r + " of interest")
2007 .AddAnswerType(MimeType_Json, "JSON array containing the names of the labels") 2005 .AddAnswerType(MimeType_Json, "JSON array containing the names of the labels")
2008 .SetHttpGetSample(GetDocumentationSampleResource(t) + "/labels", true); 2006 .SetHttpGetSample(GetDocumentationSampleResource(t) + "/labels", true);
2009 return; 2007 return;
2010 } 2008 }