Topic views doesn't update on rest API requests

In last Version 3.4.0.beta4-dev I noted that topic views doesn’t update when using rest API requests. Even putting headers likeDiscourse-Visible, X-Requested-With or even more

‘Discourse-Visible’: ‘true’,
‘Discourse-Logged-In’ : ‘true’,
‘Discourse-Present’: ‘true’,
‘Discourse-Track-View’: ‘true’,
‘Discourse-Track-View-Topic-Id’: 2214

I don’t know if this is a bug or is something that is programmed like that. But in previous version this behaviour didn’t happen

I would be very grateful if you could help me with this issue.

Thank you very much

Is this something that just happening to me ?

I would really appreciate any help you can give me with this problem. I’ve tried several things without success. I think I’ve set all the possible headers I’ve seen in the reverse engineering I’ve done, and the views still aren’t updating. I think there must be a header I’m missing.

By the way I’m using admin API keys instead of User api keys. I hope this is not a problem

Thank you very much

API requests don’t track views, unconditionally, by design.

I guess you are after some feature request here to allow you to track views via our API, recategorizing.

2 Likes

hmmm :thinking:
Thank you @sam but I wonder why before 3.4.0.beta-4 version it did it ?

also if User::last_seen_at is updated why not the views ?

When you say a feature it means a plugin that allow me to track views via API ?

Thank you again

@david can you clarify here, is there a change missing from request tracker?

Topic views have been migrated to use our “browser pageviews” system. That means that they no longer include any kind of API or crawler requests.

The DISCOURSE_VISIBLE header relates only to the legacy pageviews system.

3 Likes