Get category
  • Updated on 26 Feb 2019
  • 2 minutes to read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Get category

  • Print
  • Share
  • Dark
    Light

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,
        "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,
        "icon_type": 0
    },
    "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 )
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
Was this article helpful?