Want to test out this API? There's a live demo available!
Try entering these commands in a terminal evironment to make an API request. Note: Replace text in capitals with desired resource/field
Get all flavors:
$ curl -v http://atrakh.com/api/v1/flavors
Get a specific flavor:
$ curl -v http://atrakh.com/api/v1/flavors/FLAVOR_NAME
Create a new flavor:
$ curl -v -H "Content-Type: application/json" -X POST -d
'{"name":FLAVOR_NAME, "stock":FLAVOR_AMOUNT}' http://atrakh.com/api/v1/flavors
Modify an existing flavor:
$ curl -v -H "Content-Type: application/json" -X PUT -d
'{"name":NEW_FLAVOR_NAME, "stock":NEW_FLAVOR_AMOUNT}' http://atrakh.com/api/v1/flavors/FLAVOR_NAME
Delete a flavor:
$ curl -v -X DELETE http://atrakh.com/api/v1/flavors/FLAVOR_NAME