GraphQL API
Glomex provides a flexible GraphQL API that allows programmatic access to analytics data.
The current endpoint and GraphQL playground can be accessed at https://graphql.glomex.com/v1 . The playground is a web UI where you can view documentation and try queries without any additional setup.
Usage Policy
- The GraphQL API is a backend service that can be connected to any customer’s middleware or backoffice systems. Direct access by end user applications (e.g., apps, player, etc.) is not allowed.
Authorization
All requests to the GraphQL API must include a JWT access token provided in headers in the form:
Authorization: Bearer <access_token>
There is a mutation called createSession
that let’s you use your exchange credentials to obtain a JWT token:
mutation CreateSession {
createSession(
login: "your@exchange.login",
password: "exchangePassword",
tenantId: "t-yourTenantId"
) {
... on Session {
access_token
}
... on SessionChallenge {
challenge_session
}
}
}
The tenantId
can be obtained from your account manager.
If you have set up MFA, you will receive a SessionChallenge
response instead.
Pass the challenge string and a code from your authenticator app to complete log in process like this:
mutation CreateMFASession {
createMFASession(
mfa_code: "123456",
email: "your@exchange.login",
challenge: "challenge_session string from previous step"
) {
access_token
}
}
Getting Data
This example shows how to query contentOwnerAnalyticsReport
for daily video views:
query ContentOwnerAnalyticsReport {
contentOwnerAnalyticsReport(
dimensions: [day],
from: "2025-06-01",
to: "2025-06-15"
) {
day
video_views
ad_impressions
}
}
dimensions
can be one of video
, channel
, day
, week
, month
.
You can select one primary dimension, and optionally - one secondary timebucket dimension.
Depending on your selection one or more of relevant response fields will be populated.
It will return data in this format:
{
"data": {
"contentOwnerAnalyticsReport": {
"rows": [
{
"day": "2025-06-01",
"video_views": 12345,
"ad_impressions": 5678
},
...
]
}
}
}