Mercurial > hg > orthanc
diff 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 |
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi.cpp Tue Oct 16 15:30:19 2012 +0200 +++ b/OrthancServer/OrthancRestApi.cpp Tue Oct 23 14:34:57 2012 +0200 @@ -418,6 +418,25 @@ Json::Value result(Json::objectValue); + // Version information ------------------------------------------------------ + + if (uri.size() == 1 && uri[0] == "system") + { + if (method == "GET") + { + result = Json::Value(Json::objectValue); + result["Version"] = ORTHANC_VERSION; + result["Name"] = GetGlobalStringParameter("Name", ""); + existingResource = true; + } + else + { + output.SendMethodNotAllowedError("GET,POST"); + return; + } + } + + // List all the instances --------------------------------------------------- if (uri.size() == 1 && uri[0] == "instances")