![]() ![]() GET /posts/1/comments?_sort=votes&_order=ascįor multiple fields, use the following format: GET /posts?_sort=user,views&_order=desc,ascĪdd _start and _end or _limit (an X-Total-Count header is included in the response) GET /posts?_start=20&_end=30 ![]() GET /posts?_page=7Īdd _sort and _order (ascending order by default) GET /posts?_sort=views&_order=asc In the Link header you'll get first, prev, next and last links. Use _page and optionally _limit to paginate returned data. to access deep properties GET /posts?title=json-server&author=typicode You can also add other routes using -routes. Otherwise it will return a 2XX status code, but without changes being made to the data.īased on the previous db.json file, here are all the default routes.
0 Comments
Leave a Reply. |