13 #ifndef mitkIRestServerService_h
14 #define mitkIRestServerService_h
20 namespace mitk {
class RenderWindowBridge; }
#define MITKRESTAPI_EXPORT
Abstract data management class that organizes DataNode objects in a directed acyclic graph.
Bridge between the REST API server and the Qt/render-window layer.
Provides the MITK_DECLARE_SERVICE_INTERFACE macro for registering C++ interfaces with both the CppMic...
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Declare a C++ interface for use with CppMicroServices (Qt not available).
Find image slices visible on a given plane.
Service interface for the REST API server.
virtual RestServerConfig GetPendingConfig() const =0
Get the pending server configuration.
virtual bool IsRunning() const =0
Check if the server is currently running.
virtual DataStorage::Pointer GetDataStorage() const =0
Get the currently connected DataStorage.
virtual std::optional< int64_t > GetUptimeSeconds() const =0
Get the server uptime in seconds.
virtual void SetLogLimit(std::optional< unsigned int > limit)=0
Set the request log limit.
virtual ~IRestServerService()
virtual RenderWindowBridge * GetRenderWindowBridge()=0
Return the server-owned RenderWindowBridge.
virtual void Stop()=0
Stop the REST server.
virtual std::optional< std::string > GetLastError() const =0
Get the last error message.
virtual void SetDataStorage(DataStorage *dataStorage)=0
Set the DataStorage for REST API operations.
virtual std::vector< std::string > GetClientIPs() const =0
Get the list of client IP addresses that have sent requests.
virtual uint64_t GetRequestLogVersion() const =0
Get the request log version counter.
virtual void SetConfig(const RestServerConfig &config)=0
Set the pending server configuration.
virtual std::optional< RestServerConfig > GetRunningConfig() const =0
Get the configuration the server is currently running with.
virtual std::vector< RequestInfo > GetRequestLog() const =0
Get all logged requests.
virtual void ClearRequestLog()=0
Clear all logged requests.
virtual std::optional< unsigned int > GetLogLimit() const =0
Get the current request log limit.
virtual bool Start()=0
Start the REST server with the pending configuration.
virtual std::optional< RequestInfo > GetLastRequestInfo() const =0
Get information about the last request processed.
virtual std::optional< std::string > GetServerUrl() const =0
Get the full URL where the server is listening.
Information about a REST API request.
int responseCode
HTTP response code (200, 404, 500, etc.)
std::string method
HTTP method (GET, POST, PUT, DELETE)
std::string endpoint
The endpoint path (e.g., "/nodes", "/nodes/123")
std::string clientIP
IP address of the client.
Configuration parameters for the REST API server.