-
Print
-
DarkLight
GET/categories/{id}
Gets category with an ID
Header
Parameter | Type | Description |
---|---|---|
api_token | string | REST API key you can get it from Settings > API. |
Route Parameters
Parameters highlighted in bold are mandatory
Parameter | Type | Description |
---|---|---|
id | string | ID of the category |
Sample Response
{
"data": {
"id": "5a232ecc-8f46-4ea1-8fc1-60511349893a",
"name": "Core",
"project_version_id": "7ba483c0-0929-4bb6-aa43-04a2f4bb8893",
"order": 1,
"parent_category_id": null,
"hidden": false,
"slug" : "core",
"category_type" : 0,
"created_at": "2020-06-11T09:31:35.419Z",
"modified_at": "2020-07-24T07:00:51.725Z",
"articles": [
{
"id": "76022d7e-9fbc-413e-a3d1-52a3963fa054",
"title": "Core Article",
"public_version": 0,
"latest_version": 1,
"hidden": false,
"status": 0,
"order": 1,
"slug": "hello-world"
},
],
"child_categories": [
{
"id": "d2631561-0885-4a0e-a294-951fe393e9ea",
"name": "Core Sub",
"project_version_id": "7ba483c0-0929-4bb6-aa43-04a2f4bb8893",
"order": 1,
"parent_category_id": "5a232ecc-8f46-4ea1-8fc1-60511349893a",
"hidden": false,
"articles": [],
"child_categories": [],
"icon": null
}
],
"icon": null
},
"extension_data": null,
"context": null,
"success": true,
"errors": [],
"warnings": [],
"information": []
}
Response Data
Parameter | Type | Description |
---|---|---|
id | string | ID of the category |
name | string | Name of the category |
project_version_id | string | Id of the project version where this category is located |
order | number | The position inside the parent category |
parent_category_id | string | What is the id of parent category ( null if top level ) |
hidden | boolean | Indicates if category is visible on the site ( If "false" all child categories and articles will be hidden as well ) |
slug | string | The slug of the category |
category_type | number | 0 - Folder, 1 - Page, 2 - Index |
created_at | date | Category created date time |
modified_at | date | Category modified date time |
articles | object[] | The list of articles attached to this category |
child_categories | object[] | The list of categories attached to this category |
icon | string | Unicode representation of the icon |
Response > articles
Parameter | Type | Description |
---|---|---|
id | string | ID of the article |
title | string | Article title |
public_version | number | The version number that is currently published |
latest_version | number | The latest version number of this article |
hidden | boolean | Indicates if article is visible in on the site |
status | enumerated | The status of the article: 0 - Draft, 1 - InReview, 2 - Public, 3 - Published, 4 - Deleted |
order | number | The position inside the parent category |
slug | string | The slug of the article |
Was this article helpful?