# How to use multiple variables in the endpoint name with mock server?

**URL:** <https://community.postman.com/t/how-to-use-multiple-variables-in-the-endpoint-name-with-mock-server/3584>\
**Category:** Help Hub\
**Created:** [December 13, 2018, 12:41am UTC](https://community.postman.com/t/how-to-use-multiple-variables-in-the-endpoint-name-with-mock-server/3584 "2018-12-13T00:41:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankit1](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@ankit1](https://community.postman.com/u/ankit1)\
**Post date:** [December 13, 2018, 12:41am UTC](https://community.postman.com/t/how-to-use-multiple-variables-in-the-endpoint-name-with-mock-server/3584/1 "2018-12-13T00:41:28Z")

</div>

When I test the endpoint with multiple variables in the namespaces I get the following error:

> {  
> “error”: {  
> “name”: “mockRequestNotFoundError”,  
> “message”: “We were unable to find any matching requests for this method type and the mock path, ‘/predictions/a88e0e82’, in your collection.”  
> }  
> }

Removing the variable at the end works fine. Any suggestion on what’s possibly wrong would help !

 ![39%20PM](https://us1.discourse-cdn.com/getpostman/original/3X/3/4/3488edf3fabef40744d586be4596b2ae9d136fc0.png) !

---

<div class="post-metadata">

**Author:** ![ankit1](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@ankit1](https://community.postman.com/u/ankit1)\
**Post date:** [December 13, 2018, 12:42am UTC](https://community.postman.com/t/how-to-use-multiple-variables-in-the-endpoint-name-with-mock-server/3584/2 "2018-12-13T00:42:11Z")

</div>

![39%20PM](https://us1.discourse-cdn.com/getpostman/original/2X/d/de8a2b1b9c1e859496d929aeb7ad83b6f61953cd.png)

Adding image in reply as original post would not allow me to add multiple images.

---

<div class="post-metadata">

**Author:** ![deepak.pathania](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@deepak.pathania](https://community.postman.com/u/deepak.pathania)\
**Post date:** [December 14, 2018, 1:15pm UTC](https://community.postman.com/t/how-to-use-multiple-variables-in-the-endpoint-name-with-mock-server/3584/3 "2018-12-14T13:15:49Z")

</div>

Hey @ankit1, the mock server basically uses the saved examples to match the URL and return the most plausible response for that URL structure.

So in your case, if the example you saved uses only the `{{url}}/predictions` as the URL path, there is no way for the matching algorithm to return that response for `{{url}}/predictions/{{appId}}`, which I feel is the case here.

Can you try updating the URL path in the saved example and try again? Or please correct me if your saved example already has the right URL path and I would update the answer accordingly.

---

<div class="post-metadata">

**Author:** ![ankit1](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@ankit1](https://community.postman.com/u/ankit1)\
**Post date:** [December 14, 2018, 7:20pm UTC](https://community.postman.com/t/how-to-use-multiple-variables-in-the-endpoint-name-with-mock-server/3584/4 "2018-12-14T19:20:46Z")

</div>

Apologies for the wrong screenshot its setup as /{{url}}/predictions/{{app\_id}}

---

<div class="post-metadata">

**Author:** ![deepak.pathania](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@deepak.pathania](https://community.postman.com/u/deepak.pathania)\
**Post date:** [December 15, 2018, 9:30am UTC](https://community.postman.com/t/how-to-use-multiple-variables-in-the-endpoint-name-with-mock-server/3584/5 "2018-12-15T09:30:12Z")

</div>

Did you have the corresponding environment selected which had the value for `{{appId}}` when you created the Mock server? Also, additional screenshots of the saved response would help in triaging the issue faster.
