Updated on 2023-09-27 GMT+08:00

Querying Knowledge Details

Scenario

This interface is invoked to query knowledge details.

Method

This interface supports only the POST method.

URI

SIA authentication: https://ip:port/rest/ccikbs/v1/columnkngapi/queryKngDetail

AK/SK authentication: https://ip:port/rest/ccikbs/v1/columnkngapi/queryKngDetailByAKSK

In the URL, ip and port indicate the machine-machine interface access address of the NSLB server.

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Default Value

Description

1

Content-Type

String

Yes

None

The value is fixed at application/json;charset=UTF-8 (both authentication modes).

2

X-TenantSpaceID

String

Yes

None

Tenant ID (required for SIA authentication).

3

X-Access-Token

String

Yes

None

For details about the generation mode, see SIA Authentication (required for SIA authentication).

4

Authorization

String

Yes

None

For details about the generation method, see Authentication Mode of Knowledge Base Interfaces (required for AK/SK authentication).

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Default Value

Description

1

coluKngId

String

Yes

None

Category knowledge ID.

2

openType

String

Yes

None

Ways to open a knowledge base. The options are as follows:

  • 1: quick entry
  • 2: search
  • 3: category
  • 4: favorites folder
  • 5: associated knowledge

3

openKng

String

No

None

Associated knowledge ID. This parameter is mandatory when openType is set to 5.

4

searchRank

String

No

1

Sequence number of a search result. This parameter is mandatory when openType is set to 2.

5

searchSortType

String

No

None

Sorting mode of search results. This parameter is mandatory when openType is set to 2. The options are as follows:

  • hit: hit ratio
  • modifyTime: update time
  • clickNum: number of clicks
  • bidRankId: bidding ranking

6

searchWord

String

No

None

Keyword. This parameter is mandatory when openType is set to 2.

7

ccId

Number

No

None

Call center ID. This parameter is mandatory for AK/SK authentication.

8

vdn

Number

No

None

VDN ID. This parameter is mandatory for AK/SK authentication.

Response Description

If this interface fails to be invoked, an error code is returned. For details about the error code data structure, see Table 3.

Table 3 Response body parameters

No.

Parameter

Type

Description

1

resultCode

String

Result code. The options are as follows:

  • 0: success
  • 1: failure

2

description

String

Request result description.

3

data

Object

Request result object. For details, see Table 4.

Table 4 Object parameters of data

No.

Parameter

Type

Description

4.1

relVersionNum

String

Released version.

4.2

coluType

String

Category type. The options are as follows:

  • 1: normal category
  • 2: history category (This value is valid only when coluKngType is set to 1).

4.3

code

String

Node code of the category or knowledge in the category knowledge tree.

4.4

coluKngType

Number

Category knowledge type. The options are as follows:

  • 1: category
  • 2: common knowledge
  • 3: Q&A knowledge

4.5

creationTime

Number

Creation time.

4.6

releaseTimes

Number

Number of knowledge release times.

4.7

orderId

Number

Sequence number.

4.8

kngStatus

Number

Knowledge status. The options are as follows:

  • 1: new
  • 2: reviewed
  • 3: released
  • 4: updated
  • 5: rejected

4.9

kngSize

Number

Size of the knowledge content. The unit is KB.

4.10

creatorId

String

Creator employee ID.

4.11

modifierId

String

Modifier employee ID.

4.12

beyondColuPath

String

Path of the category. The path of the first-level category is /.

4.13

coluKngName

String

Category knowledge name.

4.14

modifyTime

Number

Modification time.

4.15

validEndTime

Number

End time of the validity period.

4.16

summaryInfo

String

Summary.

4.17

serviceStatus

Number

Business status. The options are as follows:

  • 1: common
  • 2: hotspot
  • 3. new
  • 4: updated
  • 5: expired

4.18

clickNum

Number

Number of clicks.

4.19

servicesEndTime

Number

End time of the business validity period.

4.20

keyword

String

Keyword.

4.21

coluKngId

String

Category knowledge ID.

4.22

curVersionNum

Number

Current system version.

4.23

validStartTime

Number

Start time of the validity period.

4.24

displayFlag

Number

Category knowledge flag. The options are as follows:

  • 0: not display
  • 1: display

4.25

kngPath

String

Knowledge path.

4.26

superCode

String

Upper-level category code.

4.27

beyondColuId

String

Category ID. The ID of the first-level category is 0.

4.28

servicesStartTime

Number

Start time of the business validity period.

4.29

partdbId

String

Partition ID.

4.30

tenantId

String

Tenant ID.

4.31

creatorName

String

Creator name.

4.32

pre

Object

Previous knowledge. For details about object parameters of this parameter, see Table 5.

4.33

next

Object

Next knowledge. For details about object parameters of this parameter, see Table 5.

4.34

kngContent

String

Knowledge content.

4.35

kngFiles

List

Attachment list. For details about object parameters of this parameter, see Table 6.

4.36

relaKngs

List

Associated knowledge list. For details about object parameters of this parameter, see Table 7.

