GET api/FoodRecipes?categoryID={categoryID}

Retrieves food recipes based on the provided category ID.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
categoryID

The ID of the category to filter the recipes.

integer

Required

Body Parameters

None.

Response Information

Resource Description

A list of food recipes matching the provided category ID.

Collection of FoodRecipe
NameDescriptionTypeAdditional information
recipeID

Gets or sets the recipe ID.

integer

None.

recipeName

Gets or sets the recipe name.

string

None.

prepTime

Gets or sets the preparation time of the recipe.

string

None.

cookTime

Gets or sets the cooking time of the recipe.

string

None.

calories

Gets or sets the number of calories in the recipe.

string

None.

servings

Gets or sets the number of servings the recipe yields.

integer

None.

imageURL

Gets or sets the image URL of the recipe.

string

None.

categoryID

Gets or sets the category ID of the recipe.

integer

None.

notes

Gets or sets the category ID of the recipe.

string

None.

ingredients

Gets or sets the category ID of the recipe.

string

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "recipeID": 1,
    "recipeName": "sample string 2",
    "prepTime": "sample string 3",
    "cookTime": "sample string 4",
    "calories": "sample string 5",
    "servings": 6,
    "imageURL": "sample string 7",
    "categoryID": 8,
    "notes": "sample string 9",
    "ingredients": "sample string 10"
  },
  {
    "recipeID": 1,
    "recipeName": "sample string 2",
    "prepTime": "sample string 3",
    "cookTime": "sample string 4",
    "calories": "sample string 5",
    "servings": 6,
    "imageURL": "sample string 7",
    "categoryID": 8,
    "notes": "sample string 9",
    "ingredients": "sample string 10"
  }
]

application/xml, text/xml

Sample:
<ArrayOfFoodRecipe xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OTJServices.Models">
  <FoodRecipe>
    <calories>sample string 5</calories>
    <categoryID>8</categoryID>
    <cookTime>sample string 4</cookTime>
    <imageURL>sample string 7</imageURL>
    <ingredients>sample string 10</ingredients>
    <notes>sample string 9</notes>
    <prepTime>sample string 3</prepTime>
    <recipeID>1</recipeID>
    <recipeName>sample string 2</recipeName>
    <servings>6</servings>
  </FoodRecipe>
  <FoodRecipe>
    <calories>sample string 5</calories>
    <categoryID>8</categoryID>
    <cookTime>sample string 4</cookTime>
    <imageURL>sample string 7</imageURL>
    <ingredients>sample string 10</ingredients>
    <notes>sample string 9</notes>
    <prepTime>sample string 3</prepTime>
    <recipeID>1</recipeID>
    <recipeName>sample string 2</recipeName>
    <servings>6</servings>
  </FoodRecipe>
</ArrayOfFoodRecipe>