Skip to content
Start here

Fetch details of peer

realtime_kit.sessions.get_participant_data_from_peer_id(strpeer_id, SessionGetParticipantDataFromPeerIDParams**kwargs) -> SessionGetParticipantDataFromPeerIDResponse
GET/accounts/{account_id}/realtime/kit/{app_id}/sessions/peer-report/{peer_id}

Returns details of the given peer ID along with call statistics for the given session ID.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Realtime AdminRealtime
ParametersExpand Collapse
account_id: str

The account identifier tag.

maxLength32
app_id: str

The app identifier tag.

maxLength32
peer_id: str
formatuuid
filters: Optional[Literal["device_info", "ip_information", "precall_network_information", 2 more]]

Comma separated list of filters to apply. Note that there must be no spaces between the filters.

One of the following:
"device_info"
"ip_information"
"precall_network_information"
"events"
"quality_stats"
ReturnsExpand Collapse
class SessionGetParticipantDataFromPeerIDResponse:
data: Optional[Data]
id: Optional[str]

Participant ID. This maps to the corresponding peerId.

created_at: Optional[str]

timestamp when this participant was created.

custom_participant_id: Optional[str]

ID passed by client to create this participant.

display_name: Optional[str]

Display name of participant when joining the session.

duration: Optional[float]

number of minutes for which the participant was in the session.

joined_at: Optional[str]

timestamp at which participant joined the session.

left_at: Optional[str]

timestamp at which participant left the session.

peer_events: Optional[List[Dict[str, object]]]
peer_report: Optional[DataPeerReport]

Peer call statistics report.

metadata: Optional[Dict[str, object]]
quality: Optional[Dict[str, object]]
preset_name: Optional[str]

Name of the preset associated with the participant.

session_id: Optional[str]
formatuuid
updated_at: Optional[str]

timestamp when this participant’s data was last updated.

user_id: Optional[str]

User id for this participant.

success: Optional[bool]

Fetch details of peer

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
response = client.realtime_kit.sessions.get_participant_data_from_peer_id(
    peer_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
    app_id="app_id",
)
print(response.data)
{
  "data": {
    "id": "id",
    "created_at": "created_at",
    "custom_participant_id": "custom_participant_id",
    "display_name": "display_name",
    "duration": 0,
    "joined_at": "joined_at",
    "left_at": "left_at",
    "peer_events": [
      {
        "foo": "bar"
      }
    ],
    "peer_report": {
      "metadata": {
        "foo": "bar"
      },
      "quality": {
        "foo": "bar"
      }
    },
    "preset_name": "preset_name",
    "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "updated_at": "updated_at",
    "user_id": "user_id"
  },
  "success": true
}
Returns Examples
{
  "data": {
    "id": "id",
    "created_at": "created_at",
    "custom_participant_id": "custom_participant_id",
    "display_name": "display_name",
    "duration": 0,
    "joined_at": "joined_at",
    "left_at": "left_at",
    "peer_events": [
      {
        "foo": "bar"
      }
    ],
    "peer_report": {
      "metadata": {
        "foo": "bar"
      },
      "quality": {
        "foo": "bar"
      }
    },
    "preset_name": "preset_name",
    "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "updated_at": "updated_at",
    "user_id": "user_id"
  },
  "success": true
}