다양한 시간 간격으로 특정 기간 동안 봇과 상호 작용한 사용자 수를 제공합니다.

이 API를 사용하려면 앱에 봇 범위가 필요합니다.

POST https://{{host}}/api/public/bot/{{BotID}}/userEngagementTrend?aggregation_type={{type}}&start_date={{from}}&end_date={{to}}&channels={{channel}}

경로 매개 변수

매개 변수 필수/선택 사항 설명
host 필수 환경 URL(예: https://bots.kore.ai)
BotID 필수 봇 ID 또는 스트림 ID. 봇의 일반 설정 페이지에서 이를 액세스할 수 있습니다.

쿼리 매개 변수

 

매개 변수 필수/선택 사항 설명
filters 필수 결과 집합을 필터링하기 위해 다음 세부 정보가 있는 개체
start_date 필수 고려할 기간의 시작 시간을 나타냅니다.
end_date 필수 고려할 기간의 종료 시간을 나타냅니다.
channel 선택 사항 상호 작용이 발생한 채널을 나타냅니다.
aggregation_type 선택 사항

허용되는 집계 유형을 나타내며 가능한 값은 다음과 같습니다.

  • 시간별(기본값)
  • 매일

권한 부여

다음 구문을 포함한 헤더에 JWT를 포함한 API를 호출합니다. auth: {{JWT}}

콘텐츠 유형 응답

application/json

샘플 요청

curl -X POST \
  'https://{{host}}/api/public/bot/{{bot_id}}/userEngagementTrend?aggregation_type=Hourly&start_date=2020-09-01&end_date=2020-09-05&channels=rtm '\
  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
  -H 'content-type: application/json'

샘플 응답

  • when aggregation_type = Daily
    {
      results:[
         { date: "MMM DD YYYY",
           users: “number of users”
          },
         { date: "MMM DD YYYY",
           users: “number of users”
          }
         ],
      totalResults: 2
     }
  • when aggregation_type = Hourly or empty or not given
    {
     [
       results:{
           date:"Aug 06 2020",
           "0 - 1": 20,
           "1 - 2": 0,
           "2 - 3": 0,
           "3 - 4": 10,
           "4 - 5": 0,
           ..
           "23 - 0": 0
         },
             {
           date:"Aug 07 2020",
           "0 - 1": 20,
           "1 - 2": 0,
           ..
           "21 - 22": 0,
           "22 - 23": 0,
           "23 - 0": 0
       }],
      totalResults: 2
     }

     

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

一定期間にボットと対話したユーザー数を、異なる時間間隔で提供します。

このAPIを使用するために、アプリはボットスコープを必要とします。

POST https://{{host}}/api/public/bot/{{BotID}}/userEngagementTrend?aggregation_type={{type}}&start_date={{from}}&end_date={{to}}&channels={{channel}}

パスパラメータ

パラメータ 必須/任意 説明
ホスト 必須 環境URL(例: https://bots.kore.ai)
BotID 必須 ボットIDまたはストリームID。ボットの [一般設定] ページからアクセスすることができます。

クエリパラメータ

 

パラメータ 必須/任意 説明
filters 必須 結果セットをフィルタリングするために、以下の詳細を含むオブジェクト
start_date 必須 対象となる期間の開始時間を指します。
end_date 必須 対象となる期間の終了時間を指します。
チャネル 任意 やり取りが発生したチャネルを指します。
aggregation_type 任意 許可されるアグリゲーションのタイプを指します。考えられる値は次の通りです。

  • 毎時(デフォルト)
  • 毎日

認証

以下の構文を使用して、JWTをヘッダーに含むAPIを呼び出します。 auth: {{JWT}}

応答のコンテンツタイプ

application/json

サンプルリクエスト

curl -X POST \ 'https://{{host}}/api/public/bot/{{bot_id}}/userEngagementTrend?aggregation_type=Hourly&start_date=2020-09-01&end_date=2020-09-05&channels=rtm '\ -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ -H 'content-type: application/json'

サンプル応答

  • when aggregation_type = Daily
    { results:[ { date: "MMM DD YYYY", users: “number of users” }, { date: "MMM DD YYYY", users: “number of users” } ], totalResults: 2 }
  • when aggregation_type = Hourly or empty or not given
    { [ results:{ date:"Aug 06 2020", "0 - 1": 20, "1 - 2": 0, "2 - 3": 0, "3 - 4": 10, "4 - 5": 0, .."23 - 0": 0 }, { date:"Aug 07 2020", "0 - 1": 20, "1 - 2": 0, .."21 - 22": 0, "22 - 23": 0, "23 - 0": 0 }], totalResults: 2 }

     

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

To provide the number of users who have interacted with the bot in a given period across different time intervals.

To use this API, the app needs the Bot Scope.

POST https://{{host}}/api/public/bot/{{BotID}}/userEngagementTrend?aggregation_type={{type}}&start_date={{from}}&end_date={{to}}&channels={{channel}}

Path Parameters

Parameter Required/Optional Description
host Required Environment URL, for example, https://bots.kore.ai
BotID Required Bot ID or Stream ID. You can access it from the General Settings page of the bot.

Query Parameters

 

Parameter Required/Optional Description
filters Required Object with the following details to filter the result set
start_date Required Refers to the start time of the period to be considered.
end_date Required Refers to the end time of the period to be considered.
channel Optional Refers to the channel from which the interactions have happened.
aggregation_type Optional Refers to the type of aggregation to be allowed, possible values are:

  • Hourly (Default)
  • Daily

Authorization

Invoke the API with JWT in the header with the following syntax:

auth: {{JWT}}

Response Content Type

application/json

Sample Request

curl -X POST \
  'https://{{host}}/api/public/bot/{{bot_id}}/userEngagementTrend?aggregation_type=Hourly&start_date=2020-09-01&end_date=2020-09-05&channels=rtm '\
  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
  -H 'content-type: application/json'

Sample Response

  • when aggregation_type = Daily
    {
      results:[
         { date: "MMM DD YYYY",
           users: “number of users”
          },
         { date: "MMM DD YYYY",
           users: “number of users”
          }
         ],
      totalResults: 2
     }
  • when aggregation_type = Hourly or empty or not given
    {
     [
       results:{
           date:"Aug 06 2020",
           "0 - 1": 20,
           "1 - 2": 0,
           "2 - 3": 0,
           "3 - 4": 10,
           "4 - 5": 0,
           ..
           "23 - 0": 0
         },
             {
           date:"Aug 07 2020",
           "0 - 1": 20,
           "1 - 2": 0,
           ..
           "21 - 22": 0,
           "22 - 23": 0,
           "23 - 0": 0
       }],
      totalResults: 2
     }

     

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed