Pages

The pages that belong to the authenticated user.

get
Get pages

https://api.petje.af/v1/pages
This endpoint allows you to get pages that belongs to the authenticated user. Scope: pages.read
Request
Response
Request
Headers
Authorization
required
string
Access token using the Bearer method
Query Parameters
limit
optional
integer
The number of pages to return
from
optional
string
Offset the results to start after the provided page ID
Response
200: OK
Pages successfully retrieved.
{
"count": 4,
"_embedded": {
"pages": [
{
"resource": "pages",
"id": "5SaEUOWD2b4dN7tJBKMB",
"userId": "8jFy8VbRPTfkM1658U2IrwvIV7R2",
"name": "Test 8",
"slug": "test8",
"validated": true,
"_links": {
"self": {
"href": "https://api.petje.af/pages/5SaEUOWD2b4dN7tJBKMB",
"type": "application/hal+json"
},
"plans": {
"href": "https://api.petje.af/pages/5SaEUOWD2b4dN7tJBKMB/plans",
"type": "application/hal+json"
},
"rewards": {
"href": "https://api.petje.af/pages/5SaEUOWD2b4dN7tJBKMB/rewards",
"type": "application/hal+json"
}
}
},
...
]
},
"_links": {
"self": {
"href": "https://api.petje.af/pages",
"type": "application/hal+json"
},
"next": null
}
}

‚Äč

get
Get page detail

https://api.petje.af/v1/pages/:id
Scope: pages.read
Request
Response
Request
Path Parameters
pageId
optional
string
The page ID
Headers
Authorization
required
string
Access token using the Bearer method
Response
200: OK
{
"resource": "pages",
"id": "XdvyMNuQArs6KGRANDlT",
"userId": "8jFy8VbRPTfkM1658U2IrwvIV7R2",
"name": "Test 6",
"slug": "test6",
"validated": true,
"_links": {
"self": {
"href": "https://api.petje.af/pages/XdvyMNuQArs6KGRANDlT",
"type": "application/hal+json"
},
"plans": {
"href": "https://api.petje.af/pages/XdvyMNuQArs6KGRANDlT/plans",
"type": "application/hal+json"
},
"rewards": {
"href": "https://api.petje.af/pages/XdvyMNuQArs6KGRANDlT/rewards",
"type": "application/hal+json"
}
}
}
404: Not Found
{
"status": 404,
"title": "Not Found",
"detail": "Page is not found",
"_links": {
"documentation": {
"href": "https://docs.petje.af",
"type": "text/html"
}
}
}