| 57 | } |
| 58 | |
| 59 | void HealthController::HandleGET_info(const httplib::Request& /*req*/, httplib::Response& res) |
| 60 | { |
| 61 | nlohmann::json response; |
| 62 | |
| 63 | response["data"]["name"] = "MITK Workbench REST API"; |
| 64 | response["data"]["api_version"] = "v1"; |
| 65 | response["data"]["mitk_version"] = MITK_VERSION_STRING; |
| 66 | response["data"]["documentation_url"] = |
| 67 | GetRestApiDocumentationUrl(MITK_VERSION_MAJOR, MITK_VERSION_MINOR, MITK_VERSION_PATCH); |
| 68 | nlohmann::json capabilities; |
| 69 | capabilities["transfer_modes"] = nlohmann::json::array({"direct", "file-reference"}); |
| 70 | capabilities["authentication"] = nlohmann::json::array({"api-token"}); |
| 71 | |
| 72 | response["data"]["capabilities"] = capabilities; |
| 73 | |
| 74 | res.status = 200; |
| 75 | res.set_content(response.dump(), "application/json"); |
| 76 | } |
| 77 | |
| 78 | void HealthController::SetFileAccessConfig(FileAccessMode mode, const std::vector<std::string>& allowedDirs) |
| 79 | { |