iMangerMieux API



Authors : DIDON Maya & MARQUE Pierre

2021-04-06



Prefix of all Root Endpoints

The API is always prefixed by :

http://localhost/IDAW-projet/backend


Authentification

No authentification.


Parameters

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.


Possible actions for users of the API

Several filters can be applied using url paramaters. Available options are listed below.

Aliments

Possible actions with aliments
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

Meals

The API's main role concerning the meals is to record the meals taken throughout the usage of the site.

Possible actions with meals
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.