Topic

Get All Topics

GET
/knowledge/portalmgr/v4/portals/{portalID}/topics

Overview

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.

Authorization

accessToken
AuthorizationBearer <token>

JWT Bearer Token authentication for API access

In: header

Path Parameters

portalID*string

The ID of the portal being accessed.A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.

Match^[a-zA-Z0-9]{2,4}-\d{4,15}$
Length7 <= length <= 20

Query Parameters

searchProfileId?string

Search Profile ID

Length1 <= length <= 15
level?integer

Depth of the topic hierarchy to be returned in the response.

Formatint64
Range-1 <= value <= 20
$lang?string

The language that describes the details of a resource. Resources available in different languages may differ from each other.If lang is not passed, then the portal's default language is used.

Value in

  • "en-US"
  • "fr-FR"
  • "en-GB"
  • "es-ES"
  • "it-IT"
  • "nl-NL"
  • "da-DA"
  • "sv-SE"
  • "pt-PT"
  • "fi-FI"
  • "no-NB"
  • "no-NN"
  • "ja-JA"
  • "de-DE"
  • "pt-BR"
  • "zh-CN"
  • "zh-TW"
  • "ko-KO"
  • "ru-RU"
  • "el-EL"
  • "tr-TR"
  • "pl-PL"
  • "cs-CS"
  • "sk-SK"
  • "hu-HU"
  • "sr-SR"
  • "ar-SA"
  • "hr-HR"
  • "ro-RO"
  • "th-TH"
  • "de-AT"
  • "vi-VN"
  • "id-ID"
  • "ms-MY"
  • "fil-PH"
  • "fr-CA"
  • "hi-IN"
  • "uk-UA"
  • "bg-BG"
  • "sl-SI"
  • "xx-XX"
topicAdditionalAttributes?array<>

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.

Default Attributes

These topic attributes are always returned:

NameDescription
idThe ID of the topic.
nameThe name of the topic.
articleCountInTopicNumber of articles in this topic.
articleCountInTopicTreeNumber of articles in this topic and all sub-topics.
createdBy.idThe ID of the user that created the topic.
createdDateThe date when the topic was created.
departmentIdID of the department for which this topic belongs to.
topicHomeArticleIdThe ID of the article used as the home page of this topic.
modifiedBy.idThe ID of the user that last modified the topic.
modifiedDateThe date when the topic was last modified on.
childCountTotal number of children sub-topis below the current topic
subTopicIdsArray with the list of sub-topics
parentTopicIdID of the parent topic. -1 if it is the root topic.
$customAdditionalAttributes?string

One or more comma-separated names for custom attributes defined by the user to be returned.

Match^([a-zA-Z0-9_-]+)(?:,[a-zA-Z0-9_-]+)*$
Length1 <= length <= 4000
$pagenum?integer

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

Formatint32
Range1 <= value <= 999
Default1
$pagesize?integer

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

Formatint32
Range1 <= value <= 75
Default10

Header Parameters

Accept-Language*string

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

Value in

  • "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-ext-integration-id?string

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.

Match^[\w\W]+$
Lengthlength <= 40
x-egain-activity-id?string

A unique numeric interaction identifier from eGain.

Match^[0-9]{4,9}$
Length4 <= length <= 9
x-ext-interaction-id?string

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.

