Class: Appwrite::Health

Inherits:
Service show all
Defined in:
lib/appwrite/services/health.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Health



6
7
8
# File 'lib/appwrite/services/health.rb', line 6

def initialize(client)
    @client = client
end

Instance Method Details

#getHealthStatus

Check the Appwrite HTTP server is up and responsive.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/appwrite/services/health.rb', line 14

def get()
    api_path = '/health'

    api_params = {
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthStatus
    )
end

#get_antivirusHealthAntivirus

Check the Appwrite Antivirus server is up and connection is successful.



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/appwrite/services/health.rb', line 36

def get_antivirus()
    api_path = '/health/anti-virus'

    api_params = {
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthAntivirus
    )
end

#get_cacheHealthStatusList

Check the Appwrite in-memory cache servers are up and connection is successful.



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/appwrite/services/health.rb', line 59

def get_cache()
    api_path = '/health/cache'

    api_params = {
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthStatusList
    )
end

#get_certificate(domain: nil) ⇒ HealthCertificate

Get the SSL certificate for a domain



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/appwrite/services/health.rb', line 82

def get_certificate(domain: nil)
    api_path = '/health/certificate'

    api_params = {
        domain: domain,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthCertificate
    )
end

#get_console_pausing(threshold: nil, inactivity_days: nil) ⇒ HealthStatus

Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking.



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/appwrite/services/health.rb', line 109

def get_console_pausing(threshold: nil, inactivity_days: nil)
    api_path = '/health/console-pausing'

    api_params = {
        threshold: threshold,
        inactivityDays: inactivity_days,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthStatus
    )
end

#get_dbHealthStatusList

Check the Appwrite database servers are up and connection is successful.



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/appwrite/services/health.rb', line 133

def get_db()
    api_path = '/health/db'

    api_params = {
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthStatusList
    )
end

#get_failed_jobs(name:, threshold: nil) ⇒ HealthQueue

Returns the amount of failed jobs in a given queue.



380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# File 'lib/appwrite/services/health.rb', line 380

def get_failed_jobs(name:, threshold: nil)
    api_path = '/health/queue/failed/{name}'
        .gsub('{name}', name)

    if name.nil?
      raise Appwrite::Exception.new('Missing required parameter: "name"')
    end

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_pub_subHealthStatusList

Check the Appwrite pub-sub servers are up and connection is successful.



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/appwrite/services/health.rb', line 155

def get_pub_sub()
    api_path = '/health/pubsub'

    api_params = {
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthStatusList
    )
end

#get_queue_audits(threshold: nil) ⇒ HealthQueue

Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.



179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# File 'lib/appwrite/services/health.rb', line 179

def get_queue_audits(threshold: nil)
    api_path = '/health/queue/audits'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_billing_project_aggregation(threshold: nil) ⇒ HealthQueue

Get billing project aggregation queue.



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/appwrite/services/health.rb', line 203

def get_queue_billing_project_aggregation(threshold: nil)
    api_path = '/health/queue/billing-project-aggregation'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_billing_team_aggregation(threshold: nil) ⇒ HealthQueue

Get billing team aggregation queue.



227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/appwrite/services/health.rb', line 227

def get_queue_billing_team_aggregation(threshold: nil)
    api_path = '/health/queue/billing-team-aggregation'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_builds(threshold: nil) ⇒ HealthQueue

Get the number of builds that are waiting to be processed in the Appwrite internal queue server.



252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/appwrite/services/health.rb', line 252

def get_queue_builds(threshold: nil)
    api_path = '/health/queue/builds'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_certificates(threshold: nil) ⇒ HealthQueue

Get the number of certificates that are waiting to be issued against [Letsencrypt](letsencrypt.org/) in the Appwrite internal queue server.



302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/appwrite/services/health.rb', line 302

def get_queue_certificates(threshold: nil)
    api_path = '/health/queue/certificates'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_databases(name: nil, threshold: nil) ⇒ HealthQueue

Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.



