Routes - Telerik-Hackathon-2014/YourFood-WebAPI GitHub Wiki

Authentication:

  • GET /api/Account/Registration - requires Email, Password, ConfirmPassword
  • POST /api/Token - requires Username, Password, grant_type=password, Content-Type=application/json

Products:

  • GET /api/Products - gets all products
  • GET /api/Products(5) - gets product by Id
  • GET /api/Products(5)/Category - gets product's category
  • GET /api/Products?$expand=Category - products along categories
  • GET /api/Products?$top=7&$skip=0 - paging
  • GET /api/Products?$orderby=Name - sorting
  • GET /api/Products?$select=Name - projection
  • GET /api/Products?$filter=Name eq 'Ken' - filtering
  • POST /api/Products - create a new product
  • PUT /api/Products(5) - update a product by Id
  • DELETE /api/Products(5) - delete a product by Id

ProductCategories:

  • GET /api/ProductCategories - gets all categories
  • GET /api/ProductCategories(5) - gets category by Id
  • GET /api/ProductCategories(5)/Products - gets category's products
  • GET /api/ProductCategories?$expand=Products - category along products
  • GET /api/ProductCategories?$top=7&$skip=0 - paging
  • GET /api/ProductCategories?$orderby=Name - sorting
  • GET /api/ProductCategories?$select=Name - projection
  • GET /api/ProductCategories?$filter=Name eq 'Ken' - filtering
  • POST /api/ProductCategories - create a new category
  • PUT /api/ProductCategories(5) - update a category by Id
  • DELETE /api/ProductCategories(5) - delete a category by Id

AvailabilityProducts:

  • GET /api/AvailabilityProducts - gets all products
  • GET /api/AvailabilityProducts(5) - gets product by Id
  • GET /api/AvailabilityProducts(5)/Product - gets availability product's product
  • GET /api/AvailabilityProducts?$expand=Product - availability products along products
  • GET /api/AvailabilityProducts?$top=7&$skip=0 - paging
  • GET /api/AvailabilityProducts?$orderby=Quantity - sorting
  • GET /api/AvailabilityProducts?$select=Quantity - projection
  • GET /api/AvailabilityProducts?$filter=Quantity eq 5 - filtering
  • POST /api/AvailabilityProducts - create a new product
  • PUT /api/AvailabilityProducts(5) - update a product by Id
  • DELETE /api/AvailabilityProducts(5) - delete a product by Id

CatalogProducts:

  • GET /api/CatalogProducts - gets all products
  • GET /api/CatalogProducts(5) - gets product by Id
  • GET /api/CatalogProducts(5)/Product - gets catalog product's product
  • GET /api/CatalogProducts?$expand=Product - catalog products along products
  • GET /api/CatalogProducts?$top=7&$skip=0 - paging
  • GET /api/CatalogProducts?$orderby=LifetimeInDays - sorting
  • GET /api/CatalogProducts?$select=LifetimeInDays - projection
  • GET /api/CatalogProducts?$filter=LifetimeInDays eq 5 - filtering
  • POST /api/CatalogProducts - create a new product
  • PUT /api/CatalogProducts(5) - update a product by Id
  • DELETE /api/CatalogProducts(5) - delete a product by Id

Recipes:

  • GET /api/Recipes - gets all recipes
  • GET /api/Recipes(5) - gets recipe by Id
  • GET /api/Recipes(5)/Ingredients - gets recipe's ingredients
  • GET /api/Recipes?$expand=Ingredients - recipes along ingredients
  • GET /api/Recipes?$top=7&$skip=0 - paging
  • GET /api/Recipes?$orderby=LifetimeInDays - sorting
  • GET /api/Recipes?$select=Name - projection
  • GET /api/Recipes?$filter=Name eq 'Ken' - filtering
  • POST /api/Recipes - create a new recipe
  • PUT /api/Recipes(5) - update a recipe by Id
  • DELETE /api/Recipes(5) - delete a recipe by Id

RecipeCategories:

  • GET /api/RecipeCategories - gets all categories
  • GET /api/RecipeCategories(5) - gets category by Id
  • GET /api/RecipeCategories(5)/Recipes - gets category's recipes
  • GET /api/RecipeCategories?$expand=Recipes - categories along recipes
  • GET /api/RecipeCategories?$top=7&$skip=0 - paging
  • GET /api/RecipeCategories?$orderby=Name - sorting
  • GET /api/RecipeCategories?$select=Name - projection
  • GET /api/RecipeCategories?$filter=Name eq 'Ken' - filtering
  • POST /api/RecipeCategories - create a new category
  • PUT /api/RecipeCategories(5) - update a category by Id
  • DELETE /api/RecipeCategories(5) - delete a category by Id

ReceiptScanner:

  • POST /api/ReceiptScanner - requires Image data (Base64)

Read more about OData...