[!Note] This repo is only one part of the bigger peer metrics WebRTC monitoring service. Check out the full project here.
This folder contains code for the API server used to ingest the metrics sent by the SDK.
This is a public API endpoint that has two functions:
web
In addition to this, the api has the django admin interface to check the raw data collected.
To run this locally check the main project page.
The main models from this project are:
An organization is pretty much a way to group apps
Used to group conferences.
The main model for data collection. Used to group: events, sessions and participants
A conference is pretty much a call between participants. A user is encouraged to not reuse conferece_id
s.
A persona who takes part in a call/conference. You could say this is a user's user.
A session is the presence of a participants in a conference. He can have multiple sessions if he joins multiple times.
This model represents all the events that we save during a call. We differentiate between them by the category
attribute.
We can group the routes into 2 categories: public (used by the SDK) and private (used accounts to query data for the charts).
/initialize
: first endpoint hit by SDK. checks that it has a valid api_key
, etc. returns the token
POST
/events/get-user-media
: gUM events
POST
/events/browser
: browser events: unload, page visibility, etc
POST
/connection
: connection events: sdp, ice, peer events
POST
/connection/batch
: same as previous but accepts batched requests
POST
/stats
: receiving webrtc stats
POST
/sessions
: used to create a participant sessions
POST
: create a new sessionPUT
: update a participant's session/sessions
: used to get participant sessions
GET
, arguments:conferenceId
participantId
appId
/sessions/<uuid:pk>
: get a specific session
GET
/organizations
: used to get a user's organizations
POST
/organizations/<uuid:pk>
: get a specific org
GET
PUT
DELETE
/apps
: get a user's apps
POST
/apps/<uuid:pk>
GET
PUT
DELETE
/conferences
GET
, argumentsappId
participantId
/conferences/<uuid:pk>
GET
/conferences/<uuid:pk>/events
GET
- return all events for a conference?type=stats
/participants
GET
, argumentsappId
/participants/<uuid:pk>
GET
/search
GET
, argumentsquery