appwrite 25.1.0 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +18 -4
- data/lib/appwrite/enums/billing_plan_group.rb +9 -0
- data/lib/appwrite/enums/database_status.rb +9 -0
- data/lib/appwrite/enums/o_auth2_oidc_prompt.rb +10 -0
- data/lib/appwrite/enums/o_auth_provider.rb +1 -0
- data/lib/appwrite/enums/organization_key_scopes.rb +4 -0
- data/lib/appwrite/enums/project_key_scopes.rb +7 -2
- data/lib/appwrite/enums/project_o_auth2_oidc_prompt.rb +10 -0
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +1 -0
- data/lib/appwrite/enums/project_policy_id.rb +1 -0
- data/lib/appwrite/enums/project_service_id.rb +1 -0
- data/lib/appwrite/models/activity_event.rb +3 -73
- data/lib/appwrite/models/additional_resource.rb +52 -0
- data/lib/appwrite/models/backup_policy.rb +5 -0
- data/lib/appwrite/models/billing_plan.rb +379 -0
- data/lib/appwrite/models/billing_plan_addon.rb +32 -0
- data/lib/appwrite/models/billing_plan_addon_details.rb +62 -0
- data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +117 -0
- data/lib/appwrite/models/billing_plan_limits.rb +32 -0
- data/lib/appwrite/models/billing_plan_supported_addons.rb +37 -0
- data/lib/appwrite/models/block.rb +5 -0
- data/lib/appwrite/models/database.rb +19 -0
- data/lib/appwrite/models/locale.rb +58 -3
- data/lib/appwrite/models/membership.rb +5 -0
- data/lib/appwrite/models/o_auth2_appwrite.rb +42 -0
- data/lib/appwrite/models/o_auth2_oidc.rb +13 -3
- data/lib/appwrite/models/organization.rb +197 -0
- data/lib/appwrite/models/policy_deny_corporate_email.rb +32 -0
- data/lib/appwrite/models/policy_membership_privacy.rb +8 -3
- data/lib/appwrite/models/program.rb +67 -0
- data/lib/appwrite/models/project.rb +46 -11
- data/lib/appwrite/models/usage_billing_plan.rb +77 -0
- data/lib/appwrite/models/user.rb +25 -0
- data/lib/appwrite/query.rb +13 -1
- data/lib/appwrite/services/account.rb +42 -1
- data/lib/appwrite/services/activities.rb +2 -0
- data/lib/appwrite/services/advisor.rb +4 -0
- data/lib/appwrite/services/avatars.rb +8 -0
- data/lib/appwrite/services/backups.rb +25 -1
- data/lib/appwrite/services/databases.rb +107 -0
- data/lib/appwrite/services/functions.rb +30 -4
- data/lib/appwrite/services/graphql.rb +2 -0
- data/lib/appwrite/services/locale.rb +8 -0
- data/lib/appwrite/services/messaging.rb +42 -136
- data/lib/appwrite/services/organization.rb +268 -3
- data/lib/appwrite/services/presences.rb +4 -0
- data/lib/appwrite/services/project.rb +190 -9
- data/lib/appwrite/services/proxy.rb +7 -0
- data/lib/appwrite/services/sites.rb +25 -1
- data/lib/appwrite/services/storage.rb +11 -0
- data/lib/appwrite/services/tables_db.rb +68 -1
- data/lib/appwrite/services/teams.rb +11 -0
- data/lib/appwrite/services/tokens.rb +4 -0
- data/lib/appwrite/services/users.rb +38 -1
- data/lib/appwrite/services/webhooks.rb +5 -0
- data/lib/appwrite.rb +16 -15
- metadata +18 -17
- data/lib/appwrite/enums/health_antivirus_status.rb +0 -9
- data/lib/appwrite/enums/health_check_status.rb +0 -8
- data/lib/appwrite/enums/health_queue_name.rb +0 -19
- data/lib/appwrite/models/health_antivirus.rb +0 -49
- data/lib/appwrite/models/health_certificate.rb +0 -52
- data/lib/appwrite/models/health_queue.rb +0 -27
- data/lib/appwrite/models/health_status.rb +0 -53
- data/lib/appwrite/models/health_status_list.rb +0 -32
- data/lib/appwrite/models/health_time.rb +0 -37
- data/lib/appwrite/models/usage_event.rb +0 -72
- data/lib/appwrite/models/usage_event_list.rb +0 -32
- data/lib/appwrite/models/usage_gauge.rb +0 -47
- data/lib/appwrite/models/usage_gauge_list.rb +0 -32
- data/lib/appwrite/services/health.rb +0 -681
- data/lib/appwrite/services/usage.rb +0 -88
|
@@ -1,681 +0,0 @@
|
|
|
1
|
-
#frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Appwrite
|
|
4
|
-
class Health < Service
|
|
5
|
-
|
|
6
|
-
def initialize(client)
|
|
7
|
-
@client = client
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
# Check the Appwrite HTTP server is up and responsive.
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
# @return [HealthStatus]
|
|
14
|
-
def get()
|
|
15
|
-
api_path = '/health'
|
|
16
|
-
|
|
17
|
-
api_params = {
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
api_headers = {
|
|
21
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@client.call(
|
|
25
|
-
method: 'GET',
|
|
26
|
-
path: api_path,
|
|
27
|
-
headers: api_headers,
|
|
28
|
-
params: api_params,
|
|
29
|
-
response_type: Models::HealthStatus
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
# Check the Appwrite Antivirus server is up and connection is successful.
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
# @return [HealthAntivirus]
|
|
38
|
-
def get_antivirus()
|
|
39
|
-
api_path = '/health/anti-virus'
|
|
40
|
-
|
|
41
|
-
api_params = {
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
api_headers = {
|
|
45
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@client.call(
|
|
49
|
-
method: 'GET',
|
|
50
|
-
path: api_path,
|
|
51
|
-
headers: api_headers,
|
|
52
|
-
params: api_params,
|
|
53
|
-
response_type: Models::HealthAntivirus
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
# Check the database that backs the audit and activity store. When the
|
|
59
|
-
# connection is reachable the endpoint returns a passing status with its
|
|
60
|
-
# response time.
|
|
61
|
-
#
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
# @return [HealthStatusList]
|
|
65
|
-
def get_audits_db()
|
|
66
|
-
api_path = '/health/audits-db'
|
|
67
|
-
|
|
68
|
-
api_params = {
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
api_headers = {
|
|
72
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@client.call(
|
|
76
|
-
method: 'GET',
|
|
77
|
-
path: api_path,
|
|
78
|
-
headers: api_headers,
|
|
79
|
-
params: api_params,
|
|
80
|
-
response_type: Models::HealthStatusList
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
# Check the Appwrite in-memory cache servers are up and connection is
|
|
86
|
-
# successful.
|
|
87
|
-
#
|
|
88
|
-
#
|
|
89
|
-
# @return [HealthStatusList]
|
|
90
|
-
def get_cache()
|
|
91
|
-
api_path = '/health/cache'
|
|
92
|
-
|
|
93
|
-
api_params = {
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
api_headers = {
|
|
97
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
@client.call(
|
|
101
|
-
method: 'GET',
|
|
102
|
-
path: api_path,
|
|
103
|
-
headers: api_headers,
|
|
104
|
-
params: api_params,
|
|
105
|
-
response_type: Models::HealthStatusList
|
|
106
|
-
)
|
|
107
|
-
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
# Get the SSL certificate for a domain
|
|
111
|
-
#
|
|
112
|
-
# @param [String] domain string
|
|
113
|
-
#
|
|
114
|
-
# @return [HealthCertificate]
|
|
115
|
-
def get_certificate(domain: nil)
|
|
116
|
-
api_path = '/health/certificate'
|
|
117
|
-
|
|
118
|
-
api_params = {
|
|
119
|
-
domain: domain,
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
api_headers = {
|
|
123
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
@client.call(
|
|
127
|
-
method: 'GET',
|
|
128
|
-
path: api_path,
|
|
129
|
-
headers: api_headers,
|
|
130
|
-
params: api_params,
|
|
131
|
-
response_type: Models::HealthCertificate
|
|
132
|
-
)
|
|
133
|
-
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
# Get console pausing health status. Monitors projects approaching the pause
|
|
137
|
-
# threshold to detect potential issues with console access tracking.
|
|
138
|
-
#
|
|
139
|
-
#
|
|
140
|
-
# @param [Integer] threshold Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.
|
|
141
|
-
# @param [Integer] inactivity_days Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.
|
|
142
|
-
#
|
|
143
|
-
# @return [HealthStatus]
|
|
144
|
-
def get_console_pausing(threshold: nil, inactivity_days: nil)
|
|
145
|
-
api_path = '/health/console-pausing'
|
|
146
|
-
|
|
147
|
-
api_params = {
|
|
148
|
-
threshold: threshold,
|
|
149
|
-
inactivityDays: inactivity_days,
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
api_headers = {
|
|
153
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
@client.call(
|
|
157
|
-
method: 'GET',
|
|
158
|
-
path: api_path,
|
|
159
|
-
headers: api_headers,
|
|
160
|
-
params: api_params,
|
|
161
|
-
response_type: Models::HealthStatus
|
|
162
|
-
)
|
|
163
|
-
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
# Check the Appwrite database servers are up and connection is successful.
|
|
167
|
-
#
|
|
168
|
-
#
|
|
169
|
-
# @return [HealthStatusList]
|
|
170
|
-
def get_db()
|
|
171
|
-
api_path = '/health/db'
|
|
172
|
-
|
|
173
|
-
api_params = {
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
api_headers = {
|
|
177
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
@client.call(
|
|
181
|
-
method: 'GET',
|
|
182
|
-
path: api_path,
|
|
183
|
-
headers: api_headers,
|
|
184
|
-
params: api_params,
|
|
185
|
-
response_type: Models::HealthStatusList
|
|
186
|
-
)
|
|
187
|
-
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
# Check the Appwrite pub-sub servers are up and connection is successful.
|
|
191
|
-
#
|
|
192
|
-
#
|
|
193
|
-
# @return [HealthStatusList]
|
|
194
|
-
def get_pub_sub()
|
|
195
|
-
api_path = '/health/pubsub'
|
|
196
|
-
|
|
197
|
-
api_params = {
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
api_headers = {
|
|
201
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
@client.call(
|
|
205
|
-
method: 'GET',
|
|
206
|
-
path: api_path,
|
|
207
|
-
headers: api_headers,
|
|
208
|
-
params: api_params,
|
|
209
|
-
response_type: Models::HealthStatusList
|
|
210
|
-
)
|
|
211
|
-
|
|
212
|
-
end
|
|
213
|
-
|
|
214
|
-
# Get the number of audit logs that are waiting to be processed in the
|
|
215
|
-
# Appwrite internal queue server.
|
|
216
|
-
#
|
|
217
|
-
#
|
|
218
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
219
|
-
#
|
|
220
|
-
# @return [HealthQueue]
|
|
221
|
-
def get_queue_audits(threshold: nil)
|
|
222
|
-
api_path = '/health/queue/audits'
|
|
223
|
-
|
|
224
|
-
api_params = {
|
|
225
|
-
threshold: threshold,
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
api_headers = {
|
|
229
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
@client.call(
|
|
233
|
-
method: 'GET',
|
|
234
|
-
path: api_path,
|
|
235
|
-
headers: api_headers,
|
|
236
|
-
params: api_params,
|
|
237
|
-
response_type: Models::HealthQueue
|
|
238
|
-
)
|
|
239
|
-
|
|
240
|
-
end
|
|
241
|
-
|
|
242
|
-
# Get the number of builds that are waiting to be processed in the Appwrite
|
|
243
|
-
# internal queue server.
|
|
244
|
-
#
|
|
245
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
246
|
-
#
|
|
247
|
-
# @return [HealthQueue]
|
|
248
|
-
def get_queue_builds(threshold: nil)
|
|
249
|
-
api_path = '/health/queue/builds'
|
|
250
|
-
|
|
251
|
-
api_params = {
|
|
252
|
-
threshold: threshold,
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
api_headers = {
|
|
256
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
@client.call(
|
|
260
|
-
method: 'GET',
|
|
261
|
-
path: api_path,
|
|
262
|
-
headers: api_headers,
|
|
263
|
-
params: api_params,
|
|
264
|
-
response_type: Models::HealthQueue
|
|
265
|
-
)
|
|
266
|
-
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
# Get the number of certificates that are waiting to be issued against
|
|
270
|
-
# [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
|
|
271
|
-
# server.
|
|
272
|
-
#
|
|
273
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
274
|
-
#
|
|
275
|
-
# @return [HealthQueue]
|
|
276
|
-
def get_queue_certificates(threshold: nil)
|
|
277
|
-
api_path = '/health/queue/certificates'
|
|
278
|
-
|
|
279
|
-
api_params = {
|
|
280
|
-
threshold: threshold,
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
api_headers = {
|
|
284
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
@client.call(
|
|
288
|
-
method: 'GET',
|
|
289
|
-
path: api_path,
|
|
290
|
-
headers: api_headers,
|
|
291
|
-
params: api_params,
|
|
292
|
-
response_type: Models::HealthQueue
|
|
293
|
-
)
|
|
294
|
-
|
|
295
|
-
end
|
|
296
|
-
|
|
297
|
-
# Get the number of database changes that are waiting to be processed in the
|
|
298
|
-
# Appwrite internal queue server.
|
|
299
|
-
#
|
|
300
|
-
# @param [String] name Queue name for which to check the queue size
|
|
301
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
302
|
-
#
|
|
303
|
-
# @return [HealthQueue]
|
|
304
|
-
def get_queue_databases(name: nil, threshold: nil)
|
|
305
|
-
api_path = '/health/queue/databases'
|
|
306
|
-
|
|
307
|
-
api_params = {
|
|
308
|
-
name: name,
|
|
309
|
-
threshold: threshold,
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
api_headers = {
|
|
313
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
@client.call(
|
|
317
|
-
method: 'GET',
|
|
318
|
-
path: api_path,
|
|
319
|
-
headers: api_headers,
|
|
320
|
-
params: api_params,
|
|
321
|
-
response_type: Models::HealthQueue
|
|
322
|
-
)
|
|
323
|
-
|
|
324
|
-
end
|
|
325
|
-
|
|
326
|
-
# Get the number of background destructive changes that are waiting to be
|
|
327
|
-
# processed in the Appwrite internal queue server.
|
|
328
|
-
#
|
|
329
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
330
|
-
#
|
|
331
|
-
# @return [HealthQueue]
|
|
332
|
-
def get_queue_deletes(threshold: nil)
|
|
333
|
-
api_path = '/health/queue/deletes'
|
|
334
|
-
|
|
335
|
-
api_params = {
|
|
336
|
-
threshold: threshold,
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
api_headers = {
|
|
340
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
@client.call(
|
|
344
|
-
method: 'GET',
|
|
345
|
-
path: api_path,
|
|
346
|
-
headers: api_headers,
|
|
347
|
-
params: api_params,
|
|
348
|
-
response_type: Models::HealthQueue
|
|
349
|
-
)
|
|
350
|
-
|
|
351
|
-
end
|
|
352
|
-
|
|
353
|
-
# Returns the amount of failed jobs in a given queue.
|
|
354
|
-
#
|
|
355
|
-
#
|
|
356
|
-
# @param [HealthQueueName] name The name of the queue
|
|
357
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
358
|
-
#
|
|
359
|
-
# @return [HealthQueue]
|
|
360
|
-
def get_failed_jobs(name:, threshold: nil)
|
|
361
|
-
api_path = '/health/queue/failed/{name}'
|
|
362
|
-
.gsub('{name}', name)
|
|
363
|
-
|
|
364
|
-
if name.nil?
|
|
365
|
-
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
366
|
-
end
|
|
367
|
-
|
|
368
|
-
api_params = {
|
|
369
|
-
threshold: threshold,
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
api_headers = {
|
|
373
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
@client.call(
|
|
377
|
-
method: 'GET',
|
|
378
|
-
path: api_path,
|
|
379
|
-
headers: api_headers,
|
|
380
|
-
params: api_params,
|
|
381
|
-
response_type: Models::HealthQueue
|
|
382
|
-
)
|
|
383
|
-
|
|
384
|
-
end
|
|
385
|
-
|
|
386
|
-
# Get the number of function executions that are waiting to be processed in
|
|
387
|
-
# the Appwrite internal queue server.
|
|
388
|
-
#
|
|
389
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
390
|
-
#
|
|
391
|
-
# @return [HealthQueue]
|
|
392
|
-
def get_queue_functions(threshold: nil)
|
|
393
|
-
api_path = '/health/queue/functions'
|
|
394
|
-
|
|
395
|
-
api_params = {
|
|
396
|
-
threshold: threshold,
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
api_headers = {
|
|
400
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
@client.call(
|
|
404
|
-
method: 'GET',
|
|
405
|
-
path: api_path,
|
|
406
|
-
headers: api_headers,
|
|
407
|
-
params: api_params,
|
|
408
|
-
response_type: Models::HealthQueue
|
|
409
|
-
)
|
|
410
|
-
|
|
411
|
-
end
|
|
412
|
-
|
|
413
|
-
# Get the number of logs that are waiting to be processed in the Appwrite
|
|
414
|
-
# internal queue server.
|
|
415
|
-
#
|
|
416
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
417
|
-
#
|
|
418
|
-
# @return [HealthQueue]
|
|
419
|
-
def get_queue_logs(threshold: nil)
|
|
420
|
-
api_path = '/health/queue/logs'
|
|
421
|
-
|
|
422
|
-
api_params = {
|
|
423
|
-
threshold: threshold,
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
api_headers = {
|
|
427
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
@client.call(
|
|
431
|
-
method: 'GET',
|
|
432
|
-
path: api_path,
|
|
433
|
-
headers: api_headers,
|
|
434
|
-
params: api_params,
|
|
435
|
-
response_type: Models::HealthQueue
|
|
436
|
-
)
|
|
437
|
-
|
|
438
|
-
end
|
|
439
|
-
|
|
440
|
-
# Get the number of mails that are waiting to be processed in the Appwrite
|
|
441
|
-
# internal queue server.
|
|
442
|
-
#
|
|
443
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
444
|
-
#
|
|
445
|
-
# @return [HealthQueue]
|
|
446
|
-
def get_queue_mails(threshold: nil)
|
|
447
|
-
api_path = '/health/queue/mails'
|
|
448
|
-
|
|
449
|
-
api_params = {
|
|
450
|
-
threshold: threshold,
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
api_headers = {
|
|
454
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
@client.call(
|
|
458
|
-
method: 'GET',
|
|
459
|
-
path: api_path,
|
|
460
|
-
headers: api_headers,
|
|
461
|
-
params: api_params,
|
|
462
|
-
response_type: Models::HealthQueue
|
|
463
|
-
)
|
|
464
|
-
|
|
465
|
-
end
|
|
466
|
-
|
|
467
|
-
# Get the number of messages that are waiting to be processed in the Appwrite
|
|
468
|
-
# internal queue server.
|
|
469
|
-
#
|
|
470
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
471
|
-
#
|
|
472
|
-
# @return [HealthQueue]
|
|
473
|
-
def get_queue_messaging(threshold: nil)
|
|
474
|
-
api_path = '/health/queue/messaging'
|
|
475
|
-
|
|
476
|
-
api_params = {
|
|
477
|
-
threshold: threshold,
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
api_headers = {
|
|
481
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
@client.call(
|
|
485
|
-
method: 'GET',
|
|
486
|
-
path: api_path,
|
|
487
|
-
headers: api_headers,
|
|
488
|
-
params: api_params,
|
|
489
|
-
response_type: Models::HealthQueue
|
|
490
|
-
)
|
|
491
|
-
|
|
492
|
-
end
|
|
493
|
-
|
|
494
|
-
# Get the number of migrations that are waiting to be processed in the
|
|
495
|
-
# Appwrite internal queue server.
|
|
496
|
-
#
|
|
497
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
498
|
-
#
|
|
499
|
-
# @return [HealthQueue]
|
|
500
|
-
def get_queue_migrations(threshold: nil)
|
|
501
|
-
api_path = '/health/queue/migrations'
|
|
502
|
-
|
|
503
|
-
api_params = {
|
|
504
|
-
threshold: threshold,
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
api_headers = {
|
|
508
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
@client.call(
|
|
512
|
-
method: 'GET',
|
|
513
|
-
path: api_path,
|
|
514
|
-
headers: api_headers,
|
|
515
|
-
params: api_params,
|
|
516
|
-
response_type: Models::HealthQueue
|
|
517
|
-
)
|
|
518
|
-
|
|
519
|
-
end
|
|
520
|
-
|
|
521
|
-
# Get the number of metrics that are waiting to be processed in the Appwrite
|
|
522
|
-
# stats resources queue.
|
|
523
|
-
#
|
|
524
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
525
|
-
#
|
|
526
|
-
# @return [HealthQueue]
|
|
527
|
-
def get_queue_stats_resources(threshold: nil)
|
|
528
|
-
api_path = '/health/queue/stats-resources'
|
|
529
|
-
|
|
530
|
-
api_params = {
|
|
531
|
-
threshold: threshold,
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
api_headers = {
|
|
535
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
@client.call(
|
|
539
|
-
method: 'GET',
|
|
540
|
-
path: api_path,
|
|
541
|
-
headers: api_headers,
|
|
542
|
-
params: api_params,
|
|
543
|
-
response_type: Models::HealthQueue
|
|
544
|
-
)
|
|
545
|
-
|
|
546
|
-
end
|
|
547
|
-
|
|
548
|
-
# Get the number of metrics that are waiting to be processed in the Appwrite
|
|
549
|
-
# internal queue server.
|
|
550
|
-
#
|
|
551
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
552
|
-
#
|
|
553
|
-
# @return [HealthQueue]
|
|
554
|
-
def get_queue_usage(threshold: nil)
|
|
555
|
-
api_path = '/health/queue/stats-usage'
|
|
556
|
-
|
|
557
|
-
api_params = {
|
|
558
|
-
threshold: threshold,
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
api_headers = {
|
|
562
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
@client.call(
|
|
566
|
-
method: 'GET',
|
|
567
|
-
path: api_path,
|
|
568
|
-
headers: api_headers,
|
|
569
|
-
params: api_params,
|
|
570
|
-
response_type: Models::HealthQueue
|
|
571
|
-
)
|
|
572
|
-
|
|
573
|
-
end
|
|
574
|
-
|
|
575
|
-
# Get the number of webhooks that are waiting to be processed in the Appwrite
|
|
576
|
-
# internal queue server.
|
|
577
|
-
#
|
|
578
|
-
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
579
|
-
#
|
|
580
|
-
# @return [HealthQueue]
|
|
581
|
-
def get_queue_webhooks(threshold: nil)
|
|
582
|
-
api_path = '/health/queue/webhooks'
|
|
583
|
-
|
|
584
|
-
api_params = {
|
|
585
|
-
threshold: threshold,
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
api_headers = {
|
|
589
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
@client.call(
|
|
593
|
-
method: 'GET',
|
|
594
|
-
path: api_path,
|
|
595
|
-
headers: api_headers,
|
|
596
|
-
params: api_params,
|
|
597
|
-
response_type: Models::HealthQueue
|
|
598
|
-
)
|
|
599
|
-
|
|
600
|
-
end
|
|
601
|
-
|
|
602
|
-
# Check the Appwrite storage device is up and connection is successful.
|
|
603
|
-
#
|
|
604
|
-
#
|
|
605
|
-
# @return [HealthStatus]
|
|
606
|
-
def get_storage()
|
|
607
|
-
api_path = '/health/storage'
|
|
608
|
-
|
|
609
|
-
api_params = {
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
api_headers = {
|
|
613
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
@client.call(
|
|
617
|
-
method: 'GET',
|
|
618
|
-
path: api_path,
|
|
619
|
-
headers: api_headers,
|
|
620
|
-
params: api_params,
|
|
621
|
-
response_type: Models::HealthStatus
|
|
622
|
-
)
|
|
623
|
-
|
|
624
|
-
end
|
|
625
|
-
|
|
626
|
-
# Check the Appwrite local storage device is up and connection is successful.
|
|
627
|
-
#
|
|
628
|
-
#
|
|
629
|
-
# @return [HealthStatus]
|
|
630
|
-
def get_storage_local()
|
|
631
|
-
api_path = '/health/storage/local'
|
|
632
|
-
|
|
633
|
-
api_params = {
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
api_headers = {
|
|
637
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
@client.call(
|
|
641
|
-
method: 'GET',
|
|
642
|
-
path: api_path,
|
|
643
|
-
headers: api_headers,
|
|
644
|
-
params: api_params,
|
|
645
|
-
response_type: Models::HealthStatus
|
|
646
|
-
)
|
|
647
|
-
|
|
648
|
-
end
|
|
649
|
-
|
|
650
|
-
# Check the Appwrite server time is synced with Google remote NTP server. We
|
|
651
|
-
# use this technology to smoothly handle leap seconds with no disruptive
|
|
652
|
-
# events. The [Network Time
|
|
653
|
-
# Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is
|
|
654
|
-
# used by hundreds of millions of computers and devices to synchronize their
|
|
655
|
-
# clocks over the Internet. If your computer sets its own clock, it likely
|
|
656
|
-
# uses NTP.
|
|
657
|
-
#
|
|
658
|
-
#
|
|
659
|
-
# @return [HealthTime]
|
|
660
|
-
def get_time()
|
|
661
|
-
api_path = '/health/time'
|
|
662
|
-
|
|
663
|
-
api_params = {
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
api_headers = {
|
|
667
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
@client.call(
|
|
671
|
-
method: 'GET',
|
|
672
|
-
path: api_path,
|
|
673
|
-
headers: api_headers,
|
|
674
|
-
params: api_params,
|
|
675
|
-
response_type: Models::HealthTime
|
|
676
|
-
)
|
|
677
|
-
|
|
678
|
-
end
|
|
679
|
-
|
|
680
|
-
end
|
|
681
|
-
end
|