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

**URL:** <https://discuss.hashicorp.com/t/is-there-a-way-to-retrieve-a-health-check-definition-with-the-api/6107>\
**Category:** Consul\
**Tags:** health-check\
**Created:** [February 20, 2020, 11:50am UTC](https://discuss.hashicorp.com/t/is-there-a-way-to-retrieve-a-health-check-definition-with-the-api/6107 "2020-02-20T11:50:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmichnik1981](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/tmichnik1981/32/4781_2.png) [@tmichnik1981](https://discuss.hashicorp.com/u/tmichnik1981)\
**Post date:** [February 20, 2020, 11:50am UTC](https://discuss.hashicorp.com/t/is-there-a-way-to-retrieve-a-health-check-definition-with-the-api/6107/1 "2020-02-20T11:50:49Z")

</div>

Currently we can use [Health API](https://www.consul.io/api/health.html) 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?

---

<div class="post-metadata">

**Author:** ![blake](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/blake/32/27620_2.png) [@blake](https://discuss.hashicorp.com/u/blake)\
**Post date:** [February 20, 2020, 4:30pm UTC](https://discuss.hashicorp.com/t/is-there-a-way-to-retrieve-a-health-check-definition-with-the-api/6107/2 "2020-02-20T16:30:55Z")

</div>

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 👍 to show your interest in adding this functionality to Consul.

> <https://github.com/hashicorp/consul/issues/1680>
>
> Right now you can know the state of a health check but not what is the health check itself, ie: the...
