Back

Health API missing from documentation

  • 0
  • Self Hosted
  • Flutter
Cord
16 Oct, 2023, 17:04

I've recently updated a Flutter app that previously used the dart_appwrite 7.3.0 package and is now using the dart_appwrite 10.0.0 package. However, I get an exception when calling health.getDB() to check the status of the database: type 'Null' is not a subtype of type 'int'

When I review what is returned, it appears that the DB status is now returned as a map with two properties: total and a list of HealthStatus.

I'm not able to find the Health API in the new documentation and any of the old links obviously return a 404 error. Is there anywhere where this change has been documented and any idea how to fix the issue?

TL;DR
The Health API is currently missing from the documentation and is advised not to be used. It needs to be fixed before documentation can be provided. The issue can be found on GitHub at: <https://github.com/appwrite/appwrite/issues/6957#issuecomment-1771484526>. The fix involves creating a pull request, but the process is unclear. There is also a suggestion to create an issue on GitHub for the unexpected response format. The Dart SDK seems to be out of sync with the current Appwrite deployment, causing some compatibility issues. It is recommended to create an issue on GitHub to address this. The source code for
Cord
16 Oct, 2023, 17:07

For clarity, the locally hosted Appwrite has been upgraded to 1.4.4

Bouahaza
16 Oct, 2023, 17:29

You can check code source here

Bouahaza
16 Oct, 2023, 17:30

Thinks that you need to create issue on github to fix it

Cord
16 Oct, 2023, 17:39

Yeah, I've been browsing the source. I think that there's been an update to what Appwrite returns, but not the equivalent update to the dart_appwrite SDK. I'll open a ticket tomorrow.

Drake
17 Oct, 2023, 00:53

Uhhh why are you using the dart sdk in your flutter app?

Cord
17 Oct, 2023, 05:41

It's a desktop admin app, that does maintenance on the Appwrite database - including migrating the contents of one Appwrite database to another. Why I'm using the Dart SDK shouldn't really matter though. This is a bug that will need to be fixed as the Dart SDK is out of sync with the current Appwrite deployment,

Drake
18 Oct, 2023, 16:29

hopefully you're not putting the API key in the app itself as to reduce exposure of your API key.

Anyways, would you please create an issue on github for the unexpected response format?

Cord
18 Oct, 2023, 16:36

API key is manually entered, but also, it's an internal app so it never leaves my development machine. πŸ˜„

I'll create an issue as soon as I've resovled an Xcode/Flutter build issue that's preventing me from deploying an urgent bug fix. 😦

Cord
19 Oct, 2023, 14:56

@Steven, issue raised, along with what I expect the new type should be:

https://github.com/appwrite/appwrite/issues/6957

Cord
19 Oct, 2023, 15:00

The fix itself is quite easy and I implemented it locally in my app. I would create a PR for the fix but reading through the documentation, it wasn't clear how I should go about it.

Drake
19 Oct, 2023, 18:15
Drake
19 Oct, 2023, 18:15

then we would re-generate the specs and the SDKs

VincentGe
19 Oct, 2023, 18:16

We lowkey need to redo Health API

VincentGe
19 Oct, 2023, 18:17

We took it down because it was seriously problematic in places

VincentGe
19 Oct, 2023, 18:17

DM me for details but we won't be documenting it until it's fixed, and we're advising to not use it atm

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more