Skip to content
API for USDA FSIS FoodKeeper data (https://catalog.data.gov/dataset/fsis-foodkeeper-data)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
src
.gitignore
LICENSE
Procfile
README.md
app.json
build.gradle
foodkeeper.json
gradlew
gradlew.bat
settings.gradle

README.md

FoodKeeper API

version

API for USDA FSIS FoodKeeper data (https://www.fsis.usda.gov/shared/data/EN/foodkeeper.json)

Build Instructions

Requirements

Application Download and Build

$ git clone https://github.com/LibreFoodPantry/FoodKeeper-API.git
$ cd FoodKeeper-API\FoodKeeper-API

$ gradle build
$ gradle bootrun

Navigate to localhost:8080/ and the application should be running.

REST API Endpoints

Method Endpoint Body Return Note
GET /products Returns list of all products
GET /products/id {
"id": id, "name": "name", "subtitle": "subtitle", "keywords": "keywords",
"pantryLife": {"min": min, "max": max, "metric": "metric", "tips": "tips"},
"pantryAfterOpeningLife": {"min": min, "max": max, "metric": "metric", "tips": "tips"},
"refrigeratorLife": {"min": min, "max": max, "metric": "metric", "tips": "tips"},
"refrigrateAfterOpeningLife": {"min": min, "max": max, "metric": "metric", "tips": "tips"},
"refrigerateAfterThawingLife": {"min": min, "max": max, "metric": "metric", "tips": "tips"},
"freezerLife": {"min": min, "max": max, "metric": "metric", "tips": "tips"},
"dop_pantryLife": {"min": min, "max": max, "metric": "metric", "tips": "tips"},
"dop_refrigeratorLife": {"min": min, "max": max, "metric": "metric", "tips": "tips"},
"dop_freezerLife": {"min": min, "max": max, "metric": "metric", "tips": "tips"}
}
Returns product with given id
GET /products/id/name name Returns name for this product id
GET /products/category/categoryId Returns all products with the given category id
GET /categories Returns list of all categories
GET /categories/id {"id": id, "name": "name", "subcategory": "subcategory"} Returns category with given id
GET /cookingMethods Returns list of all cooking methods
GET /cookingMethods/id {"id": id, "method": "method", "measureFrom": measureFrom, "measureTo": measureTo, "sizeMetric": "sizeMetric", "cookingTemp", "cookingTemp", "timingFrom": timingfrom, "timingTo": timingTo, "timingMetric": "timingMetric", "timingPer": "timingPer", "productId": productId} Returns cooking method with given id
GET /cookingTips Returns list of all cooking tips
GET /cookingTips/id {"id": id, "tips": "tips", "safeMinTemp": safeMinTemp, "restTime": restTime, "restTimeMetric": "restTimeMetric"} Returns cooking tip with given id

Class Representation of Food Keeper Data

  1. Category
    • ID: Integer
    • Category_Name: String
    • Subcategory_Name: String
  2. Product
    • ID: Integer (of Product)
    • Category_ID: Integer (related to Category)
    • Name: String
    • Name_subtitle: String
    • Keywords: String
    • Pantry_Min: Integer (These can be null)
    • Pantry_Max: Integer
    • Pantry_Metric: String
      • (Days, Weeks, Months, When Ripe, Indefinitely, Not Recommended)
    • Pantry_tips: String
    • DOP_Pantry_Min: Integer
    • DOP_Pantry_Max: Integer
    • DOP_Pantry_Metric: String
      • (Days, Weeks, Months, When Ripe, Indefinitely, Not Recommended)
    • DOP_Pantry_tips: String
    • Pantry_After_Opening_Min: Integer
    • Pantry_After_Opening_Max: Integer
    • Pantry_After_Opening_Metric: String
      • (Days, Weeks, Months, When Ripe, Indefinitely, Not Recommended)
    • Refrigerate_Min: Integer
    • Refrigerate_Max: Integer
    • Refrigerate_Metric: String
      • (Days, Weeks, Months, When Ripe, Indefinitely, Not Recommended)
    • Refrigerate_tips: String
    • DOP_Refrigerate_Min: Integer
    • DOP_Refrigerate_Max: Integer
    • DOP_Refrigerate_Metric: String
      • (Days, Weeks, Months, When Ripe, Indefinitely, Not Recommended)
    • DOP_Refrigerate_tips: String
    • Refrigerate_After_Opening_Min: Integer
    • Refrigerate_After_Opening_Max: Integer
    • Refrigerate_After_Opening_Metric: String
      • (Days, Weeks, Months, When Ripe, Indefinitely, Not Recommended, Package use-by date)
    • Refrigerate_After_Thawing_Min: Integer
    • Refrigerate_After_Thawing_Max: Integer
    • Refrigerate_After_Thawing_Metric: String
      • (Days, Weeks, Months, When Ripe, Indefinitely, Not Recommended)
    • Freeze_Min: Integer
    • Freeze_Max: Integer
    • Freeze_Metric: String
      • (Days, Weeks, Months, When Ripe, Indefinitely, Not Recommended)
    • Freeze_Tips: String
    • DOP_Freeze_Min: Integer
    • DOP_Freeze_Max: Integer
    • DOP_Freeze_Metric: String
      • (Days, Weeks, Months, When Ripe, Indefinitely, Not Recommended)
    • DOP_Freeze_Tips: String
  3. CookingTip
    • ID: Integer
    • Product_ID: Integer
    • Tips: String
    • Safe_Minimum_temperature: Integer
    • Rest_Time: Integer
    • Rest_Time_metric: String
  4. CookingMethod
    • ID: Integer
    • Product_ID: Integer
    • Cooking_Method: String (e.g. Skillet or Oven, etc.)
    • Measure_from: Decimal
    • Measure_to: Decimal
    • Size_metric: String
      • Pounds, Ounces, Inches
    • Cooking_Temperature: String
    • Timing_from: Decimal
    • Timing_to: Decimal
    • Timing_metric: String
      • Hours, Minutes, Seconds
    • Timing_per: String
      • Pound, Ounce, Inch
You can’t perform that action at this time.