# | Name | Type | Format | Description | Example |
---|---|---|---|---|---|
createdAt | string | date-time | datetime created data |
2015-04-21T23:59:60Z
|
|
id | integer | resource id |
1
|
||
name | string | user name |
Ken
|
||
updatedAt | string | date-time | datetime updated data |
2015-04-21T23:59:60Z
|
List existing articles.
curl http://localhost/articles -X GET \
-H "Content-Type: application/json"
HTTP/1.1 200 OK
{
"createdAt": "2015-04-21T23:59:60Z",
"id": 1,
"name": "Ken",
"updatedAt": "2015-04-21T23:59:60Z"
}
Info for existing article.
curl http://localhost/articles/{id} -X GET \
-H "Content-Type: application/json"
HTTP/1.1 200 OK
{
"createdAt": "2015-04-21T23:59:60Z",
"id": 1,
"name": "Ken",
"updatedAt": "2015-04-21T23:59:60Z"
}
Create a new article.
curl http://localhost/articles -X POST \
-H "Content-Type: application/json" \
-d '{
"createdAt": "2015-04-21T23:59:60Z",
"id": 1,
"name": "Ken",
"updatedAt": "2015-04-21T23:59:60Z"
}'
HTTP/1.1 201 Created
Update an existing article.
curl http://localhost/articles/{id} -X PATCH \
-H "Content-Type: application/json" \
-d '{
"createdAt": "2015-04-21T23:59:60Z",
"id": 1,
"name": "Ken",
"updatedAt": "2015-04-21T23:59:60Z"
}'
HTTP/1.1 200 OK
{
"createdAt": "2015-04-21T23:59:60Z",
"id": 1,
"name": "Ken",
"updatedAt": "2015-04-21T23:59:60Z"
}
Delete an existing article.
curl http://localhost/article/{id} -X DELETE \
-H "Content-Type: application/json" \
-d '{
"createdAt": "2015-04-21T23:59:60Z",
"id": 1,
"name": "Ken",
"updatedAt": "2015-04-21T23:59:60Z"
}'
HTTP/1.1 204 No Content
# | Name | Type | Format | Description | Example |
---|---|---|---|---|---|
createdAt | string | date-time | datetime created data |
2015-04-21T23:59:60Z
|
|
id | integer | resource id |
1
|
||
name | string | user name |
Ken
|
||
updatedAt | string | date-time | datetime updated data |
2015-04-21T23:59:60Z
|
List existing users.
curl http://localhost/users -X GET \
-H "Content-Type: application/json"
HTTP/1.1 200 OK
{
"createdAt": "2015-04-21T23:59:60Z",
"id": 1,
"name": "Ken",
"updatedAt": "2015-04-21T23:59:60Z"
}
Info for existing user.
curl http://localhost/users/{id} -X GET \
-H "Content-Type: application/json"
HTTP/1.1 200 OK
{
"createdAt": "2015-04-21T23:59:60Z",
"id": 1,
"name": "Ken",
"updatedAt": "2015-04-21T23:59:60Z"
}
Create a new user.
curl http://localhost/users -X POST \
-H "Content-Type: application/json" \
-d '{
"createdAt": "2015-04-21T23:59:60Z",
"id": 1,
"name": "Ken",
"updatedAt": "2015-04-21T23:59:60Z"
}'
HTTP/1.1 201 Created
Update an existing user.
curl http://localhost/users/{id} -X PATCH \
-H "Content-Type: application/json" \
-d '{
"createdAt": "2015-04-21T23:59:60Z",
"id": 1,
"name": "Ken",
"updatedAt": "2015-04-21T23:59:60Z"
}'
HTTP/1.1 200 OK
{
"createdAt": "2015-04-21T23:59:60Z",
"id": 1,
"name": "Ken",
"updatedAt": "2015-04-21T23:59:60Z"
}
Delete an existing user.
curl http://localhost/user/{id} -X DELETE \
-H "Content-Type: application/json" \
-d '{
"createdAt": "2015-04-21T23:59:60Z",
"id": 1,
"name": "Ken",
"updatedAt": "2015-04-21T23:59:60Z"
}'
HTTP/1.1 204 No Content