Discover Mockoon new API playground, a ready-to-use mock API for all your prototyping needs.
š„³ We are happy to announce the release of a new tool: the API playground.
It is a free and ready-to-use mock API offering multiple CRUD endpoints with fake data. The perfect tool to quickly prototype your frontend applications, test your API calls, or learn about APIs.
The API playground is available at https://playground.mockoon.com
and offers different resources containing fake data: /contacts
, /movies
, /photos
, /posts
, /todos
, /users
. They work like any other API with various endpoints and CRUD operations, like GET, POST, PUT, PATCH and DELETE.
Even better, all actions like updates or deletes are persisted (until the next reset š)! Making it a great tool to test your frontend applications in a more realistic environment.
ā”ļø Head over to the API playground documentation to learn more!
All the fake data were generated using Faker.js and our templating system. We picked some from our list of templates š and created some new ones using our AI assistant š¤.
We then created a Mockoon project with all the CRUD endpoints. CRUD endpoints are fully automated and create multiple routes at runtime to let you manipulate a data bucket, a sort of basic JSON database.
We saved the project data file in a new repository and created a Dockerfile using Mockoon CLI.
Here is the command we used: mockoon-cli dockerize -d ./dist/playground-mock.json -o ./dist/Dockerfile -p 8080
.
The CLI dockerize
command will generate a Dockerfile with all the necessary instructions to run your mock (COPY
, EXPOSE
, etc.).
Finally, we deployed the mock API on Google Cloud Run, using Cloud Build. Setting up Cloud Build was a breeze, and we were able to deploy the API playground in a few minutes.
After authenticating Cloud Build with GitHub, it will listen for pushes on a specific branch of the repository (here main
) and then build and deploy the Docker image to Cloud Run based on the provided Dockerfile.
This way, we can easily update the playground API by simply pushing a new version of the repository.
We also use Cloudflare rate limiting to prevent abuse and ensure the API playground is always available.
The API playground is open-source and available on GitHub. Feel free to contribute by adding new resource endpoints or reporting any issues you may encounter.
Happy mocking! š
We continue our series of interviews with Mockoon's open-source contributors with Luca Di Fazio.
Read moreLet's take a look back at 2024 (and 2023?) and celebrate Mockoon's 7th birthday!
Read moreWe continue our series of interviews with Mockoon's open-source contributors with Maurice Ackel, Full Stack Developer at Netlight.
Read more