Hi,
What are you describing is not something most likely you will get information for. All resource types that support resource health are described here. In the specific case you are describing the master database is system resource that is intentionally hidden. If there is something wrong with the master database you for sure will get issues on your regular user databases so the health issue will appear on them. I am not aware if there are any kind of such resources as the master database on other types of supported resources but querying the resource health API does not seems so efficient way. Instead why do not use Resource Health alerts that way you will not have to query the API all the time, instead you will get the events when the status changes. Additionally the resource health data is in Resource Graph and the graph is way more efficient and easier to use than querying the API for each resource. So my suggestion would be to use one of those two methods where you will also not have the above mentioned issues.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.