문서

TicketsX를 더 빠르게 익히세요

설정 안내, 전체 명령어 목록, Premium 기능, REST API를 한곳에 모았습니다.

13.18

대화 기록 조회

GET/<guild_id>/api/transcripts/<ticket_id>

티켓 ID로 닫힌 티켓의 대화 기록 전체를 가져옵니다. 메타데이터(개설자, 패널, 평가, 닫은 사유, 담당자, 시각), 시간 순서대로 정리된 모든 메시지, 참여자별 메시지 통계가 들어 있습니다. 티켓은 **대화 기록 검색**으로 먼저 찾거나, **대화 기록 HTML 조회**로 화면에 보이는 보관본을 받으세요. `view_transcripts` 권한이 필요합니다(기본값은 꺼짐).

질의 매개변수

이름형식필수설명
limitnumber
선택
한 페이지의 메시지 수, 1~1000(기본값 500).
offsetnumber
선택
페이지를 넘기려고 건너뛸 메시지 수(기본값 0).

messagesparticipants 내용은 대화 기록 색인에서 옵니다. 색인은 서버에 프리미엄이 있는 동안 만들어지고, 처음 업그레이드할 때 기존 보관본까지 채워집니다. 업그레이드 전에 닫혔거나 채우기가 아직 진행 중인 티켓은 indexed: false와 빈 messages 배열로 돌아옵니다. 그런 티켓은 대화 기록 HTML 조회transcript.TranscriptUrl로 확인하세요. 대화가 긴 티켓은 pagination 객체로 페이지를 넘기면 됩니다.

요청 예시
curl -X GET \
  -H "Authorization: Bearer <API_TOKEN>" \
  "https://api.ticketsx.xyz/<guild_id>/api/transcripts/<ticket_id>?limit=500"
응답 예시
{
  "transcript": {
    "TicketId": 42,
    "PanelId": 1,
    "PanelName": "Support",
    "AuthorId": "123456789",
    "AuthorUsername": "jane",
    "Rating": 5,
    "RatingCount": 1,
    "CloseReason": "Resolved",
    "CreatedAt": 1732200000,
    "ClosedAt": 1732210000,
    "ClosedBy": "987654321",
    "ClaimedIds": ["987654321"],
    "TranscriptUrl": "https://tickets.example.com/<guild_id>/transcripts/42"
  },
  "indexed": true,
  "messages": [
    { "MessageId": "111", "AuthorId": "123456789", "AuthorUsername": "jane", "IsBot": false, "Content": "My login is broken", "CreatedAt": 1732200050 },
    { "MessageId": "112", "AuthorId": "987654321", "AuthorUsername": "staff", "IsBot": false, "Content": "Looking into it now!", "CreatedAt": 1732200110 }
  ],
  "participants": [
    { "UserId": "123456789", "Username": "jane", "IsBot": false, "MessageCount": 12, "FirstMessageAt": 1732200050, "LastMessageAt": 1732209900 }
  ],
  "pagination": { "total": 2, "limit": 500, "offset": 0, "returned": 2 }
}