콘텐츠로 이동

서비스 이용내역 조회

Endpoint

[POST] API URL 정보

https://patch-bnd.happytalk.io/user/api/service-history
https://bnd.happytalk.io/user/api/service-history

Request (Json)

None

Body

Field Name Type (Length) Required Description Default
token String Y 고객사 토큰
start_date String Y 검색 시작 일시 (Y-m-d H:i:s)
end_date String Y 검색 종료 일시 (Y-m-d H:i:s)
format format N 응답 포맷 (raw / siem). raw=원본 객체 배열(로그인 포함), siem=SIEM 문자열 배열(로그인 제외, msg 포함) siem

조회시 주의사항

최대 조회기간은 하루입니다. (start_date 와 end_date 의 간격은 24시간 미만이어야 합니다.)

Example

REST API Sample
curl --location --request POST 'https://patch-bnd.happytalk.io/user/api/service-history' \
--header 'Content-Type: application/json' \
--data-raw '{
    "token" : "고객사 토큰",
    "start_date" : "2026-06-02 00:00:00",
    "end_date" : "2026-06-02 23:59:59",
    "format" : "siem"
}'
curl --location --request POST 'https://bnd.happytalk.io/user/api/service-history' \
--header 'Content-Type: application/json' \
--data-raw '{
    "token" : "고객사 토큰",
    "start_date" : "2026-06-02 00:00:00",
    "end_date" : "2026-06-02 23:59:59",
    "format" : "siem"
}'

Response (Json)

응답 해석 안내

format 값에 따라 data 의 형태가 달라집니다.
- raw : 기간 내 모든 이용내역(로그인 행 포함)을 원본 JSON 객체 배열로 반환합니다.
- siem : 로그인 행(apply_content='로그인')을 제외하고, 이벤트명을 영문 변환한 SIEM 문자열 배열(끝에 msg 포함)로 반환합니다.
format 을 생략하면 siem 으로 동작합니다. 로그인 이력만 조회하려면 로그인 이용내역 조회 API 를 사용하세요.

Parameter

Field Name Type Description
result String success : 성공 , fail : 실패
data Array format=raw : 이용내역 객체 배열 / format=siem : SIEM 문자열 배열

참고 사항

raw 포맷의 data 는 세부 내용에 대한 Depth가 있는 관계로 Data Dictionary에 정의하였습니다.
"이용내역 객체 배열" 링크를 클릭하시면 이동됩니다.

Example

format=raw (원본 객체 배열)
{
  "result": "success",
  "data": [
    {
      "id": "146708",
      "type": "A",
      "kind": "S",
      "request_user": "test-lc",
      "request_content": "상담분류 변경 [628f30f25ecb0kr2t2PdFgGn030HL2번방] - 상품문의(샘플)>일반상담(샘플) → 상품문의(샘플)>불만접수(샘플)",
      "request_date": "2026-06-02 17:14:28",
      "apply_id": "37197",
      "apply_content": "성공",
      "apply_date": "2026-06-02 17:14:28"
    },
    {
      "id": "146665",
      "type": "A",
      "kind": "S",
      "request_user": "test-lc",
      "request_content": "[WEB] test-lc(37197)상담원 로그인. IP - (IP정보)",
      "request_date": "2026-06-02 16:35:41",
      "apply_id": "37197",
      "apply_content": "로그인",
      "apply_date": "2026-06-02 16:35:41"
    }
  ]
}
format=siem (SIEM 문자열 배열, 로그인 행 제외)
{
  "result": "success",
  "data": [
    "Jun 02 2026 17:14:28.000 KST,Event_name=ConsultCategory,Result=Succeeded,user=test-lc,clientip=192.168.1.100,msg=상담분류 변경 [628f30f25ecb0kr2t2PdFgGn030HL2번방] - 상품문의(샘플)>일반상담(샘플) → 상품문의(샘플)>불만접수(샘플)"
  ]
}
Failure

Fail Code 정보

Data Dictionary

Data Dictionary
Type Description
raw 기간 내 모든 이용내역(로그인 포함) 원본 JSON 객체 배열
siem 로그인 행 제외 후 SIEM 문자열 배열(msg 포함). 미입력 시 기본값
Field Name Type Description
id String 이용내역 고유 ID
type String 이용내역 구분
kind String 이용내역 종류
request_user String 이벤트 발생자
request_content String 이벤트 내용
request_date String 이벤트 발생 일시
apply_id String 적용 ID
apply_content String 적용 내용
apply_date String 적용 일시

SIEM 문자열은 , 로 구분된 key=value 형태이며, 한 줄이 하나의 이용내역입니다.
형식: {발생일시},Event_name={이벤트명},Result=Succeeded,user={발생자},clientip={IP},msg={이벤트 내용}

Segment Description
(발생일시) Mon DD YYYY HH:mm:ss.000 KST 형식의 이벤트 발생 일시
Event_name 이벤트명 (영문 변환된 값)
Result 처리 결과. 항상 Succeeded 고정
user 이벤트 발생자 (request_user)
clientip 해당 사용자의 마지막 로그인 IP. 로그인 이력이 없으면 127.0.0.1
msg 이벤트 내용 (request_content)
Type Description
M 수동
A 자동
Type Description
A 아카이브
K 키 발급
S 매니저 액션