Is there a way to retrieve a health check definition with the API?

Currently we can use Health API to get some information about passing/failing checks.

Unfortunately, it does not provide any information about the definition of the checks.
In some cases it might be very helpful.

I mean something like that:

 "check": {
    "id": "api",
    "name": "HTTP API on port 5000",
    "http": "https://localhost:5000/health",
    "tls_skip_verify": false,
    "method": "POST",
    "header": {"Content-Type": "application/json"},
    "body": "{\"method\":\"health\"}",
    "interval": "10s",
    "timeout": "1s"
  }

Is there a way/API to get this kind of information?
If not, maybe we should raise a ticket for this feature?

Hi @tmichnik1981,

Currently there is not a way to retrieve the health check definition via the API. There’s already and existing GitHub Issue for this. I recommend giving it a :+1: to show your interest in adding this functionality to Consul.