Nhóm API truy vấn nhật ký cuộc gọi (CDR – Call Detail Record): tìm kiếm danh sách cuộc gọi theo khoảng thời gian và xem chi tiết một cuộc gọi cụ thể (bao gồm recording_url và transcript).
Header | Giá trị | Mô tả |
|---|---|---|
|
| API key của tenant |
|
| JWT token sau khi đăng nhập |
|
| Bắt buộc với request có body (POST) |
Lấy API key: Liên hệ Alohub để được cấp API key cho tenant.
https://app.alohub.vn:9909/api/report/call-logsLấy danh sách nhật ký cuộc gọi trong khoảng thời gian chỉ định, có phân trang.
{
"callStartTime": "2025-04-13T00:00:00+07:00",
"callEndtime": "2026-04-13T23:59:59+07:00",
"page": 1,
"limit": 50
}Field | Kiểu | Bắt buộc | Mô tả |
|---|---|---|---|
| string | Có | Thời điểm bắt đầu (ISO 8601 với timezone). VD: |
| string | Có | Thời điểm kết thúc (ISO 8601 với timezone) |
| Có | number | Trang hiện tại (bắt đầu từ 1) |
| Có | number | Số record mỗi trang |
Lưu ý: Tên field là
callEndtime(không phảicallEndTime) — chú ý chữ thường chữ hoa theo đúng spec backend.
curl --location 'https://app.alohub.vn:9909/api/report/call-logs' \
--header 'Accept: application/json, text/plain, */*' \
--header 'Authorization: <api_key>' \
--header 'X-ACCESS-TOKEN: <jwt_token>' \
--header 'Content-Type: application/json' \
--header 'X-Requested-With: XMLHttpRequest' \
--data '{
"callStartTime": "2025-04-13T00:00:00+07:00",
"callEndtime": "2026-04-13T23:59:59+07:00",
"page": 1,
"limit": 50
}'const axios = require('axios')
const response = await axios.post(
'https://app.alohub.vn:9909/api/report/call-logs',
{
callStartTime: '2025-04-13T00:00:00+07:00',
callEndtime: '2026-04-13T23:59:59+07:00',
page: 1,
limit: 50
},
{
headers: {
'Accept': 'application/json, text/plain, */*',
'Authorization': '<api_key>',
'X-ACCESS-TOKEN': '<jwt_token>',
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest'
}
}
)
console.log(response.data)import requests
response = requests.post(
'https://app.alohub.vn:9909/api/report/call-logs',
json={
'callStartTime': '2025-04-13T00:00:00+07:00',
'callEndtime': '2026-04-13T23:59:59+07:00',
'page': 1,
'limit': 50
},
headers={
'Accept': 'application/json, text/plain, */*',
'Authorization': '',
'X-ACCESS-TOKEN': '',
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest'
}
)
print(response.json())https://app.alohub.vn:9909/api/report/call-logs/{call_id}Lấy thông tin chi tiết của một cuộc gọi cụ thể bao gồm recording_url và transcript (nếu có).
Tham số | Bắt buộc | Kiểu | Mô tả |
|---|---|---|---|
| Có | string | Mã định danh cuộc gọi, định dạng: |
curl --location 'https://app.alohub.vn:9909/api/report/call-logs/20260121095227-IMCRRNJW-342' \
--header 'Accept: application/json, text/plain, */*' \
--header 'Authorization: <api_key>' \
--header 'X-ACCESS-TOKEN: <jwt_token>' \
--header 'X-Requested-With: XMLHttpRequest'const axios = require('axios')
const callId = '20260121095227-IMCRRNJW-342'
const response = await axios.get(
`https://app.alohub.vn:9909/api/report/call-logs/${callId}`,
{
headers: {
'Accept': 'application/json, text/plain, */*',
'Authorization': '<api_key>',
'X-ACCESS-TOKEN': '<jwt_token>',
'X-Requested-With': 'XMLHttpRequest'
}
}
)
console.log(response.data)import requests
call_id = '20260121095227-IMCRRNJW-342'
response = requests.get(
f'https://app.alohub.vn:9909/api/report/call-logs/{call_id}',
headers={
'Accept': 'application/json, text/plain, */*',
'Authorization': '',
'X-ACCESS-TOKEN': '',
'X-Requested-With': 'XMLHttpRequest'
}
)
print(response.json())Lưu ý:
call_idlấy từ response của API danh sách cuộc gọi (mục 1). Định dạng ID là chuỗi gồm: timestamp + random chars + extension/session id.