Conversations

Conversation related APIs

利用履歴の会話を取得

get

会話リストを取得します。会話はデフォルトで最後のチャット時間を基準に降順で並べ替えられています。

Authorizations
Query parameters
userIdsany ofOptional
or
nullOptional
llmAppIdany ofOptional
stringOptional
or
nullOptional
categoryIdany ofOptional
stringOptional
or
nullOptional
startedAtany ofOptional

Search for last chat time after this value

numberOptional
or
nullOptional
endAtany ofOptional

Search for last chat time before this value

numberOptional
or
nullOptional
firstChatStartedAtany ofOptional

Search for first chat time after this value

numberOptional
or
nullOptional
firstChatEndAtany ofOptional

Search for first chat time before this value

numberOptional
or
nullOptional
searchTermany ofOptional
stringOptional
or
nullOptional
cursorany ofOptional
stringOptional
or
nullOptional
variablesany ofOptional
string[]Optional
or
nullOptional
pageSizeinteger · min: 1 · max: 50OptionalDefault: 50
activeOnlybooleanOptionalDefault: false
orderall ofOptionalDefault: LAST_CHAT_TIME_DESC
string · enumOptionalPossible values:
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

application/json
get
GET /webapi/v2/conversations HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

OK

{
  "conversations": [
    {
      "id": "text",
      "title": "text",
      "user": {
        "userId": "text",
        "firstName": "text",
        "lastName": "text"
      },
      "createdAt": 1,
      "lastChatTime": 1,
      "isEnd": true,
      "categories": [
        "text"
      ],
      "memo": "text",
      "chats": [
        {
          "id": "text",
          "sender": "USER",
          "message": "text",
          "timestamp": 1,
          "citations": [
            {
              "clueId": "text",
              "source": "text",
              "title": "text",
              "knowledgeBaseId": "text",
              "pageNo": 1,
              "url": "text",
              "text": "text"
            }
          ],
          "rating": true,
          "agentRating": true
        }
      ],
      "chatCount": 1,
      "llmApp": {
        "id": "text",
        "name": "text",
        "description": "text"
      },
      "variables": {}
    }
  ],
  "cursor": "text"
}

会話を更新する

post
Authorizations
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
userIdsany ofOptional

フィルタリング対象のユーザーID

string[]Optional
or
nullOptional
llmAppIdsany ofOptional

フィルタリング対象のllmアプリID

string[]Optional
or
nullOptional
categoryIdsany ofOptional

フィルタリング対象のの会話カテゴリID

string[]Optional
or
nullOptional
conversationIdsany ofOptional

フィルタリング対象の会話ID

string[]Optional
or
nullOptional
Responses
200

正常に更新されました。

post
POST /webapi/v2/conversations/bulk_update HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 181

{
  "userIds": [
    "text"
  ],
  "llmAppIds": [
    "text"
  ],
  "categoryIds": [
    "text"
  ],
  "conversationIds": [
    "text"
  ],
  "conversationInfo": {
    "state": "no",
    "assignee": "text",
    "categoryIds": [
      "text"
    ],
    "title": "text"
  }
}
200

正常に更新されました。

No content

IDで会話を取得

get

会話を取得します。

会話で提供されるチャットは、最新の20件です。

Authorizations
Path parameters
conversation_idstringRequired
Query parameters
variablesany ofOptional

Comma separated list of variables to include in the response

string[]Optional
or
nullOptional
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

正常に取得しました。

application/json
get
GET /webapi/v2/conversations/{conversation_id} HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

正常に取得しました。

{
  "id": "text",
  "title": "text",
  "user": {
    "userId": "text",
    "firstName": "text",
    "lastName": "text"
  },
  "createdAt": 1,
  "lastChatTime": 1,
  "isEnd": true,
  "categories": [
    "text"
  ],
  "memo": "text",
  "chats": [
    {
      "id": "text",
      "sender": "USER",
      "message": "text",
      "timestamp": 1,
      "citations": [
        {
          "clueId": "text",
          "source": "text",
          "title": "text",
          "knowledgeBaseId": "text",
          "pageNo": 1,
          "url": "text",
          "text": "text"
        }
      ],
      "rating": true,
      "agentRating": true
    }
  ],
  "chatCount": 1,
  "llmApp": {
    "id": "text",
    "name": "text",
    "description": "text"
  },
  "variables": {}
}

会話を設定

patch
Authorizations
Path parameters
conversation_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
stateany ofOptional

会話の状態

string · enumOptionalPossible values:
or
nullOptional
assigneeany ofOptional

会話の担当者

stringOptional
or
nullOptional
categoryIdsany ofOptional

カテゴリのID

string[]Optional
or
nullOptional
titleany ofOptional

会話のタイトル

stringOptional
or
nullOptional
Responses
200

正常に設定されました。

application/json
patch
PATCH /webapi/v2/conversations/{conversation_id} HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 70

{
  "state": "no",
  "assignee": "text",
  "categoryIds": [
    "text"
  ],
  "title": "text"
}
200

正常に設定されました。

