Skip to content

Instantly share code, notes, and snippets.

View yutaokkots's full-sized avatar
:octocat:
Working from home

Yuta Okkotsu, PhD yutaokkots

:octocat:
Working from home
View GitHub Profile

RESTful Routes to CRUD Mapping

Example resource: posts

HTTP Method
(Verb)
Path/Endpoint/URI CRUD Operation Typical
Controller Action
Has Data
Payload
GET /posts Read all posts index No
GET /posts/:id Read a specific post show No
POST /posts Create a new post create Yes
PUT /posts/:id Update specified post update Yes
[
{
"kana": "ア",
"roumaji": "a",
"type": "gojuuon"
},
{
"kana": "イ",
"roumaji": "i",
"type": "gojuuon"
[
{
"kana": "あ",
"roumaji": "a",
"type": "gojuuon"
},
{
"kana": "い",
"roumaji": "i",
"type": "gojuuon"