# API Experience endpoints requested

**URL:** <https://forums.losant.com/t/api-experience-endpoints-requested/3604>\
**Category:** Help\
**Tags:** experience\
**Created:** [February 16, 2021, 9:20pm UTC](https://forums.losant.com/t/api-experience-endpoints-requested/3604 "2021-02-16T21:20:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vander\_Maziero](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/vander_maziero/32/3428_2.png) [@Vander\_Maziero](https://forums.losant.com/u/Vander_Maziero)\
**Post date:** [February 16, 2021, 9:20pm UTC](https://forums.losant.com/t/api-experience-endpoints-requested/3604/1 "2021-02-16T21:20:06Z")

</div>

Hi,

I am testing an implementation to remove certain experience endpoints that are “attacked”, receive many requests, but I noticed that even when consuming an endpoint it was removed, the payload counter for API experience endpoints requests is increased. Is this behavior correct? It seems to me that for a given slug, regardless of whether an endpoint has been configured, the application receives the request.

Example:

I created an experience, with a slug pointing to a version that doesn’t have the / testing-route, and  
this request appears in the application log, and I noticed that the application’s payload count was increased

![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/8/8cfe67d57d81284543fac3f8129fd3b585699399.png)

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [February 16, 2021, 9:44pm UTC](https://forums.losant.com/t/api-experience-endpoints-requested/3604/3 "2021-02-16T21:44:57Z")

</div>

Hey @Vander_Maziero,

You are correct that your Losant app will still receive requests even when endpoints are not defined. Losant will automatically reply with a 404 and will record the 404 in your experience’s metrics. These metrics can be useful if you’ve accidentally linked to an endpoint that doesn’t exist. Seeing 404s is an indicator something might be implemented incorrectly.

In your case, however, I can certainly see why you’d want to completely block these requests.

My first reaction is to use Cloudflare in front of your Losant experience. Cloudflare does have firewall rules that can block specific endpoints from ever reaching Losant. Here’s an example:

> **[Block Microsoft Exchange Autodiscover requests · Cloudflare Firewall Rules docs](https://developers.cloudflare.com/firewall/recipes/block-ms-exchange-autodiscover)**
>
> Create rules that examine incoming HTTP traffic against a set of powerful filters to block, challenge, log, or allow matching requests.

We don’t have a guide (yet) for using Cloudflare and Losant, but this is something I’d definitely recommend investigating yourself to see if it’s a possible solution.

---

<div class="post-metadata">

**Author:** ![Andrew\_Leckie1](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/andrew_leckie1/32/3319_2.png) [@Andrew\_Leckie1](https://forums.losant.com/u/Andrew_Leckie1)\
**Post date:** [February 21, 2021, 11:19pm UTC](https://forums.losant.com/t/api-experience-endpoints-requested/3604/4 "2021-02-21T23:19:40Z")

</div>

This raises a vert good point in general - what API rate limiting or alerting tools are available to prevent DDoS style attacks causing great financial pain around Losant billable messages, and if they aren’t built-in, can Losant please create working Cloudflare templated guides to do this?

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [February 26, 2021, 6:21pm UTC](https://forums.losant.com/t/api-experience-endpoints-requested/3604/5 "2021-02-26T18:21:29Z")

</div>

Hello @Vander_Maziero & @Andrew_Leckie1,

We actually just released a new How-To guide on [How to use Cloudflare with Losant Experiences](https://docs.losant.com/guides/how-to-use-cloudflare-with-losant-experiences/).

Please don’t hesitate to reach out if you have any questions when following along.

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Andrew\_Leckie1](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/andrew_leckie1/32/3319_2.png) [@Andrew\_Leckie1](https://forums.losant.com/u/Andrew_Leckie1)\
**Post date:** [February 26, 2021, 8:07pm UTC](https://forums.losant.com/t/api-experience-endpoints-requested/3604/8 "2021-02-26T20:07:51Z")

</div>

Excellent timing indeed (thank you), however, you don’t mention what class of paid Cloudflare subscription was required to execute this level of protection in your guide. That is not immaterial to ongoing costs. Could you reveal this please?

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [February 26, 2021, 8:11pm UTC](https://forums.losant.com/t/api-experience-endpoints-requested/3604/9 "2021-02-26T20:11:20Z")

</div>

Hi @Andrew_Leckie1,

In the paragraph before [Step One](https://docs.losant.com/guides/how-to-use-cloudflare-with-losant-experiences/#step-1-add-your-domain-to-losant), it is mentioned that everything done in this guide can be executed with Cloudflare’s free plan.

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Andrew\_Leckie1](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/andrew_leckie1/32/3319_2.png) [@Andrew\_Leckie1](https://forums.losant.com/u/Andrew_Leckie1)\
**Post date:** [February 26, 2021, 8:40pm UTC](https://forums.losant.com/t/api-experience-endpoints-requested/3604/10 "2021-02-26T20:40:38Z")

</div>

Thank you Heath - I missed that. Not attuned to ‘free’ these days 🙂
