The API is always prefixed by :
http://localhost/IDAW-projet/backend
No authentification.
All parameters are optional and without them the API will just return all aliments, users or consumptions in ascending order from their ID. Parameters are passed in as a query string and can be chained together.
Several filters can be applied using url paramaters. Available options are listed below.
Action | Endpoint | Description |
---|---|---|
READ | aliments.php | Returns the list of aliments ordered alphabetically. |
CREATE | addFood.php | Create an aliment. Users must provide all of the nutritional fields |
UPDATE | addFood.php | Update an aliment. Users must provide all of the nutritional fields |
DELETE | suppFood.php | Delete aliment |
The API's main role concerning the meals is to record the meals taken throughout the usage of the site.
Action | Endpoint | Description |
---|---|---|
READ | journal.php | Returns the list of all meals. |
CREATE | addMeal.php | Create a meal. Users must provide all of the indicated fields. |
UPDATE | addMeal.php | Update a meal. Users must provide all of the indicated fields. |