Match^[\w\W]+$
Lengthlength <= 40

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/knowledge/portalmgr/v4/portals/PROD-1000/topics?level=-1&topicAdditionalAttributes=modifiedBy.userName&%24customAdditionalAttributes=country_name" \  -H "Accept-Language: en-US" \  -H "x-ext-integration-id: 3155180e-0c13-43e9-9c38-e9045bcbf176" \  -H "x-egain-activity-id: 59237" \  -H "x-ext-interaction-id: 3155180e-0c13-43e9-9c38-e9045bcbf176"
{  "topicTree": [    {      "topic": {        "name": "Online Access",        "description": "",        "articleCountInTopic": 0,        "articleCountInTopicTree": 73,        "createdBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "createdDate": "2022-05-23T19:44:02Z",        "departmentId": 1001,        "modifiedBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "modifiedDate": "2022-05-24T13:52:26Z",        "parentTopicId": -1,        "childCount": 9,        "id": "PROD-1001"      },      "topicTree": [        {          "topic": {            "name": "Accessing Your Account",            "description": "",            "articleCountInTopic": 18,            "articleCountInTopicTree": 18,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-08T22:39:09Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-06-08T22:39:09Z",            "parentTopicId": "PROD-1001",            "childCount": 0,            "id": "PROD-1062"          }        },        {          "topic": {            "name": "Electronic Payments & Deposits",            "description": "",            "articleCountInTopic": 3,            "articleCountInTopicTree": 3,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-07-01T14:01:38Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-07-07T17:10:33Z",            "parentTopicId": "PROD-1001",            "childCount": 0,            "id": "PROD-1152"          }        },        {          "topic": {            "name": "Manage Accounts",            "description": "",            "articleCountInTopic": 16,            "articleCountInTopicTree": 16,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-09T15:15:36Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-07-12T14:33:27Z",            "parentTopicId": "PROD-1001",            "childCount": 0,            "id": "PROD-1063"          }        },        {          "topic": {            "name": "Membership",            "description": "",            "articleCountInTopic": 3,            "articleCountInTopicTree": 3,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-22T19:38:45Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-06-22T19:38:45Z",            "parentTopicId": "PROD-1001",            "childCount": 0,            "id": "PROD-1124"          }        },        {          "topic": {            "name": "Mobile Banking",            "description": "",            "articleCountInTopic": 3,            "articleCountInTopicTree": 3,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-10T14:29:46Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-06-10T14:30:52Z",            "parentTopicId": "PROD-1001",            "childCount": 0,            "id": "PROD-1082"          }        },        {          "topic": {            "name": "Personal Information",            "description": "",            "articleCountInTopic": 2,            "articleCountInTopicTree": 2,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-10T15:28:51Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-06-10T15:28:51Z",            "parentTopicId": "PROD-1001",            "childCount": 0,            "id": "PROD-1090"          }        },        {          "topic": {            "name": "Stop Payments",            "description": "",            "articleCountInTopic": 3,            "articleCountInTopicTree": 3,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-10T15:32:01Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-06-10T15:32:01Z",            "parentTopicId": "PROD-1001",            "childCount": 0,            "id": "PROD-1091"          }        },        {          "topic": {            "name": "Using Online Banking",            "description": "",            "articleCountInTopic": 21,            "articleCountInTopicTree": 21,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-10T14:41:53Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-06-10T14:41:53Z",            "parentTopicId": "PROD-1001",            "childCount": 0,            "id": "PROD-1088"          }        },        {          "topic": {            "name": "Zelle",            "description": "",            "articleCountInTopic": 4,            "articleCountInTopicTree": 4,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-10T14:31:11Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-06-10T18:08:01Z",            "parentTopicId": "PROD-1001",            "childCount": 0,            "id": "PROD-1084"          }        }      ]    },    {      "topic": {        "name": "Accessing Your Account",        "articleCountInTopic": 21,        "articleCountInTopicTree": 21,        "createdBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "createdDate": "2022-06-09T16:24:27Z",        "departmentId": 1001,        "modifiedBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "modifiedDate": "2022-06-09T16:24:27Z",        "parentTopicId": -1,        "childCount": 0,        "id": "PROD-1064"      }    },    {      "topic": {        "name": "Banking Regulations",        "articleCountInTopic": 19,        "articleCountInTopicTree": 19,        "createdBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "createdDate": "2022-06-09T16:24:37Z",        "departmentId": 1001,        "modifiedBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "modifiedDate": "2022-06-09T16:24:37Z",        "parentTopicId": -1,        "childCount": 0,        "id": "PROD-1065"      }    },    {      "topic": {        "name": "Checking and Savings Accounts",        "articleCountInTopic": 12,        "articleCountInTopicTree": 26,        "createdBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "createdDate": "2022-06-09T16:24:49Z",        "departmentId": 1001,        "modifiedBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "modifiedDate": "2022-06-09T16:24:49Z",        "parentTopicId": -1,        "childCount": 2,        "id": "PROD-1066"      },      "topicTree": [        {          "topic": {            "name": "Credit Cards",            "articleCountInTopic": 10,            "articleCountInTopicTree": 10,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-09T16:25:27Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-06-09T16:25:27Z",            "parentTopicId": "PROD-1066",            "childCount": 0,            "id": "PROD-1068"          }        },        {          "topic": {            "name": "Debit Cards",            "articleCountInTopic": 4,            "articleCountInTopicTree": 4,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-09T16:25:45Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-06-09T16:25:45Z",            "parentTopicId": "PROD-1066",            "childCount": 0,            "id": "PROD-1069"          }        }      ]    },    {      "topic": {        "name": "Claims",        "articleCountInTopic": 0,        "articleCountInTopicTree": 0,        "createdBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "createdDate": "2022-06-10T14:31:45Z",        "departmentId": 1001,        "modifiedBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "modifiedDate": "2022-06-10T14:31:45Z",        "parentTopicId": -1,        "childCount": 0,        "id": "PROD-1085"      }    },    {      "topic": {        "name": "Loans",        "articleCountInTopic": 11,        "articleCountInTopicTree": 11,        "createdBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "createdDate": "2022-06-09T16:30:12Z",        "departmentId": 1001,        "modifiedBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "modifiedDate": "2022-06-09T16:30:12Z",        "parentTopicId": -1,        "childCount": 0,        "id": "PROD-1070"      }    },    {      "topic": {        "name": "Membership",        "articleCountInTopic": 5,        "articleCountInTopicTree": 5,        "createdBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "createdDate": "2022-06-09T16:30:25Z",        "departmentId": 1001,        "modifiedBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "modifiedDate": "2022-06-09T16:30:25Z",        "parentTopicId": -1,        "childCount": 0,        "id": "PROD-1071"      }    },    {      "topic": {        "name": "Using Online Banking",        "articleCountInTopic": 20,        "articleCountInTopicTree": 46,        "createdBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "createdDate": "2022-06-09T16:31:03Z",        "departmentId": 1001,        "modifiedBy": {          "id": "1013",          "firstName": "John",          "middleName": "",          "lastName": "Doe"        },        "modifiedDate": "2022-06-09T16:31:03Z",        "parentTopicId": -1,        "childCount": 3,        "id": "PROD-1072"      },      "topicTree": [        {          "topic": {            "name": "Mobile Banking",            "articleCountInTopic": 3,            "articleCountInTopicTree": 3,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-09T16:31:12Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-06-09T16:31:12Z",            "parentTopicId": "PROD-1072",            "childCount": 0,            "id": "PROD-1073"          }        },        {          "topic": {            "name": "Online Banking",            "articleCountInTopic": 19,            "articleCountInTopicTree": 19,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-09T16:31:24Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-06-09T16:31:24Z",            "parentTopicId": "PROD-1072",            "childCount": 0,            "id": "PROD-1074"          }        },        {          "topic": {            "name": "Zelle",            "articleCountInTopic": 4,            "articleCountInTopicTree": 4,            "createdBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "createdDate": "2022-06-09T16:31:32Z",            "departmentId": 1001,            "modifiedBy": {              "id": "1013",              "firstName": "John",              "middleName": "",              "lastName": "Doe"            },            "modifiedDate": "2022-06-09T16:31:32Z",            "parentTopicId": "PROD-1072",            "childCount": 0,            "id": "PROD-1075"          }        }      ]    }  ]}