Get Sub Topics

Overview

  • This API allows users to retrieve topics.
  • Topics returned in the response are filtered based on the provided query parameter.

Permissions

  • The user must have 'View' action on 'Topic' resource.
  • The user sending the request should be from the same or shared department as the topic.

Note

  • One of the following query parameters is must for API to work: filter[portal], filter[department], filter[parent], filter[article]
SecurityoAuthUser or oAuthClient
Request
query Parameters
filter[portal]
string

Returns the topics for the given portal ID if user is allowed to read them.

Example: filter[portal]=40960000000096
filter[department]
string

Returns all the topics for the given department ID if user is allowed to read them.

Example: filter[department]=1000
filter[parent]
string

Returns the sub-topics for the given parent topic ID. How many levels of sub-topics to return is decided by the value of $level query parameter.

Example: filter[parent]=40960000000097
filter[article]
string

Returns all the topics, the given article is used in.

Example: filter[article]=40960000000098
$attribute
string

The attributes to be returned in the response.

Enum: "id" "name" "created" "description" "autogenerated" "language" "path" "isTranslatable" "imageUrl" "lastModified" "department" "parentTopic"
$pagenum
string

Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
Default value: 1

$pagesize
string

Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
Default value: 10

$lang
required
string

The knowledge base language used for retrieving response. Must be a language enabled in the system.

Enum: "en-US" "en-GB" "fr-FR" "es-ES" "it-IT" "de-DE" "nl-NL" "pt-BR" "pt-PT" "da-DK" "sv-SE" "ru-RU" "fr-CA" "zh-CN" "ja-JP" "ko-KR"
$level
integer

Levels of child topics to be returned :

  • -1: will return subtopics upto last level.
  • 0: no subtopics will be returned.
  • any positive number: sub-topics will be returned upto the given value.
Example: $level=2
filter[type]
string

This specifies if user wants to fetch user-defined or topics from folders. Only applicable with filter[portal] or filter[department] query parameters.

Enum: "manual" "topicsFromFolder"
filter[name]
string

If passed, response will have the objects filtered by names matching this value.

Example: filter[name]=topicName
$sort
string
Default: "name"

Attribute to be used for sorting response

Enum: "id" "name" "description" "createdBy" "createdOn" "lastModifiedBy" "lastModifiedOn" "preservedOrderOfPortalTopics"
$order
string

Common query parameter $order.

Enum: "asc" "desc"
Responses
200

Success

204

No content

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

406

Not acceptable

500

Internal server error

get/topics
Request samples
Response samples
application/json
{
  • "link": {
    },
  • "paginationInfo": {
    },
  • "topic": {
    },
  • "count": 1
}