<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>RESTful on seth-shi</title><link>https://sethix.com/tags/restful/</link><description>Recent content in RESTful on seth-shi</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Thu, 05 Apr 2018 21:11:41 +0800</lastBuildDate><atom:link href="https://sethix.com/tags/restful/index.xml" rel="self" type="application/rss+xml"/><item><title>RESTful Routing URL Naming Conventions</title><link>https://sethix.com/posts/2018040521/</link><pubDate>Thu, 05 Apr 2018 21:11:41 +0800</pubDate><guid>https://sethix.com/posts/2018040521/</guid><description>A previous blog briefly introduced Using RESTful in Laravel This article explains various RESTful-style route writing conventions. While not necessarily authoritative, these patterns are semantically meaningful in practice. Base Routing Typically grouped with a common prefix: Always follows API + version format /api/v1 Basic Parameters Pagination parameters using QueryString: limit page Example: /url?limit=10&amp;amp;page=1 Multi-parameter sorting: Example: /url?desc=created_at,id&amp;amp;asc=grade,updated_at Fundamental Routes List categories: method: GET /categories Create category: method: POST /categories Delete category: method: DELETE /categories/{category} Get single category: method: GET /categories/{category} Update category: method: PUT /categories/{category} Intermediate Routes Get articles under category: method: GET /categories/{category}/articles Get articles with tag: method: GET /tags/{tag}/articles Batch delete articles (avoid when possible): method: DELETE /articles/batch?</description></item></channel></rss>