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 provides a JWT access_token
valid for 1 hour:
mutation {
createSession(
login: "your@exchange.login",
password: "exchangePassword",
tenantId: "t-yourTenantId"
) {
access_token
}
}
The tenantId
can be obtained from your account manager.
Getting Data
This example shows how to query publisherAnalyticsReport
for daily video views:
{
publisherAnalyticsReport(
dimensions: [day],
filters: { },
from: "2021-09-01",
to: "2021-10-01"
) {
rows {
video_views,
ad_impressions,
day
}
}
}
It will return data in this format:
{
"data": {
"publisherAnalyticsReport": {
"rows": [
{
"video_views": 210,
"ad_impressions": 150,
"day": "2021-09-02"
}
]
}
}
}
Last updated on