How can I retrieve all session IDs for the project using Insights query? How can I retrieve all session IDs for the project using Insights query?

How can I retrieve all session IDs for the project using Insights query?

Vonage API Support

Objective

To get all the Session IDs for the Video API project using the Insights GraphQL query. 

Applies To

  • Video API
  • Advanced Insights

Procedure

To get all the session IDs associated with the Video API project for the specified time, you can use the sessionSummaries field of the SessionData object. 

{
project(projectId: 12345678) {
sessionData {
sessionSummaries(start: "2024-05-01T00:00:00.000Z") {
resources {
sessionId
}
}
}
}
}

The response to the above query:

{
"data": {
"project": {
"sessionData": {
"sessionSummaries": {
"resources": [
{
"sessionId": "1_MX40Nzc1MDM1MX5-MTcyMjM5MzY0ODkwN35PVzY2VWRtS0tPZXhycFNwNll6d3FQNm1-fn4"
},
{
"sessionId": "1_MX40Nzc1MDM1MX5-MTcyMjM5MzY2NTQ3N35FbVRlOE1qaVZHZWhhUjYxMXdwWnlQZCt-fn4"
},
{
"sessionId": "1_MX40Nzc1MDM1MX5-MTcyMjM5NDE3NDUxMn5MajhZRll1K0NDczVpRmFEcnk3SXZ1M1J-fn4"
}
]
}
}
}
}
}

Additional Information

You can determine the session duration for all sessions by using the createdAt and destroyedAt properties of the session object. 

For sample queries to get the session duration and additional session information, please refer to our support article: How-can-I-get-information-about-multiple-sessionIds-in-one-Insights-GraphQL-query