-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add /api/v1/stats
#356
Comments
In addition, short statistic such as a version number can be added to the footer of the website. This way you can be sure which version you're using. |
Using the example from above: {
"version": "2.0",
"software": { "name": "diaspora", "version": "0.7.9.0-p00846856" },
"protocols": ["diaspora"],
"services": { "inbound": [], "outbound": ["twitter", "tumblr", "wordpress"] },
"openRegistrations": true,
"usage": {
"users": { "total": 56091, "activeHalfyear": 12026, "activeMonth": 4715 },
"localPosts": 657359,
"localComments": 641679
},
"metadata": {
"nodeName": "Framasphere*",
"xmppChat": false,
"camo": { "markdown": true, "opengraph": true, "remotePods": false },
"adminAccount": "podmin"
}
} The relevant fields would be There would also likely be |
To get the number of users, this could be used with PostgreSQL:
Which would return something like |
The Unfortunately I can see that being reasonable though if you pull it out into a job like this so statistics are updated separately from the main query. |
Added with 4be82c5. Statistics are disabled by default. You can see statistics for the official instance here. Example response (as of writing): {
"version": "2.0",
"software": {
"name": "invidious",
"version": "0.14.1-daf8e5b"
},
"openRegistrations": true,
"usage": {
"users": {
"total": 3165,
"activeHalfyear": 2853,
"activeMonth": 1027
}
},
"metadata": {
"updatedAt": 1551497015,
"lastChannelRefreshedAt": 1551497015
}
} Statistics are updated roughly once every minute, the time it was updated designated by The schema is based on this spec. Several fields are omitted, such as the |
Diaspora provides
/nodeinfo/1.0
and/nodeinfo/2.0
on instances that have them enabled. Example: https://framasphere.org/nodeinfo/2.0.Invidious could provide an endpoint
/api/v1/stats
that provides similar statistics. Statistics would be disabled by default and enabled either inconfig.yml
or as part of #312.The text was updated successfully, but these errors were encountered: