In our API users are authenticated using Token authentication, then every request contains an Authorization Header like: "Authorization Token ab1dj4jfhu4hsudf778sfd78sdf"
I need to generate a report of traffic and another one of errors by the user (by user token).
I couldn't find any option to add a dimension based on the Authorization header or any header.
Is this possible?
Also, while testing the reports I'm only getting data of yesterday, but I can't see data of some requests that I've just made, is that intended? is it only possible to see data of one day ago or older?
Thanks
Mariano
I need to generate a report of traffic and another one of errors by the user (by user token). I couldn't find any option to add a dimension based on the Authorization header or any header.
OK, I think what you want is to add a dimension to a custom report. There are standard dimensions, which you see in the picklist, and then you can setup custom dimensions. To set up a custom dimension, such as the value of a header, or the token, or even some metadata (like userid) associated to the token, you need to use the StatisticsCollector policy. Here's a quick 4-minute video that describes how it works.
while testing the reports I'm only getting data of yesterday, but I can't see data of some requests that I've just made, is that intended?
Not so much intended, but expected. The elaboration interval is about every 10-15 minutes. Requests that you've "just made" won't show up until the analytics elaboration cycle completes. Wait just a bit and you should see data for the recent requests.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |