Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Tracking endpoint saves to activity and revision #107

Closed
rijkvanzanten opened this issue Apr 27, 2018 · 5 comments
Closed

Tracking endpoint saves to activity and revision #107

rijkvanzanten opened this issue Apr 27, 2018 · 5 comments
Labels
bug Something isn't working

Comments

@rijkvanzanten
Copy link
Member

We need a special endpoint to track the users last page / last online. This info is saved in last_page, last_access, and last_ip.

POST /_/users/tracking/page

{
  "last_page": "/collections/projects"
}

The API should add the last_access (date) and last_ip when saving this to directus_users.

This update should skip directus_activity, seeing the endpoint is going to be used every ~5 seconds

@rijkvanzanten rijkvanzanten added the enhancement New feature or request label Apr 27, 2018
@rijkvanzanten
Copy link
Member Author

Note: This was implemented as a PATCH request instead of the above mentioned POST

@rijkvanzanten
Copy link
Member Author

Note 2:

The endpoint is /users/{id}/tracking/page instead of the one mentioned above

@rijkvanzanten
Copy link
Member Author

@benhaynes for the docs 🔔

@benhaynes
Copy link
Member

Updated.

@rijkvanzanten
Copy link
Member Author

This update should skip directus_activity, seeing the endpoint is going to be used every ~5 seconds

/users/1/tracking/page does in fact save to directus_activity and directus_revisions.

@rijkvanzanten rijkvanzanten reopened this May 19, 2018
@rijkvanzanten rijkvanzanten added bug Something isn't working and removed enhancement New feature or request labels May 21, 2018
@rijkvanzanten rijkvanzanten changed the title Add tracking endpoint Tracking endpoint saves to activity and revision May 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants