# How Route with different policies to same microservice endpoints

**URL:** <https://discuss.konghq.com/t/how-route-with-different-policies-to-same-microservice-endpoints/11488>\
**Category:** General\
**Created:** [May 10, 2023, 7:11pm UTC](https://discuss.konghq.com/t/how-route-with-different-policies-to-same-microservice-endpoints/11488 "2023-05-10T19:11:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/vishal/32/3959_2.png) [@Vishal](https://discuss.konghq.com/u/Vishal)\
**Post date:** [May 10, 2023, 7:11pm UTC](https://discuss.konghq.com/t/how-route-with-different-policies-to-same-microservice-endpoints/11488/1 "2023-05-10T19:11:34Z")

</div>

I have one micro service exposing two endpoints, say

- GET api1
- GET api2

exposed on url: [http://mymicroservice.com](http://mymicroservice.com)

My use case is that both the endpoints need different policies (Plugins) attached to them.  
How can this be achived?

So far i tried adding a service with above URL.  
Then created a route with path (/mypublicapi1) but its causing both APIs being exposed on  
kong:8000//mypublicapi1/api1  
kong:8000//mypublicapi1/api2

Thats not what I expected. Please enlighten!!

---

<div class="post-metadata">

**Author:** ![JohnWilliams](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/johnwilliams/32/4230_2.png) [@JohnWilliams](https://discuss.konghq.com/u/JohnWilliams)\
**Post date:** [May 15, 2023, 5:31am UTC](https://discuss.konghq.com/t/how-route-with-different-policies-to-same-microservice-endpoints/11488/2 "2023-05-15T05:31:54Z")

</div>

@Vishal - You can define two different route for the same service and apply plugins specific to route.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/konghq/original/2X/a/a895978cbf3aded6d1b14bc6d47b6f28560486c8.png)

In your case it will be two routes,  
/mypublicapi/api1  
/mypublicapi/api2

---

<div class="post-metadata">

**Author:** ![Vishal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/vishal/32/3959_2.png) [@Vishal](https://discuss.konghq.com/u/Vishal)\
**Post date:** [May 15, 2023, 5:33am UTC](https://discuss.konghq.com/t/how-route-with-different-policies-to-same-microservice-endpoints/11488/3 "2023-05-15T05:33:35Z")

</div>

> [@JohnWilliams](#):
>
> api2

Thanks John, I am able to do it!!
