You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
merge the /volume functionality into /event-aggregates, however:
supports both cases: either authenticate as someone and get their stats only, or get global stats; however, global stats would be limited to certain combinations of periods and intervals (e.g. daily for a month, hourly for a day, etc.)
the authenticated calls should get data either for a single channel, or for all channels; the global calls will always be for all channels
rather than using the $day, $month and etc. mongodb operators, use what we use in volume ($mod): https://github.com/AdExNetwork/adex-validator/blob/05-stable/routes/volume.js#L29 ; each datapoint will use time as it's identifier, and should return it in a number format (rather than stringified date) ; this should greatly simplify the pipeline
to avoid excessive CPU load, calls without authentication, that retrieve global stats, should be cached in redis for interval/2 time
should be all handled in a separate file, routes/analytics.js; might use the channels middleware if we need to load a full channel
for example, aggr would be [{ time: 1563645559247, value: "1023022" }]
API:
/analytics - optional authentication; queries for all channels
/:channelId/analytics - required authentication; channel specific queries
If authentication is passed, it will only return aggregates for this particular earner; otherwise it will return a sum of all earners (like /volume now)
Both take timeframe, limit, eventType, metric; only certain combinations of timeframe and limit will be allowed for /analytics without authentication
Since this is a breaking change, it should be discussed with @ivopaunov and @samparsky first
The text was updated successfully, but these errors were encountered:
merge the /volume functionality into /event-aggregates, however:
$mod
): https://github.com/AdExNetwork/adex-validator/blob/05-stable/routes/volume.js#L29 ; each datapoint will usetime
as it's identifier, and should return it in a number format (rather than stringified date) ; this should greatly simplify the pipelineroutes/analytics.js
; might use the channels middleware if we need to load a full channelfor example,
aggr
would be[{ time: 1563645559247, value: "1023022" }]
API:
/analytics
- optional authentication; queries for all channels/:channelId/analytics
- required authentication; channel specific queriesIf authentication is passed, it will only return aggregates for this particular earner; otherwise it will return a sum of all earners (like
/volume
now)Both take
timeframe
,limit
,eventType
,metric
; only certain combinations oftimeframe
andlimit
will be allowed for/analytics
without authenticationSince this is a breaking change, it should be discussed with @ivopaunov and @samparsky first
The text was updated successfully, but these errors were encountered: