Simple REST API providing sample JSON data for testing and prototyping.
composer installphp -S localhost:8000 -t publicVisit http://localhost:8000 to see the API documentation.
GET /- API documentation
GET /users- List all usersGET /users/{id}- Get user by ID
GET /posts- List all postsGET /posts/{id}- Get post by ID
GET /products- List all productsGET /products/{id}- Get product by ID
curl https://mock.mtex.dev/users
curl https://mock.mtex.dev/users/1
curl https://mock.mtex.dev/posts
curl https://mock.mtex.dev/products/2- RESTful API design
- JSON responses
- CORS enabled
- Error handling
- Self-documenting
- No database required
- PHP 8.1+
- Slim Framework 4
- PSR-7 HTTP Messages
MIT