Simulate API endpoints with a mock server

I followed step by step of the solution to simulate the API endpoints but I still got the error:

Error: Invalid URI "http:////vehicles/%3Cstring%3E/status/odometer"

It was because of {{baseUrl}} , isn’t it?

I’m sure not what the value is by following the video, the value is from the Mock Servers but it does not match with Solution

This is my variables import

GET request Success

I’m inputting the vin following this

Please help me I am stuck on this case for a long time.

Hi @thatchaphan .

Welcome to the Postman Community!

Your question is not very clear. Are you trying to create a mock server or you’re trying to make use of one?

In the first screenshot you shared, you have not specified a valid base URL, hence why you’re getting the error in the second screenshot. / is not a base URL, can you input a valid URL in the current value field of your first screenshot?

You need to create a Mock Server (Maybe you have already) and the URL from that Mock Server will be the value of the {{baseURL}}.

If you can’t find the URL (It’s in a number of different places), the easiest method would be to open the Mocks Severs in the left sidebar and use the Copy Mock URL button next to the name.

You would them need to create an example, which is used with the Mock Server to return a response based on the data in the table.

On the Academy site for this training, there should be a sections explaining all this step by step.

Thank you for your answer
I’m already to create Mock servers by Collections > Mock Collection > input Mock Servers name " Vehicle Status Mock Server" >> Click Create. then I copy Mock Url and paste on variables, If I send get it must be response right?

Working through these detailed instructions for the course, which explain everything you need to do at each point, is the best thing to follow.

Thank you for your answer!!
I’m trying simulate api with mock servers but after Generate collection from Definition I’m input VIN path variable as try to get request the result not like the example and I got error Error: Invalid URI

Thank you
I’m follow by this course but I’m still not understand and not pass only this assignment :cry: :cry:
after I’m paste mock url and try to get I got this error

From that image, it’s not picking up any variables when you send the request.

The {{baseURL}}, which should now be the mock server URL and the %3Cstring%3E should be picking up the vin that you enter in the request as a path variable. What do you see when you hover over the {{baseURL}} variable in the request URL? Do you need to select a specific environment where the variable is stored?

I would honestly suggest, removing everything and starting from Step 1 again, at the moment you’re just trying to chase the issues.

It’s ok to start over again, missing something vital might be throwing you off and walking through it again might provide the solution.

Thank you sincerely for your suggestion :smiley: :smiley: