MCPcopy Create free account
hub / github.com/MITK/MITK / HandleGET_info

Method HandleGET_info

Modules/RESTAPI/src/mitkHealthController.cpp:59–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void 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
78void HealthController::SetFileAccessConfig(FileAccessMode mode, const std::vector<std::string>& allowedDirs)
79{

Callers 6

BuildEndpointRegistryMethod · 0.80
InfoResponseStructureMethod · 0.80
RegisterRoutesMethod · 0.80

Calls 1

Tested by 5

BuildEndpointRegistryMethod · 0.64
InfoResponseStructureMethod · 0.64