Skip to content

List CDR legs (partition-wide)

GET
/v1/pt/{ptid}/cdrs/legs
curl --request GET \
--url https://example.com/v1/pt/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cdrs/legs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "call_ulid": "example", "leg_uuid": "example", "leg_role": "example", "node_id": "example", "direction": "example", "sip_source_user": "example", "sip_source_realm": "example", "sip_source_addr": "example", "sip_dialed_user": "example", "sip_dialed_realm": "example", "sip_dialed_addr": "example", "codec": "example", "resource_type": "example", "resource_id": "example", "route_trunk": "example", "dialed_before": "example", "dialed_after": "example", "callerid_name": "example", "callerid_number": "example", "pai": "example", "attestation": "example", "sip_call_id": "example", "sip_identity": "example", "disposition": "example", "hangup_originator": "example" }'

Returns leg rows across every namespace the partition owns, in the [from, to] window. CSV is selected with the Accept: text/csv request header (JSON is the default); there is no format query parameter. Rows may be substring-filtered via the CdrLegFilter fields, supplied as query parameters and/or a JSON body.

ptid
required
string format: uuid

Partition UUID

from
string format: date-time
to
string format: date-time
filter

Per-field substring filter for the /legs listing, supplied as individual query parameters named for the leg columns (e.g. ?direction=inbound&sip_source_user=1509). All are AND-matched case-insensitively. The same fields may instead (or additionally) be sent as a JSON request body; a query value wins over a body value for the same field. See the CdrLegFilter schema for the full field list.

Substring filter for the flat /legs listing. Every field set is AND-matched case-insensitively against the corresponding leg column; omit a field to leave it unconstrained. The same object may be supplied two ways: as query-string parameters (?direction=inbound&codec=ulaw) or as a JSON request body. When a field appears in both, the query value wins.

object
call_ulid
string
leg_uuid
string
leg_role
string
node_id
string
direction
string
sip_source_user
string
sip_source_realm
string
sip_source_addr
string
sip_dialed_user
string
sip_dialed_realm
string
sip_dialed_addr
string
codec
string
resource_type
string
resource_id
string
route_trunk
string
dialed_before
string
dialed_after
string
callerid_name
string
callerid_number
string
pai
string
attestation
string
sip_call_id
string
sip_identity
string
disposition
string
hangup_originator
string
cursor
string

Opaque pagination cursor from previous page’s next_cursor

limit
integer

Maximum items to return

Optional substring filter as a JSON object (alternative to the query parameters). Query values win over body values for the same field.

Media typeapplication/json

Substring filter for the flat /legs listing. Every field set is AND-matched case-insensitively against the corresponding leg column; omit a field to leave it unconstrained. The same object may be supplied two ways: as query-string parameters (?direction=inbound&codec=ulaw) or as a JSON request body. When a field appears in both, the query value wins.

object
call_ulid
string
leg_uuid
string
leg_role
string
node_id
string
direction
string
sip_source_user
string
sip_source_realm
string
sip_source_addr
string
sip_dialed_user
string
sip_dialed_realm
string
sip_dialed_addr
string
codec
string
resource_type
string
resource_id
string
route_trunk
string
dialed_before
string
dialed_after
string
callerid_name
string
callerid_number
string
pai
string
attestation
string
sip_call_id
string
sip_identity
string
disposition
string
hangup_originator
string
Examplegenerated
{
"call_ulid": "example",
"leg_uuid": "example",
"leg_role": "example",
"node_id": "example",
"direction": "example",
"sip_source_user": "example",
"sip_source_realm": "example",
"sip_source_addr": "example",
"sip_dialed_user": "example",
"sip_dialed_realm": "example",
"sip_dialed_addr": "example",
"codec": "example",
"resource_type": "example",
"resource_id": "example",
"route_trunk": "example",
"dialed_before": "example",
"dialed_after": "example",
"callerid_name": "example",
"callerid_number": "example",
"pai": "example",
"attestation": "example",
"sip_call_id": "example",
"sip_identity": "example",
"disposition": "example",
"hangup_originator": "example"
}

OK. Response body is JSON by default, or CSV when the request sent Accept: text/csv.

object
success
required
boolean
legs
required
Array<object>
object
call_ulid
required
string
leg_uuid
required
string
parent_leg_uuid
string
leg_role
string
node_id
string
nsid
required
string
partition_id
string
direction
string
sip_source_user
string
sip_source_realm
string
sip_source_addr
string
sip_dialed_user
string
sip_dialed_realm
string
sip_dialed_addr
string
codec
string
resource_type
string
resource_id
string
route_trunk
string
dialed_before
string
dialed_after
string
callerid_name
string
callerid_number
string
pai
string
attestation
string
sip_call_id
string
sip_identity
string
event_start
string format: date-time
event_end
string format: date-time
answer_start
string format: date-time
billing_start
string format: date-time
ringing_start_time
string format: date-time
billable_ms
required
integer format: int64
total_ms
required
integer format: int64
disposition
string
q850_cause
integer
hangup_originator
string
answered
required
boolean
completed
required
boolean
cdr_schema_version
integer
rtp_rx_loss
integer format: int64
rtp_tx_loss
integer format: int64
rtp_rx_jitter
number format: double
rtp_tx_jitter
number format: double
rtp_rtt
number format: double
rtp_rx_mes
number format: double
rtp_tx_mes
number format: double
rtp_rx_count
integer format: int64
rtp_tx_count
integer format: int64
rtp_stats
string
number_info

JSON call-detail (NumberInfo) enrichment collected when a modify block set collect-numberinfo.

string
next_cursor
string
Examplegenerated
{
"success": true,
"legs": [
{
"call_ulid": "example",
"leg_uuid": "example",
"parent_leg_uuid": "example",
"leg_role": "example",
"node_id": "example",
"nsid": "example",
"partition_id": "example",
"direction": "example",
"sip_source_user": "example",
"sip_source_realm": "example",
"sip_source_addr": "example",
"sip_dialed_user": "example",
"sip_dialed_realm": "example",
"sip_dialed_addr": "example",
"codec": "example",
"resource_type": "example",
"resource_id": "example",
"route_trunk": "example",
"dialed_before": "example",
"dialed_after": "example",
"callerid_name": "example",
"callerid_number": "example",
"pai": "example",
"attestation": "example",
"sip_call_id": "example",
"sip_identity": "example",
"event_start": "2026-04-15T12:00:00Z",
"event_end": "2026-04-15T12:00:00Z",
"answer_start": "2026-04-15T12:00:00Z",
"billing_start": "2026-04-15T12:00:00Z",
"ringing_start_time": "2026-04-15T12:00:00Z",
"billable_ms": 1,
"total_ms": 1,
"disposition": "example",
"q850_cause": 1,
"hangup_originator": "example",
"answered": true,
"completed": true,
"cdr_schema_version": 1,
"rtp_rx_loss": 1,
"rtp_tx_loss": 1,
"rtp_rx_jitter": 1,
"rtp_tx_jitter": 1,
"rtp_rtt": 1,
"rtp_rx_mes": 1,
"rtp_tx_mes": 1,
"rtp_rx_count": 1,
"rtp_tx_count": 1,
"rtp_stats": "example",
"number_info": "example"
}
],
"next_cursor": "example"
}

Error response

Media typeapplication/problem+json

RFC 7807 Problem Details

object
type

Problem type slug URI

string
title
string
status
integer
detail
string
key
additional properties
any
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}