- Portal Manager
- V4
The Get All Topics API retrieves the topic tree for a portal. The $level attribute determines how deep the topic hierarchy should go, or how many child topics of a topic are returned in the response.
Depth of the topic hierarchy to be returned in the response.
The attributes of a topic to be returned in addition to the default list of attributes, listed below. Multiple additional attributes can be specified using a comma-separated list. Passing 'all' returns all attributes.
These topic attributes are always returned:
| Name | Description |
|---|---|
| id | The ID of the topic. |
| name | The name of the topic. |
| articleCountInTopic | Number of articles in this topic. |
| articleCountInTopicTree | Number of articles in this topic and all sub-topics. |
| createdBy.id | The ID of the user that created the topic. |
| createdDate | The date when the topic was created. |
| departmentId | ID of the department for which this topic belongs to. |
| topicHomeArticleId | The ID of the article used as the home page of this topic. |
| modifiedBy.id | The ID of the user that last modified the topic. |
| modifiedDate | The date when the topic was last modified on. |
| childCount | Total number of children sub-topis below the current topic |
| subTopicIds | Array with the list of sub-topics |
| parentTopicId | ID of the parent topic. -1 if it is the root topic. |
One or more comma-separated names for custom attributes defined by the user to be returned.
The unique numeric identifier for a tenant, used in self-service functionality as well as third-party integrations.
Note: The x-ext-integration-id and x-ext-interaction-id headers must always be provided together and cannot be supplied independently.
The x-egain-activity-id may be provided on its own, or it may be provided along with both x-ext-integration-id and x-ext-interaction-id.
A unique interaction identifier from other CRM applications.
Note: The x-ext-integration-id and x-ext-interaction-id headers must always be provided together and cannot be supplied independently.
The x-egain-activity-id may be provided on its own, or it may be provided along with both x-ext-integration-id and x-ext-interaction-id.
- oAuthUser
- oAuthCustomer
- oAuthClient
- oAuthOnBehalfOfUser
- oAuthOnBehalfOfCustomer
- oAuthAnonymousCustomer
curl -i -X GET \
'https://api.egain.cloud/knowledge/portalmgr/v4/portals/PROD-1000/topics?searchProfileId=959500000204621&level=-1&%24lang=en-US&topicAdditionalAttributes=modifiedBy.userName&%24customAdditionalAttributes=country_name&%24pagenum=1&%24pagesize=10' \
-H 'Accept-Language: en-US' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-egain-activity-id: 59237' \
-H 'x-ext-integration-id: 3155180e-0c13-43e9-9c38-e9045bcbf176' \
-H 'x-ext-interaction-id: 3155180e-0c13-43e9-9c38-e9045bcbf176'{ "topicTree": [ { … }, { … }, { … }, { … }, { … }, { … }, { … }, { … } ] }