Lightweight REST API for Demos - 12MB Only !!
2.6K
Simple REST API service for mentees to practice API testing. The image is the build of
docker run -d -p 8080:8080 -e ADMIN_PASSWORD=pass123 abdennour/dummy-rest-api-example
Then check API Docs under: http://localhost:8080/coasters
To be able to show the desired features of curl this REST API must match a few requirements:
GET /coasters returns list of coasters as JSONGET /coasters/{id} returns details of specific coaster as JSONPOST /coasters accepts a new coaster to be addedPOST /coasters returns status 415 if content is not application/jsonGET /admin requires basic authGET /coasters/random redirects (Status 302) to a random coasterA coaster object should look like this:
{
"id": "someid",
"name": "name of the coaster",
"inPark": "the amusement park the ride is in",
"manufacturer": "name of the manufacturer",
"height": 27,
}
# Add
curl -X POST -d '{"id": "a1234", "name": "name 1234", "inPark": "park 1234", "manufacturer": "man 1234", "height": 12}' http://localhost:8080/coasters -H "content-type: application/json"
# List
curl http://localhost:8080/coasters
Content type
Image
Digest
Size
12.3 MB
Last updated
about 5 years ago
docker pull abdennour/dummy-rest-api-example