Best Practices
- Break up large queries into multiple queries. Use pagination to split up your large queries, queries that return more than 100 resources.
- Only query for what’s needed (remember with GraphQL, you can specify exactly what data you need).
API Requests Limits
- Less than 100 requests per API key every 30 seconds
- Less than 100 requests per IP address every 30 second
Each query should contain no more than 500,000 nodes (per GraphQL limit).
Example
query {
project(projectId: API key) {
sessionData {
sessions(sessionIds: ["Session ID 1", "Session ID 2"]){
resources {
meetings(first: 10){
resources {
publishers(first: 50) {
resources {
streamStatsCollection(first: 50){
resources {
videoLatencyMs,
videoBitrateKbps,
videoPacketLoss,
videoResolution
} } } } } } } } } } }
Total Nodes | |
1 x project | = 1 project |
2 x sessions | = 2 sessions |
2 sessions x 10 meetings* | = 20 meetings |
2 session x 10 meetings* x 50 publishers* | = 1,000 publishers |
2 sessions x 10 meetings* x 50 publishers* x 50 stream statistic objects* | = 50,000 objects |
Sum | = 51,023 total nodes < 500,000 |
*Assuming there are as many nodes as specified in the query.
Exceeding the 500,000 nodes may result in the error message:
'Graphlient::Errors::GraphQLError: project sessionData: This query requires the Advanced Insights add-on'
Getting Usage for Billing
If you are looking to get usage information in order to bill your customers, you have two options: separating users by Project (Insights) or by Session (Advanced Insights).
When using Session data (Advanced Insights), the following information is available:
- Publisher / Subscriber minutes at the session / meeting / stream levels, filtered by SDK / Browser / VideoType (Screenshare / camera etc.) as well as Participant Minutes at the session and meeting levels.
At this time, archive and SIP minutes data are not available through Advanced Insights.
Advanced Insights is able to get usage at a “session” level. Each user can be mapped to a session and usage can be tracked that way.
Note that we do not provide specific SLAs related to Advanced Insights API.
Related to:
Articles in this section
- Meetings API - Migration Options
- How to use Experience Composer
- Video API (in unified environment) Trial
- Does Vonage Video API have code samples available?
- Where do I find documentation on Vonage Video API?
- Do you have any sample apps or demos for Vonage Video API?
- How can I quickly build a Video API prototype?
- How can I build a web-to-mobile interoperable app with the Video API?
- How to Access the Live Chat with Support Agent
- How can I build a multi-party conferencing app?