Search Results for

    Show / Hide Table of Contents

    用户和对话历史

    获取用户列表

    Chatbot#command("GET", "/users")
    

    path

    key type default description
    limit int 1 返回最多多少条数据
    page int 20 返回第多少页

    result / JSON Object

    {
        "rc": 0,
        "total": 5,
        "current_page": 1,
        "total_page": 1,
        "data": [
            {
                "userId": "{{userId}}",
                "lasttime": "2020-07-19T14:12:13.690Z",
                "created": "2020-07-19T13:48:02.225Z"
            }
        ]
    }
    

    userId: 和机器人对话的用户标识

    lasttime: 最后沟通时间

    created: 第一次沟通时间

    屏蔽用户

    Chatbot#command("POST", "/users/{{userId}}/mute")
    

    path

    key type default description
    userId string 无默认值, 必填 用户唯一标识

    result / JSON Object

    {
        "rc": 0,
        "data": {}
    }
    

    取消屏蔽

    Chatbot#command("POST", "/users/{{userId}}/unmute")
    

    path

    key type default description
    userId string 无默认值, 必填 用户唯一标识

    result / JSON Object

    {
        "rc": 0,
        "data": {}
    }
    

    是否被屏蔽

    Chatbot#command("POST", "/users/{{userId}}/ismute")
    

    result / JSON Object

    {
        "rc": 0,
        "data": {
            "mute": false
        }
    }
    

    data.mute返回 boolean 类型值。

    获取用户画像信息

    Chatbot#command("GET", "/users/{{userId}}/profile")
    

    path

    key type default description
    userId string 无默认值, 必填 用户唯一标识

    result/ JSON Object

    {
        "rc": 0,
        "data": {
            "userId": "postman9",
            "name": null,
            "lasttime": "2020-07-19T14:12:13.690Z",
            "created": "2020-07-19T13:48:02.225Z",
            "profile": {},
            "mute": false
        }
    }
    

    获取聊天历史

    Chatbot#command("GET", "/users/{{userId}}/chats?limit={{limit}}&page={{page}}")
    

    path

    key type default description
    userId string 无默认值, 必填 用户唯一标识
    limit int 1 返回最多多少条数据
    page int 20 返回第多少页

    result / JSON Object

    {
        "rc": 0,
        "total": 16,
        "current_page": 1,
        "total_page": 1,
        "data": [
            {
                "userId": "postman9",
                "textMessage": "方法",
                "direction": "outbound",
                "service": "faq",
                "confidence": 0.3781,
                "docId": "AXNCspoufXOJhfysI3-Z",
                "created": "2020-07-19T14:12:13.802Z"
            }
        ]
    }
    

    total: 该用户和机器人之间对话总数

    current_page: 当前页

    total_page: 总页数

    userId: 用户标识

    textMessage: 文本内容

    direction: 消息传递方向,【inbound】为消费者发送,【outbound】为机器人发送

    service: 提供回复的服务

    confidence: 置信度

    created: 消息创建时间

    In This Article
    Back to top Copyright © (2018-CopyrightYearPlaceholderDONOTCHANGEManually) 北京华夏春松科技有限公司 京ICP备20023756号-3