comparison OrthancServer/OrthancRestApi.cpp @ 151:11e48e70c039

instance naming
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 23 Oct 2012 14:34:57 +0200
parents fe180eae201d
children 93e1b0e3b83a
comparison
equal deleted inserted replaced
150:1058c115aed1 151:11e48e70c039
416 416
417 bool existingResource = false; 417 bool existingResource = false;
418 Json::Value result(Json::objectValue); 418 Json::Value result(Json::objectValue);
419 419
420 420
421 // Version information ------------------------------------------------------
422
423 if (uri.size() == 1 && uri[0] == "system")
424 {
425 if (method == "GET")
426 {
427 result = Json::Value(Json::objectValue);
428 result["Version"] = ORTHANC_VERSION;
429 result["Name"] = GetGlobalStringParameter("Name", "");
430 existingResource = true;
431 }
432 else
433 {
434 output.SendMethodNotAllowedError("GET,POST");
435 return;
436 }
437 }
438
439
421 // List all the instances --------------------------------------------------- 440 // List all the instances ---------------------------------------------------
422 441
423 if (uri.size() == 1 && uri[0] == "instances") 442 if (uri.size() == 1 && uri[0] == "instances")
424 { 443 {
425 if (method == "GET") 444 if (method == "GET")