URL = "https:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
GET /articles/1
HOST api.example.org
HTTP/1.1 200 OK
{
"id": "<string>",
"content": "<string>",
"published": <boolean>,
"_links": {
"self": { "href": "/atricles/1" }
}
}
GET /articles?sort=publishedAt
HOST api.example.org
HTTP/1.1 200 OK
[
{
"id": "<string>",
"content": "<string>",
"published": <boolean>,
"publishedAt": "<DateTime>",
"_links": {
"self": { "href": "/atricles/1" }
}
}
]
GET /articles?published=true
HOST api.example.org
HTTP/1.1 200 OK
[
{
"id": "<string>",
"content": "<string>",
"published": <boolean>,
"publishedAt": "<DateTime>",
"_links": {
"self": { "href": "/atricles/1" }
}
}
]
GET /articles?page=1&perPage=10
HOST api.example.org
HTTP/1.1 200 OK
[
{
"id": "<string>",
"content": "<string>",
"published": <boolean>,
"publishedAt": "<DateTime>",
"_links": {
"self": { "href": "/atricles/1" }
"next": { "href": "/articles?page=2&perPage=10" }
}
}
]
GET /articles?fields=id,content&published=true
HOST api.example.org
HTTP/1.1 200 OK
[
{
"id": "<string>",
"content": "<string>",
"_links": {
"self": { "href": "/atricles/1" }
}
}
]
- Field names are all camelCase