Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Metrics : add user accounts number #10177

Closed
DS-INRAE opened this issue Dec 12, 2023 · 4 comments · Fixed by #10260
Closed

API Metrics : add user accounts number #10177

DS-INRAE opened this issue Dec 12, 2023 · 4 comments · Fixed by #10260
Labels
Type: Feature a feature request
Milestone

Comments

@DS-INRAE
Copy link
Member

DS-INRAE commented Dec 12, 2023

Overview of the Feature Request
Add an API Metrics type for total number of user accounts?

What kind of user is the feature intended for?
(Example users roles: API User, Curator, Depositor, Guest, Superuser, Sysadmin)
In order to allow display of this metric as in this issue :

Any brand new behavior do you want to add to Dataverse?
Add the new metric to the API, as per other metrics :

  • Total - an aggregate count over all-time:
    • Form: GET https://$SERVER/api/info/metrics/accounts
    • Return: A simple JSON object with a count whose value is the accounts' total count.
      Ex. {"status":"OK","data":{"count":13}}
  • To-Month - a count of accounts in dataverse up to and including a specified month $YYYY-DD in YYYY-MM format (e.g. 2018-01):
    • Form: GET https://$SERVER/api/info/metrics/accounts/toMonth/$YYYY-DD
    • Return: A simple JSON object with a count whose value is the accounts' total count.
      Ex. {"status":"OK","data":{"count":13}}
  • Past Days - a count of accounts in a Dataverse installation for the past $days (e.g. 30):
    • Form: GET https://$SERVER/api/info/metrics/accounts/pastDays/$days
    • Return: A simple JSON object with a count whose value is the accounts' total count.
      Ex. {"status":"OK","data":{"count":3}}
  • Monthly - a time series of the metric with aggregate values per month with counts up to and including the given month:
    • Form: GET https://$SERVER/api/info/metrics/accounts/monthly
    • Return: A CSV with an array of counts per month.
      Ex.
      date,count
      "2022-12",19
      "2023-01",19
      "2023-02",19
      "2023-03",19
      "2023-04",19
      "2023-05",19
      "2023-06",19
      "2023-07",19
      "2023-08",19
      "2023-09",19
      "2023-10",19
      "2023-11",19
      "2023-12",19
      

Any open or closed issues related to this feature request?

@DS-INRAE DS-INRAE added the Type: Feature a feature request label Dec 12, 2023
@pdurbin
Copy link
Member

pdurbin commented Dec 12, 2023

@DS-INRA I've wanted this for a long time. Thanks for creating this issue!

I'm not sure if you've looked at the authenticateduser table lately: https://guides.dataverse.org/en/5.14/schemaspy/tables/authenticateduser.html

We might want to consider fields such as:

  • lastlogintime
  • lastapiusetime
  • deactivated (I forget why we don't just use the time below 🤔 )
  • deactivatedtime

Basically, what I'm getting at is that if we want to get fancier, we could say things like:

  • Show me all the active users (either by login or API).
  • Show me all the non-deactivate users (though I suspect deactivation is rare).

Also, does your team plan to work on this?

@DS-INRAE
Copy link
Member Author

It would be very helpful to have active users too indeed, I'm still thinking about what parameter would be best for this use case though, my guess is pastDays because the timeframe for "active" might vary between installations.
On our side we would also be interested in the various account types number but I didn't mention it here to keep the issue focused on the first step.
As per a contribution on our side, we have not scheduled it yet but we'll likely be proposing a PR for this in 2024 in order to unlock the other issue on dv-metrics we planned to do, I'll add a comment when confirmed :)

stevenferey added a commit to Recherche-Data-Gouv/dataverse that referenced this issue Jan 5, 2024
stevenferey added a commit to Recherche-Data-Gouv/dataverse that referenced this issue Jan 24, 2024
stevenwinship pushed a commit that referenced this issue Mar 1, 2024
* #10177 API Metrics : add user accounts number

* #10177 correction of installation word
@pdurbin pdurbin added this to the 6.2 milestone Mar 1, 2024
@pdurbin
Copy link
Member

pdurbin commented May 21, 2024

It would be very helpful to have active users too indeed

@DS-INRA are you still interested in counting active users somehow? Have you considered creating an issue for this?

@DS-INRAE
Copy link
Member Author

@DS-INRA are you still interested in counting active users somehow? Have you considered creating an issue for this?

It would still be interesting but we would like to discuss with our collection administrators the need, we have a meeting on the metrics topic on July 5th, so there will be more news at that time 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature a feature request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants