# Postman Academy: Simulate API endpoints with a mock server

**URL:** <https://community.postman.com/t/postman-academy-simulate-api-endpoints-with-a-mock-server/57918>\
**Category:** Help Hub\
**Tags:** learnings\
**Created:** [February 21, 2024, 2:43am UTC](https://community.postman.com/t/postman-academy-simulate-api-endpoints-with-a-mock-server/57918 "2024-02-21T02:43:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vstakhovsky](https://avatars.discourse-cdn.com/v4/letter/v/8797f3/32.png) [@vstakhovsky](https://community.postman.com/u/vstakhovsky)\
**Post date:** [February 21, 2024, 2:43am UTC](https://community.postman.com/t/postman-academy-simulate-api-endpoints-with-a-mock-server/57918/1 "2024-02-21T02:43:52Z")

</div>

> **Archived topic — some details may be out of date.**  
> Mock servers built from saved collection examples are still supported. Postman now also has **code-based mocks** : JavaScript request handlers plus a `config.yaml`, stored as files in your Git repository, which you can run locally or deploy. Create one in the app, or use the Postman CLI to generate one from an OpenAPI spec, collection or dataset (`postman mock generate`) and run it (`postman mock run`). See [About mocks](https://learning.postman.com/docs/design-apis/mock-apis/mocks/overview) and [Create a mock](https://learning.postman.com/docs/design-apis/mock-apis/mocks/create-a-mock).  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) can build and run mocks for you.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

Hi  
I have started the Postman Academy, and I have been stuck on this challenge

Challenge: Simulate an API with a mock server  
link → [https://academy.postman.com/path/api-producers/simulate-api-endpoints-with-mock-server-2212/13853](https://academy.postman.com/path/api-producers/simulate-api-endpoints-with-mock-server-2212/13853)

Answer about my solution:

🚨 Oops! It looks like your solution failed one or more tests. Please address the following failures, save your changes, then try again!

| | Test | Failure reason |
| --- | --- | --- |
| ❌ | Mock response | Incorrect response for vehicle: 4Y1SL65848Z411439. Status code received: ‘404’. Status code expected: ‘200’. |
| ❌ | Mock response | Incorrect response for vehicle: JA3AP57J5SY000719. Status code received: ‘404’. Status code expected: ‘200’. |
| ❌ | Mock response | Incorrect response for vehicle: JH4DA1750HS018437. Status code received: ‘404’. Status code expected: ‘500’. |

Could you please help me to resolve my problem?

 ![Screenshot 2024-02-21 at 03.41.24](https://us1.discourse-cdn.com/getpostman/original/3X/f/0/f089a1c8f6ce4f3b81a7edbc78faf9f6ccd019d8.jpeg)

workspace ID: 51c955b5-6057-4e55-9afa-f8799d18369b

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [March 22, 2024, 2:44am UTC](https://community.postman.com/t/postman-academy-simulate-api-endpoints-with-a-mock-server/57918/2 "2024-03-22T02:44:51Z")

</div>

Closed on March 22, 2024, 2:44am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