Table 5 Object parameters of pre/next

No.

Parameter

Type

Description

1

coluKngId

String

Category knowledge ID.

2

coluKngName

String

Category knowledge name.

3

coluKngType

Number

Category knowledge type. The options are as follows:

  • 1: category
  • 2: common knowledge
  • 3: Q&A knowledge
Table 6 Object parameters of kngFiles

No.

Parameter

Type

Description

1

adjKey

String

Attachment key.

2

creationTime

String

Creation timestamp.

3

orderId

String

Sequence number.

4

versionNum

Number

Version number.

5

adjId

String

Attachment ID.

6

kngId

String

Knowledge ID.

7

creatorId

String

Creator ID.

8

adjName

String

Attachment name.

9

adjClass

Number

Attachment type. The options are as follows:

  • 1: built-in (part of knowledge, such as images and flash files inserted into knowledge content)
  • 2: external (uploaded knowledge attachment)

10

adjSize

Number

File size.

11

partdbId

Number

Partition ID.

12

tenantId

String

Tenant ID.

13

adjType

String

Attachment type.

Table 7 Object parameters of relaKngs

No.

Parameter

Type

Description

1

coluKngId

String

Category knowledge ID.

2

coluKngName

String

Category knowledge name.

3

coluKngType

Number

Category knowledge type. The options are as follows:

  • 1: category
  • 2: common knowledge
  • 3: Q&A knowledge

4

serviceStatus

Number

Business status. The options are as follows:

  • 1: common
  • 2: hotspot
  • 3. new
  • 4: updated
  • 5: expired

Example

  • Request header
    Content-Type: application/json;charset=UTF-8
    X-TenantSpaceID: ********
    Authorization: ******************
  • Request parameters
    {
        "coluKngId": "1286316841328705539",
        "openType": "1",
        "openKng": "1286999404577816579"
    }
  • Response parameters
    {
        "returnCode": "0",
        "description": "success",
        "data": {
            "coluType": 1,
            "coluKngType": 2,
            "orderId": 7,
            "modifierId": "1659333863849146111",
            "modifyRemark": "",
            "modifyTime": 1659426736000,
            "recycleBinFlag": 0,
            "summaryInfo": "Summary",
            "servicesEndTime": 1662025222000,
            "keyword": "hotspot",
            "coluKngId": "1291062494307024899",
            "superCode": "001",
            "beyondColuId": "1290527839128387593",
            "indexNeedUpdate": "1",
            "relVersionNum": 1,
            "code": "001007",
            "creationTime": 1659426503000,
            "releaseTimes": 1,
            "kngStatus": 3,
            "kngSize": 1,
            "creatorId": "1659333863849146111",
            "passProcecWay": 1,
            "beyondColuPath": "/Level-1 category",
            "coluKngName": "All common knowledge",
            "validEndTime": 1662025227000,
            "serviceStatus": 2,
            "kngContent": "<p>1. Product Description > AICC Product Description &nbsp; Chinese and English<br>2. Feature Description > AICC Feature Description &nbsp; Chinese and English<br>3. AICC-Operation Guide (General) &nbsp;Chinese and English<br>4. Operation Configuration Guide &nbsp; Chinese and English <br>5. Configuration File &nbsp; Chinese <br>6. Data File Reference &nbsp; Chinese and English<br>7. AICC CC-CMS Interface Reference &nbsp; Chinese and English</p>",
            "clickNum": 2,
            "curVersionNum": 1,
            "validStartTime": 1659346816000,
            "displayFlag": 1,
            "kngReleaseWay": 1,
            "servicesStartTime": 1659346820000,
            "partdbId": 0,
            "tenantId": "202208016593",
            "creatorName": "caoyun0802",
            "pre": {
                "coluKngId": "1290628927894585391",
                "coluKngName": "1123",
                "coluKngType": 2
            },
            "next": {
                "coluKngId": "1291066079866519597",
                "coluKngName": "34567",
                "coluKngType": 2
            },
            "kngFiles": [
                {
                    "adjKey": "ccikbs/file/202208016593/5c105100-a8fe-4244-8920-02185bab58e8",
                    "creationTime": 1659426504000,
                    "orderId": 1,
                    "versionNum": 1,
                    "adjId": "1291062496118964228",
                    "kngId": "1291062494307024899",
                    "creatorId": "1659333863849146111",
                    "adjName": "Content20220729 (1).xlsx",
                    "adjClass": 2,
                    "adjSize": 9146,
                    "partdbId": 0,
                    "tenantId": "202208016593",
                    "adjType": "xlsx"
                }
            ],
            "relaKngs": [
                {
                    "coluKngId": "1290612589302120476",
                    "coluKngName": "Collected Q&A",
                    "coluKngType": 3,
                    "serviceStatus": 2
                },
                {
                    "coluKngId": "1290628927894585391",
                    "coluKngName": "1123",
                    "coluKngType": 2,
                    "serviceStatus": 1
                }
            ]
        }
    }