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

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 !

!

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

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.

Apologies for the wrong screenshot its setup as /{{url}}/predictions/{{app_id}}

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.