{
  "id": "text",
  "title": "text",
  "user": {
    "userId": "text",
    "firstName": "text",
    "lastName": "text"
  },
  "createdAt": 1,
  "lastChatTime": 1,
  "isEnd": true,
  "categories": [
    "text"
  ],
  "memo": "text",
  "chats": [
    {
      "id": "text",
      "sender": "USER",
      "message": "text",
      "timestamp": 1,
      "citations": [
        {
          "clueId": "text",
          "source": "text",
          "title": "text",
          "knowledgeBaseId": "text",
          "pageNo": 1,
          "url": "text",
          "text": "text"
        }
      ],
      "rating": true,
      "agentRating": true
    }
  ],
  "chatCount": 1,
  "llmApp": {
    "id": "text",
    "name": "text",
    "description": "text"
  },
  "variables": {}
}

会話内のチャットの一覧を取得する

get

会話内のチャットの一覧を取得します。チャットはタイムスタンプによって昇順に並べ替えられています。

チャットページのサイズは100です。

Authorizations
Path parameters
conversation_idstringRequired
Query parameters
pageNointeger · min: 1OptionalDefault: 1
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

成功

application/json
get
GET /webapi/v2/conversations/{conversation_id}/chats HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

成功

{
  "chats": [
    {
      "id": "text",
      "sender": "USER",
      "message": "text",
      "timestamp": 1,
      "citations": [
        {
          "clueId": "text",
          "source": "text",
          "title": "text",
          "knowledgeBaseId": "text",
          "pageNo": 1,
          "url": "text",
          "text": "text"
        }
      ],
      "rating": true,
      "agentRating": true
    }
  ],
  "pageNo": 1,
  "totalCount": 1
}

IDで会話の状態を取得します

get
Authorizations
Path parameters
conversation_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

正常に取得しました。

application/json
get
GET /webapi/v2/conversations/{conversation_id}/running HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

正常に取得しました。

{
  "isRunning": true
}

Stop Conversation

post

Stop a running conversation.

Authorizations
Path parameters
conversation_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

post
POST /webapi/v2/conversations/{conversation_id}/stop HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

OK

No content

IDで会話チャットを削除

delete
Authorizations
Path parameters
conversation_idstringRequired
chat_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Responses
200

OK

delete
DELETE /webapi/v2/conversations/{conversation_id}/chats/{chat_id} HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Accept: */*
200

OK

No content

会話のタイトルを更新

put

会話のタイトルを設定する

Authorizations
Path parameters
conversation_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
titlestringRequired

会話のタイトル。

Responses
200

OK

application/json
put
PUT /webapi/v2/conversations/{conversation_id}/title HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "title": "text"
}
200

OK

{
  "id": "text",
  "title": "text",
  "user": {
    "userId": "text",
    "firstName": "text",
    "lastName": "text"
  },
  "createdAt": 1,
  "lastChatTime": 1,
  "isEnd": true,
  "categories": [
    "text"
  ],
  "memo": "text",
  "chats": [
    {
      "id": "text",
      "sender": "USER",
      "message": "text",
      "timestamp": 1,
      "citations": [
        {
          "clueId": "text",
          "source": "text",
          "title": "text",
          "knowledgeBaseId": "text",
          "pageNo": 1,
          "url": "text",
          "text": "text"
        }
      ],
      "rating": true,
      "agentRating": true
    }
  ],
  "chatCount": 1,
  "llmApp": {
    "id": "text",
    "name": "text",
    "description": "text"
  },
  "variables": {}
}

フィードバックを投稿する

post
Authorizations
Path parameters
conversation_idstringRequired
chat_idstringRequired
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
ratingany ofOptional

チャットの評価

booleanOptional
or
nullOptional
feedbackSelectionany ofOptional

フィードバック選択

or
nullOptional
suggestedAnswerany ofOptional

提案された回答

stringOptional
or
nullOptional
Responses
200

OK

application/json
post
POST /webapi/v2/conversations/{conversation_id}/chats/{chat_id}/feedback HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "rating": true,
  "feedbackSelection": [
    "not_relevant"
  ],
  "suggestedAnswer": "text"
}
200

OK

{
  "conversationId": "text",
  "chatId": "text",
  "rating": true
}

毎日の会話数

get

指定した範囲の1日あたりの会話の総数

Authorizations
Header parameters
AGENT-EMAILstringOptional

Optional: Email of the agent to use for this request

USER-EMAILstringOptional

Optional: Email address to associate with the user

OWN-USER-IDstringOptional

Optional: User ID to identify or create a user

Body
startDatestringOptional

開始日をYYYY-MM-DD形式で範囲指定します。

endDatestringOptional

End of range of dates to query in YYYY-MM-DD format.

Responses
200

OK

application/json
get
GET /webapi/conversation_daily_count HTTP/1.1
Host: backend-ja.alli.ai
API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "startDate": "text",
  "endDate": "text"
}
200

OK

{
  "result": {
    "dailyTotalCount": [
      {
        "date": "text",
        "activeCount": 1
      }
    ],
    "state": "text",
    "campaignCount": 1
  },
  "errors": {}
}

Was this helpful?