Get a category
Contents
Get a single category, including the full details of every page in it.
Requires the API Token. See Authentication.
HTTP Request
GET /api/categories/{key}
Parameters
| Key | Type | Description |
|---|---|---|
token (required) |
string | API Token. |
Response
HTTP Code: 200
Content-Type: application/json
Body:
{
"status": "0",
"message": "Information about the category and pages related.",
"data": {
"key": "general",
"name": "General",
"description": "",
"template": "",
"list": ["welcome", "about"],
"pages": [
{ "key": "welcome", "title": "...", "...": "..." }
]
}
}
list contains page keys; pages contains the same pages expanded into full page objects.
Errors
| Code | Reason |
|---|---|
404 |
No category exists with the given key. |
CURL command example
$ curl -X GET "https://www.example.com/api/categories/general?token=<api-token>"