Gets list of categories within project version
  • 26 Sep 2023
  • 4 Minutes to read
  • Contributors
  • Dark
    Light

Gets list of categories within project version

  • Dark
    Light

Article Summary

Get
/v2/ProjectVersions/{projectVersionId}/categories
Security
API Key
Header parameter nameapi_token
Enter REST API key. To generate a key, go to Settings → Knowledge base portal → API tokens
Path parameters
projectVersionId
stringRequired

The ID of the project version

Query parameters
excludeArticles
boolean

True - Articles will be excluded; False - Articles will be included

langCode
string

Get article in the project version that corresponds to the given language code. If the language code is empty, the default language of the project version will be taken into account

includeCategoryDescription
boolean

True - Include category description; False - Exclude category description

Default"False"
Responses
200

Success

Example for 200 response

200 response in get list of categories within project version

{
  "data": [
    {
      "id": "f587e278-4205-4a07-a6b7-28dc9caf6f48",
      "name": "Getting started",
      "description": "This is the description of the getting started category.",
      "project_version_id": "ad76e483-6ef7-4e43-b53f-4fe5e52sefw",
      "order": 1,
      "parent_category_id": null,
      "hidden": false,
      "articles": [
        {
          "id": "c31b0a18-5416-4cef-b165-83d9b52ada43",
          "title": "Why did we build Document360?",
          "public_version": 1,
          "latest_version": 1,
          "language_code": null,
          "hidden": false,
          "status": 3,
          "order": 1,
          "slug": "why-did-we-build-document360",
          "content_type": null
        }
      ],
      "child_categories": [],
      "icon": null,
      "slug": "getting-started",
      "language_code": null,
      "category_type": 0,
      "created_at": "2023-09-26T06:34:59.5694143Z",
      "modified_at": "2023-09-26T06:34:59.5694151Z"
    }
  ],
  "extension_data": null,
  "success": true,
  "errors": [],
  "warnings": [],
  "information": []
}
Expand All
object
data
Array of object (CategoryDataCustomer)
object
id
string

The ID of the category

name
string

Name of the category

description
string

Description of the category

project_version_id
string

The ID of the project version where this category is located

order
integer (int32)

The position the category inside the parent category

parent_category_id
string

The ID of the parent category ( null if top-level )

hidden
boolean

Indicates if the category is visible on the site ( If "false," all the child categories and articles will be hidden as well )

articles
Array of object (ArticleSimpleDataCustomer)

The list of articles attached to this category

object
id
string

The ID of the article

title
string

The article title

public_version
integer (int32)

The article version number(revision) that is currently published

latest_version
integer (int32)

The latest version number of this article

language_code
string

Language code of the article

hidden
boolean

Indicates if the article is visible on the site

status
integer (int32)

The status of the category page: 0 - Draft, 1 - In review, 2 - Public, 3 - Published, 4 - Deleted, 5 - Forked

Valid values[0,1,2,3,4,5]
order
integer (int32)

The position of the article inside the parent category

slug
string

The slug of the article

content_type
integer (int32)

0 - Markdown content; 1 - HTML content; 2 - Block Content

Valid values[0,1,2]
child_categories
Array of object (CategoryDataCustomer)

The list of categories attached to this category

object Recursive
icon
string

Unicode representation of the icon or image URL

slug
string

The slug of the category

language_code
string

Language code of the category

category_type
integer (int32)

0 - Folder, 1 - Page, 2 - Index

Valid values[0,1,2]
created_at
string (date-time)

Category created date time

modified_at
string (date-time)

Category modified date time

extension_data
object (ExtensionDataObject)
success
boolean

Status indication for customer API response

errors
Array of object (BaseError)

Errors in the customer API response

object
extension_data
object (ExtensionDataObject)
stack_trace
string

Stack trace for error response message

description
string

Description for error cause

error_code
string

Error code for Api resonse

custom_data
object
warnings
Array of object (BaseWarning)

Warning in the customer API response

object
extension_data
object (ExtensionDataObject)
description
string

Warning description

warning_code
string

warning code for customer Api base response

information
Array of object (BaseInformation)

Information passed by the customer API response

object
extension_data
object (ExtensionDataObject)
description
string

status description for customer Api response information

400

Bad Request

Example for 400 response

400 response in get list of categories within project version

{
  "data": [],
  "extension_data": null,
  "success": true,
  "errors": [],
  "warnings": [],
  "information": []
}
Expand All
object
data
Array of object (CategoryDataCustomer)
object
id
string

The ID of the category

name
string

Name of the category

description
string

Description of the category

project_version_id
string

The ID of the project version where this category is located

order
integer (int32)

The position the category inside the parent category

parent_category_id
string

The ID of the parent category ( null if top-level )

hidden
boolean

Indicates if the category is visible on the site ( If "false," all the child categories and articles will be hidden as well )

articles
Array of object (ArticleSimpleDataCustomer)

The list of articles attached to this category

object
id
string

The ID of the article

title
string

The article title

public_version
integer (int32)

The article version number(revision) that is currently published

latest_version
integer (int32)

The latest version number of this article

language_code
string

Language code of the article

hidden
boolean

Indicates if the article is visible on the site

status
integer (int32)

The status of the category page: 0 - Draft, 1 - In review, 2 - Public, 3 - Published, 4 - Deleted, 5 - Forked

Valid values[0,1,2,3,4,5]
order
integer (int32)

The position of the article inside the parent category

slug
string

The slug of the article

content_type
integer (int32)

0 - Markdown content; 1 - HTML content; 2 - Block Content

Valid values[0,1,2]
child_categories
Array of object (CategoryDataCustomer)

The list of categories attached to this category

object Recursive
icon
string

Unicode representation of the icon or image URL

slug
string

The slug of the category

language_code
string

Language code of the category

category_type
integer (int32)

0 - Folder, 1 - Page, 2 - Index

Valid values[0,1,2]
created_at
string (date-time)

Category created date time

modified_at
string (date-time)

Category modified date time

extension_data
object (ExtensionDataObject)
success
boolean

Status indication for customer API response

errors
Array of object (BaseError)

Errors in the customer API response

object
extension_data
object (ExtensionDataObject)
stack_trace
string

Stack trace for error response message

description
string

Description for error cause

error_code
string

Error code for Api resonse

custom_data
object
warnings
Array of object (BaseWarning)

Warning in the customer API response

object
extension_data
object (ExtensionDataObject)
description
string

Warning description

warning_code
string

warning code for customer Api base response

information
Array of object (BaseInformation)

Information passed by the customer API response

object
extension_data
object (ExtensionDataObject)
description
string

status description for customer Api response information


Was this article helpful?