🥳 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:
/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!
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.
dockerize command will generate a Dockerfile with all the necessary instructions to run your mock (
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! 🚀