328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
# File 'lib/appwrite/services/health.rb', line 328

def get_queue_databases(name: nil, threshold: nil)
    api_path = '/health/queue/databases'

    api_params = {
        name: name,
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_deletes(threshold: nil) ⇒ HealthQueue

Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'lib/appwrite/services/health.rb', line 354

def get_queue_deletes(threshold: nil)
    api_path = '/health/queue/deletes'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_functions(threshold: nil) ⇒ HealthQueue

Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.



410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/appwrite/services/health.rb', line 410

def get_queue_functions(threshold: nil)
    api_path = '/health/queue/functions'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_logs(threshold: nil) ⇒ HealthQueue

Get the number of logs that are waiting to be processed in the Appwrite internal queue server.



435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/appwrite/services/health.rb', line 435

def get_queue_logs(threshold: nil)
    api_path = '/health/queue/logs'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_mails(threshold: nil) ⇒ HealthQueue

Get the number of mails that are waiting to be processed in the Appwrite internal queue server.



460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
# File 'lib/appwrite/services/health.rb', line 460

def get_queue_mails(threshold: nil)
    api_path = '/health/queue/mails'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_messaging(threshold: nil) ⇒ HealthQueue

Get the number of messages that are waiting to be processed in the Appwrite internal queue server.



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
# File 'lib/appwrite/services/health.rb', line 485

def get_queue_messaging(threshold: nil)
    api_path = '/health/queue/messaging'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_migrations(threshold: nil) ⇒ HealthQueue

Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.



510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
# File 'lib/appwrite/services/health.rb', line 510

def get_queue_migrations(threshold: nil)
    api_path = '/health/queue/migrations'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_priority_builds(threshold: nil) ⇒ HealthQueue

Get the priority builds queue size.



276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/appwrite/services/health.rb', line 276

def get_queue_priority_builds(threshold: nil)
    api_path = '/health/queue/builds-priority'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_region_manager(threshold: nil) ⇒ HealthQueue

Get region manager queue.



534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
# File 'lib/appwrite/services/health.rb', line 534

def get_queue_region_manager(threshold: nil)
    api_path = '/health/queue/region-manager'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_stats_resources(threshold: nil) ⇒ HealthQueue

Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.



559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
# File 'lib/appwrite/services/health.rb', line 559

def get_queue_stats_resources(threshold: nil)
    api_path = '/health/queue/stats-resources'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_threats(threshold: nil) ⇒ HealthQueue

Get threats queue.



608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
# File 'lib/appwrite/services/health.rb', line 608

def get_queue_threats(threshold: nil)
    api_path = '/health/queue/threats'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_usage(threshold: nil) ⇒ HealthQueue

Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.



584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
# File 'lib/appwrite/services/health.rb', line 584

def get_queue_usage(threshold: nil)
    api_path = '/health/queue/stats-usage'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_queue_webhooks(threshold: nil) ⇒ HealthQueue

Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.



633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
# File 'lib/appwrite/services/health.rb', line 633

def get_queue_webhooks(threshold: nil)
    api_path = '/health/queue/webhooks'

    api_params = {
        threshold: threshold,
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthQueue
    )
end

#get_storageHealthStatus

Check the Appwrite storage device is up and connection is successful.



656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
# File 'lib/appwrite/services/health.rb', line 656

def get_storage()
    api_path = '/health/storage'

    api_params = {
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthStatus
    )
end

#get_storage_localHealthStatus

Check the Appwrite local storage device is up and connection is successful.



678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
# File 'lib/appwrite/services/health.rb', line 678

def get_storage_local()
    api_path = '/health/storage/local'

    api_params = {
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthStatus
    )
end

#get_timeHealthTime

Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.



706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
# File 'lib/appwrite/services/health.rb', line 706

def get_time()
    api_path = '/health/time'

    api_params = {
    }
    
    api_headers = {
    }

    @client.call(
        method: 'GET',
        path: api_path,
        headers: api_headers,
        params: api_params,
        response_type: Models::HealthTime
    )
end