# Proxy Configuration for API Monitoring in Heartbeat

**URL:** <https://discuss.elastic.co/t/proxy-configuration-for-api-monitoring-in-heartbeat/372916>\
**Category:** Beats\
**Tags:** docker, heartbeat\
**Created:** [January 8, 2025, 6:26am UTC](https://discuss.elastic.co/t/proxy-configuration-for-api-monitoring-in-heartbeat/372916 "2025-01-08T06:26:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikascateina](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikascateina/32/123762_2.png) [@vikascateina](https://discuss.elastic.co/u/vikascateina)\
**Post date:** [January 8, 2025, 6:26am UTC](https://discuss.elastic.co/t/proxy-configuration-for-api-monitoring-in-heartbeat/372916/1 "2025-01-08T06:26:01Z")

</div>

Hi ,

I have configured the following settings to monitor APIs through a proxy in Heartbeat to check whether the APIs are up or down. I tested both `proxy_url` and `HTTP_PROXY`, but neither of them seems to be working as expected.

Here are the configurations I used:

- type: http  
name: my-api  
enable: true  
schedule: "@every 15m"  
hosts: ["[https://my-name/api](https://my-name/api)"]  
check:  
response:  
status: [200, 202, 400, 401, 403, 404, 405, 409, 429]  
proxy\_url: "[https://proxy-ip](https://proxy-ip):port"

- type: http  
name: my-api  
enable: true  
schedule: "@every 5m"  
hosts: ["[https://my-name/api](https://my-name/api)"]  
HTTP\_PROXY: "[https://proxy-ip](https://proxy-ip):port"  
check:  
response:  
status: [200, 202, 400, 401, 403, 404, 405, 409, 429]  
timeout: 30s

Could someone please assist me with this issue and review the configurations? Thank you in advance for your help!
