-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
14 lines (14 loc) · 2.25 KB
/
Copy pathindex.html
File metadata and controls
14 lines (14 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<h1>RestService</h1>
<p>This is RestService. You can search for products by going to <a href="http://aalto-digi-restservice.herokuapp.com/products/">http://aalto-digi-restservice.herokuapp.com/products/</a> and adding url query parameters.</p>
<p>You can also go to <a href="http://aalto-digi-restservice.herokuapp.com/products/available/">http://aalto-digi-restservice.herokuapp.com/products/available/</a> to limit the search to available products.</p>
<p> Go to http://aalto-digi-restservice.herokuapp.com/products/categories/<category> to search for products in <b><category></b>, for example <a href="http://aalto-digi-restservice.herokuapp.com/products/categories/electronics">http://aalto-digi-restservice.herokuapp.com/products/categories/electronics</a>.</p>
<p>Going to <a href="http://aalto-digi-restservice.herokuapp.com/products/categories/">http://aalto-digi-restservice.herokuapp.com/products/categories/</a> will return a list of categories in the database.</p>
<p>Query parameters can be used in all of these urls <b>except</b> <a href="http://aalto-digi-restservice.herokuapp.com/products/categories/">http://aalto-digi-restservice.herokuapp.com/products/categories/</a>.</p>
<h3>Parameters</h3>
<p><b>limit</b> - Number. Give an upper limit of search results to return. Can give many, but only last parameter is processed. Negative values are interpreted as 0.</p>
<p><b>notfield</b> - String. Give the name of a field that should not be included in the results, i.e "price" will return results that do not give their prices.</p>
<p><b>category</b> and <b>notcategory</b> - String. The category(ies) that should or shouldn't be included in the results.</p>
<p><b>subcategory</b> and <b>notsubcategory</b> - String. As with categories, only the more specific subcategory or genre.</p>
<p><b>maxprice</b> - Number. Set the exclusive maximum price. I.e specifying 400 will return only items whose price is at most 399.99.</p>
<p><b>sort</b> and <b>dsort</b> - String. Give the name of a field by which to sort up (sort) or down (dsort). Can give many.</p>
<p><b>minamount</b> - Number. Give the inclusive minimum amount of product that should be in stock. I.e giving 0 means no products that are out of stock are returned. Can give many, but only last parameter is processed.</p>