Appwrite C++ SDK
Auto-generated API documentation for the Appwrite C++ SDK
Loading...
Searching...
No Matches
Health.hpp
Go to the documentation of this file.
1/// @file Health.hpp
2/// @brief Exposes health check APIs to verify Appwrite server status and
3/// service uptime.
4#ifndef HEALTH_HPP
5#define HEALTH_HPP
6
7#include "Utils.hpp"
10#include <string>
11
12/**
13 * @class Health
14 * @brief Monitors the status of Appwrite's internal services.
15 */
16class Health {
17 public:
18 /**
19 * @brief Constructor for Health class.
20 * @param projectId Appwrite project ID.
21 * @param apiKey Appwrite API key.
22 */
23 Health(const std::string &projectId, const std::string &apiKey);
24
25 /**
26 * @brief Check overall Appwrite health.
27 * @return JSON string with health status.
28 */
29 std::string getHealthStatus();
30
31 /**
32 * @brief Check Antivirus service status.
33 * @return JSON string with antivirus health.
34 */
35 std::string getAntivirus();
36
37 /**
38 * @brief Check cache service status.
39 * @return JSON string with cache health.
40 */
41 std::string getCache();
42
43 /**
44 * @brief Check database service status.
45 * @return JSON string with database health.
46 */
47 std::string getDB();
48
49 /**
50 * @brief Check pub/sub service status.
51 * @return JSON string with pub/sub health.
52 */
53 std::string getPubSub();
54
55 /**
56 * @brief Check storage service status.
57 * @return JSON string with storage health.
58 */
59 std::string getStorage();
60
61 /**
62 * @brief Check local storage service status.
63 * @return JSON string with local storage health.
64 */
65 std::string getStorageLocal();
66
67 /**
68 * @brief Get current server time.
69 * @return JSON string with server time.
70 */
71 std::string getTime();
72
73 /**
74 * @brief Check job queue service status.
75 * @return JSON string with queue health.
76 */
77 std::string getQueue();
78
79 /**
80 * @brief Get SSL certificate status for a domain.
81 * @param domain Domain name to check.
82 * @return JSON string with certificate status.
83 */
84 std::string getCertificate(const std::string &domain = "");
85
86 /**
87 * @brief Get queued emails.
88 * @param domain Optional domain to filter.
89 * @return JSON string with email queue.
90 */
91 std::string getQueueMails(const std::string &domain = "");
92
93 /**
94 * @brief Get queued certificate jobs.
95 * @param threshold Optional threshold filter.
96 * @return JSON string with certificate queue.
97 */
98 std::string getQueueCertificates(const std::string &threshold = "");
99
100 /**
101 * @brief Get queued build jobs.
102 * @param threshold Optional threshold filter.
103 * @return JSON string with build queue.
104 */
105 std::string getQueueBuilds(const std::string &threshold = "");
106
107 /**
108 * @brief Get queued messaging jobs.
109 * @param threshold Optional threshold filter.
110 * @return JSON string with messaging queue.
111 */
112 std::string getQueueMessaging(const std::string &threshold = "");
113
114 /**
115 * @brief Get queued database migrations.
116 * @param threshold Optional threshold filter.
117 * @return JSON string with migration queue.
118 */
119 std::string getQueueMigrations(const std::string &threshold = "");
120
121 /**
122 * @brief Get queued function executions.
123 * @param threshold Optional threshold filter.
124 * @return JSON string with function queue.
125 */
126 std::string getQueueFunctions(const std::string &threshold = "");
127
128 /**
129 * @brief Get queued usage webhook events.
130 * @param threshold Optional threshold filter.
131 * @return JSON string with usage webhook queue.
132 */
133 std::string getQueueUsageWebhooks(const std::string &threshold = "");
134
135 /**
136 * @brief Get queued usage dump jobs.
137 * @param threshold Optional threshold filter.
138 * @return JSON string with usage dump queue.
139 */
140 std::string getQueueUsageDump(const std::string &threshold = "");
141
142 private:
143 std::string apiKey; ///< Appwrite API key
144 std::string projectId; ///< Appwrite project ID
145};
146
147#endif
Declares the base exception class used to represent Appwrite SDK errors.
Defines HTTP status code enums for consistent error and response handling.
Provides utility functions and helpers used across the SDK.
Monitors the status of Appwrite's internal services.
Definition Health.hpp:16
std::string getStorage()
Check storage service status.
std::string getQueueMessaging(const std::string &threshold="")
Get queued messaging jobs.
std::string getQueueFunctions(const std::string &threshold="")
Get queued function executions.
std::string getTime()
Get current server time.
std::string getCertificate(const std::string &domain="")
Get SSL certificate status for a domain.
std::string getStorageLocal()
Check local storage service status.
std::string getPubSub()
Check pub/sub service status.
std::string getDB()
Check database service status.
std::string getQueueMigrations(const std::string &threshold="")
Get queued database migrations.
std::string getQueueMails(const std::string &domain="")
Get queued emails.
std::string getQueueBuilds(const std::string &threshold="")
Get queued build jobs.
Health(const std::string &projectId, const std::string &apiKey)
Constructor for Health class.
std::string getAntivirus()
Check Antivirus service status.
std::string getQueueUsageDump(const std::string &threshold="")
Get queued usage dump jobs.
std::string getCache()
Check cache service status.
std::string getQueue()
Check job queue service status.
std::string getQueueUsageWebhooks(const std::string &threshold="")
Get queued usage webhook events.
std::string getHealthStatus()
Check overall Appwrite health.
std::string getQueueCertificates(const std::string &threshold="")
Get queued certificate jobs.