AI 대화 조회

지정한 AI 대화의 상세 정보를 조회합니다. 응답에는 대화의 메타데이터와 함께 최근 채팅 메시지 최대 10건이 포함됩니다. 사용자는 자신이 소유한 대화만 조회할 수 있습니다.

필요 권한

사용자 이상의 계정으로 이용할 수 있습니다.

HTTP 요청

GET /api/sonar/ai/conversations/:guid
cURL 예시
curl -H "Authorization: Bearer <API_KEY>" \
     https://HOSTNAME/api/sonar/ai/conversations/a1b2c3d4-e5f6-7890-abcd-ef1234567890
요청 매개변수
경로 매개변수
타입설명비고
guid문자열대화 GUID36자

정상 응답

{
  "conversation": {
    "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "owner_guid": "11111111-2222-3333-4444-555555555555",
    "owner_name": "alice",
    "title": "이상 트래픽 조사",
    "is_custom_title": true,
    "llm_model": "gpt-4o",
    "created": "2024-09-15 14:30:00+0900",
    "updated": "2024-09-15 15:00:00+0900",
    "chats": [
      {
        "guid": "c1d2e3f4-1234-5678-9abc-def012345678",
        "conversation_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "category": "AUTO",
        "question": "최근 1시간 동안 차단된 IP를 알려줘",
        "tasks": [
          {
            "chat_guid": "c1d2e3f4-1234-5678-9abc-def012345678",
            "idx": 0,
            "content": "차단 이력 조회",
            "category": "PLAN",
            "status": "COMPLETED"
          }
        ],
        "created": "2024-09-15 14:30:05+0900",
        "updated": "2024-09-15 14:30:30+0900"
      }
    ]
  }
}
  • conversation (맵): AI 대화 상세 정보
    • guid (문자열): 대화 GUID
    • owner_guid (문자열): 대화 소유자 계정 GUID
    • owner_name (문자열): 대화 소유자 계정 이름
    • title (문자열): 대화 제목
    • is_custom_title (불리언): 사용자가 제목을 직접 지정했는지 여부
    • llm_model (문자열): 사용된 LLM 모델 식별자
    • created (문자열): 대화 생성 시각
    • updated (문자열): 대화 수정 시각
    • chats (배열): 최근 채팅 메시지 (최대 10건)
      • guid (문자열): 채팅 GUID
      • conversation_guid (문자열): 소속 대화 GUID
      • category (문자열): 채팅 카테고리 (AUTO, PLAN, ACTION, QNA 등)
      • question (문자열): 사용자 질문
      • tasks (배열): 태스크 목록 (자세한 구조는 채팅 목록 조회 응답 참조)
      • created (문자열): 채팅 생성 시각
      • updated (문자열): 채팅 수정 시각

오류 응답

guid가 누락된 경우

HTTP 상태 코드 400 응답

{
  "error_code": "null-argument",
  "error_msg": "guid should be not null"
}
guid가 GUID 형식이 아닌 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-param-type",
  "error_msg": "guid should be guid type."
}
대화가 존재하지 않거나 소유자가 아닌 경우

HTTP 상태 코드 500 응답

{
  "error_code": "illegal-state",
  "error_msg": "cannot get conversation"
}
권한이 없는 경우

HTTP 상태 코드 500 응답

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}