Get all topics

Overview

  • Use this API to retrieve topic tree for a portal.
  • The $level attribute determines how deep the topic hierarchy should go, or how many child topics of a topic should be returned as a response.
SecurityoAuthUser or oAuthCustomer or oAuthAnonymousCustomer
Request
path Parameters
portalID
required
number
Example: 202200000001001
query Parameters
$level
number

Depth of the topic hierarchy to be returned in the response. I.E if only parent topic are required, level should be passed as 0, if immediate child topics are required then level should be 1 and if immediate children and grand children are required then level should be 2 and so on.

Example: $level=1
$lang
string

The knowledge base language used for retrieving response. Must be a language accessible to user. If this parameter is not passed, default language of the system is used.

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"
Example: $lang=en-US
$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

$rangestart
string

Range parameter that specifies the starting index of the range of results to be returned. Used in conjunction with $rangesize.
Default value: 1

$rangesize
string

Range parameter that specifies the number (range) of results to be returned. Used in conjunction with $rangestart.
Default value: 10

$attribute
string

The fields of the topics to be returned.

Example: $attribute=createdByUserName, lastModifiedByUsername, custom.attribute.name, homeArticleId, all
header Parameters
Accept-Language
required
string
Default: en-US

Language locale accepted by client (used for locale specific fields in resource representation and in error responses).

Enum: "en-US" "es-ES" "fr-FR" "it-IT" "de-DE" "nl-NL" "pt-BR" "pt-PT" "da-DK" "ru-RU" "fr-CA" "zh-CN" "ja-JP" "ko-KR" "sv-SE"
X-egain-tenant-id
string

Unique identifier for tenant.

X-egain-activity-id
integer

Numeric unique identifier of interaction from eGain.

X-interaction-id
string

Unique identifier for interaction from other CRM applications.

Responses
200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

406

Not acceptable

500

Internal server error

get/portals/{portalID}/topics
Request samples
Response samples
application/json
{
  • "topicTree": [
    ],
  • "paginationInfo": {
    }
}