FAQ知識タグリストの取得

リクエストURL

リクエストパラメータ

クエリパラメータ

パラメータ タイプ オプション 説明
robotId Integer false ボットID.

レスポンス

フィールド タイプ 説明
code Integer 実行結果コード
message String 実行結果の説明
data Array 知識タグ情報
data[].id Integer タグID.
data[].robotId Integer ボットID.
data[].name String 名称.
data[].description String 説明.
data[].regex String 正規表現.
data[].parentId Integer タグの親ID.
data[].parentIds String タグの親IDパス(カンマ区切り).
data[].type Integer 1:すべて 2:未分類 3:ユーザー定義タグ

$ curl 'https://km.udesk.cn/api/v1/questionLabels/findAllWithNum?email=admin@udesk.cn&timestamp=1529402433&sign=e4f683120c26df279b3642ac77b0bd8bf621584a&robotId=102' -i -H 'Accept: application/json'
レスポンス
{
    "succeed": true,
    "code": 200,
    "bizCode": "000000",
    "message": "OK",
    "visible": false,
    "paging": {
        "pageNum": 1,
        "pageSize": 10,
        "total": 5
    },
    "data": [
        {
            "id": -1,
            "robotId": 551,
            "name": "すべて",
            "description": null,
            "regex": null,
            "parentId": 0,
            "parentIds": "0,",
            "type": 1,
            "ranking": 0
        },
        {
            "id": 2147483647,
            "robotId": 551,
            "name": "知識タグなし",
            "description": null,
            "regex": null,
            "parentId": -1,
            "parentIds": "0,-1,",
            "type": 2,
            "ranking": 0
        },
        {
            "id": 140,
            "robotId": 551,
            "name": "ドローン",
            "description": "",
            "regex": "",
            "parentId": 139,
            "parentIds": "0,-1,139,",
            "type": 3,
            "ranking": 1
        },
        {
            "id": 142,
            "robotId": 551,
            "name": "第一世代",
            "description": "",
            "regex": "",
            "parentId": 140,
            "parentIds": "0,-1,139,140,",
            "type": 3,
            "ranking": 1
        },
        {
            "id": 147,
            "robotId": 551,
            "name": "ボタンメッセージ",
            "description": "",
            "regex": "",
            "parentId": 146,
            "parentIds": "0,-1,146,",
            "type": 3,
            "ranking": 1
        }
    ]
}

FAQ知識タグ詳細の取得

リクエストURL

リクエストパラメータ

Path parameters

Parameter Type Optional Description
id Integer false タグID.

レスポンス

Path Type Description
code Integer 実行結果コード
message String 実行結果の説明
data Object 知識タグ情報
data.id Integer タグID.
data.robotId Integer ロボットID.
data.name String 名称.
data.description String 説明.
data.regex String 正規表現.
data.parentId Integer タグの親ID.
data.parentIds String タグの親IDパス(カンマ区切り).
data.type Integer 1:全て 2:未分類 3:ユーザー定義タグ

$ curl 'https://km.udesk.cn/api/v1/questionLabels/147?email=admin@udesk.cn&timestamp=1529402429&sign=c8b3e4dfef80a80e6125d2863912f6cdf1d20509' -i -H 'Accept: application/json'
レスポンス
{
  "code" : 200,
  "message" : "OK",
  "visible" : false,
  "data" : {
    "id": 147,
    "robotId": 551,
    "name": "ボタンメッセージ",
    "description": "",
    "regex": "",
    "parentId": 146,
    "parentIds": "0,-1,146,",
    "type": 3,
    "ranking": 1
  }
}

FAQ知識タグの削除

リクエストURL

リクエストパラメータ

Path parameters

Parameter Type Optional Description
id Integer false タグID.

レスポンス

$ curl 'https://km.udesk.cn/api/v1/questionLabels/147?email=admin@udesk.cn&timestamp=1529402432&sign=67df1ddd1aad415933d63da93ca24b59c8970740' -i -X DELETE -H 'Content-Type: application/json'

FAQ知識タグの新規作成

リクエストURL

リクエストパラメータ

Request fields

Parameter Type Optional Description
name String true タグ名称.
description String false 説明.
regex String false 正規表現.
parentId Integer false タグの親ID.
robotId Integer true ロボットID.
### リクエスト結果
Path Type Description
--- --- ---
code Integer 実行結果コード
message String 実行結果の説明
data Object ナレッジタグ情報
data.id Integer タグID
data.robotId Integer ボットID
data.name String 名称
data.description String 説明
data.regex String 正規表現
data.parentId Integer タグの親ID
data.parentIds String タグの親IDパス(カンマ区切り)
data.type Integer 1:すべて 2:未分類 3:ユーザー定義タグ

サンプル

$ curl 'https://km.udesk.cn/api/v1/questionLabels?email=admin@udesk.cn&timestamp=1529402431&sign=bd23cf273d088d9c9031958712670673dae1d5ce' -i -X POST -H 'Content-Type: application/json' -d '{
  "name" : "タグ2",
  "parentId" : 342,
  "robotId" : 102
}'
レスポンス
{
  "code" : 200,
  "message" : "OK",
  "visible" : false,
  "data" : {
    "id" : 384,
    "name" : "タグ2",
    "parentId" : 342,
    "parentIds" : "0,342,",
    "robotId" : 102,
    "type": 2
  }
}