Skip to content

V3 API #67

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

Merged
merged 10 commits into from
Dec 7, 2024
Merged

V3 API #67

merged 10 commits into from
Dec 7, 2024

Conversation

majora2007
Copy link
Member

Stats data collection has been great at helping me understand a lot of features that I deployed and how they were used, the scope of the user data, and of course tracking active installs.

However, as the app has moved forward, the data is not adding as much benefit and is not easily queryable.

This story is to rewrite the stat API (and dropping old APIs for users that refuse to update) to collect more useful information and to ideally allow more team members to query against it, rather than just me copying db around.

The stats server will always remain anonymous and will avoid any user identifiable information.

Example:

{
  "InstallId" : "9c188c1c",
  "Os" : "Microsoft Windows 10.0.19045",
  "IsDocker" : false,
  "DotnetVersion" : "8.0.1",
  "KavitaVersion" : "0.8.4.3",
  "InitialKavitaVersion" : "0.8.1.6",
  "InitialInstallDate" : "2024-05-15T12:33:38",
  "NumOfCores" : 12,
  "OsLocale" : "Invariant Language (Invariant Country)",
  "TimeToOpeCbzMs" : 2721,
  "TimeToOpenCbzPages" : 23,
  "TimeToPingKavitaStatsApi" : 58,
  "NumberOfCollections" : 15,
  "NumberOfReadingLists" : 18,
  "TotalFiles" : 30114,
  "TotalGenres" : 267,
  "TotalSeries" : 0,
  "TotalLibraries" : 5,
  "TotalPeople" : 2799,
  "MaxSeriesInALibrary" : 1245,
  "MaxVolumesInASeries" : 144,
  "MaxChaptersInASeries" : 5,
  "Libraries" : [ {
    "IncludeInDashboard" : true,
    "IncludeInSearch" : true,
    "UsingFolderWatching" : true,
    "UsingExcludePatterns" : false,
    "CreateCollectionsFromMetadata" : true,
    "CreateReadingListsFromMetadata" : true,
    "LibraryType" : 0,
    "FileTypes" : [ 1 ],
    "LastScanned" : "2024-11-16T00:00:19.568572",
    "NumberOfFolders" : 1
  }, {
    "IncludeInDashboard" : true,
    "IncludeInSearch" : true,
    "UsingFolderWatching" : true,
    "UsingExcludePatterns" : false,
    "CreateCollectionsFromMetadata" : true,
    "CreateReadingListsFromMetadata" : true,
    "LibraryType" : 0,
    "FileTypes" : [ 1 ],
    "LastScanned" : "2024-12-06T00:04:48.1215739",
    "NumberOfFolders" : 1
  }, {
    "IncludeInDashboard" : true,
    "IncludeInSearch" : true,
    "UsingFolderWatching" : true,
    "UsingExcludePatterns" : false,
    "CreateCollectionsFromMetadata" : true,
    "CreateReadingListsFromMetadata" : true,
    "LibraryType" : 0,
    "FileTypes" : [ 2, 3 ],
    "LastScanned" : "2024-11-16T00:13:50.2617389",
    "NumberOfFolders" : 2
  }, {
    "IncludeInDashboard" : true,
    "IncludeInSearch" : true,
    "UsingFolderWatching" : false,
    "UsingExcludePatterns" : false,
    "CreateCollectionsFromMetadata" : true,
    "CreateReadingListsFromMetadata" : true,
    "LibraryType" : 0,
    "FileTypes" : [ 2, 3 ],
    "LastScanned" : "2024-11-16T08:27:56.808718",
    "NumberOfFolders" : 1
  }, {
    "IncludeInDashboard" : true,
    "IncludeInSearch" : true,
    "UsingFolderWatching" : true,
    "UsingExcludePatterns" : false,
    "CreateCollectionsFromMetadata" : true,
    "CreateReadingListsFromMetadata" : true,
    "LibraryType" : 0,
    "FileTypes" : [ 1 ],
    "LastScanned" : "2024-11-16T00:15:13.9080805",
    "NumberOfFolders" : 1
  } ],
  "Relationships" : [ ],
  "OpdsEnabled" : true,
  "EncodeMediaAs" : 1,
  "LastReadTime" : "2024-11-17T16:08:42.7739624",
  "ActiveKavitaPlusSubscription" : false,
  "UsingRestrictedProfiles" : false,
  "Users" : [ {
    "AgeRestriction" : {
      "AgeRating" : -1,
      "IncludeUnknowns" : false
    },
    "LastReadTime" : "2024-11-17T16:08:42.7739624",
    "LastLogin" : "2024-12-03T12:04:11.1742547",
    "IsEmailConfirmed" : false,
    "HasValidEmail" : true,
    "PercentageOfLibrariesHasAccess" : 1,
    "ReadingListsCreatedCount" : 18,
    "CollectionsCreatedCount" : 15,
    "WantToReadSeriesCount" : 81,
    "Locale" : "en",
    "ActiveTheme" : "Dark",
    "SeriesBookmarksCreatedCount" : 1,
    "HasAniListToken" : true,
    "HasMALToken" : true,
    "SmartFilterCreatedCount" : 1,
    "IsSharingReviews" : false,
    "DevicePlatforms" : [ 0 ],
    "Roles" : [ "Admin", "Login" ]
  }, {
    "AgeRestriction" : {
      "AgeRating" : 5,
      "IncludeUnknowns" : false
    },
    "LastReadTime" : "0001-01-01T00:00:00",
    "LastLogin" : "2024-10-25T13:06:24.7763653",
    "IsEmailConfirmed" : true,
    "HasValidEmail" : true,
    "PercentageOfLibrariesHasAccess" : 0.2,
    "ReadingListsCreatedCount" : 0,
    "CollectionsCreatedCount" : 0,
    "WantToReadSeriesCount" : 0,
    "Locale" : "en",
    "ActiveTheme" : "Dark",
    "SeriesBookmarksCreatedCount" : 0,
    "HasAniListToken" : false,
    "HasMALToken" : false,
    "SmartFilterCreatedCount" : 0,
    "IsSharingReviews" : false,
    "DevicePlatforms" : [ ],
    "Roles" : [ "Pleb", "Change Password", "Login" ]
  }, {
    "AgeRestriction" : {
      "AgeRating" : -1,
      "IncludeUnknowns" : false
    },
    "LastReadTime" : "0001-01-01T00:00:00",
    "LastLogin" : "2024-11-25T14:07:15.6547269",
    "IsEmailConfirmed" : true,
    "HasValidEmail" : false,
    "PercentageOfLibrariesHasAccess" : 1,
    "ReadingListsCreatedCount" : 0,
    "CollectionsCreatedCount" : 0,
    "WantToReadSeriesCount" : 0,
    "Locale" : "en",
    "ActiveTheme" : "Dark",
    "SeriesBookmarksCreatedCount" : 0,
    "HasAniListToken" : false,
    "HasMALToken" : false,
    "SmartFilterCreatedCount" : 0,
    "IsSharingReviews" : false,
    "DevicePlatforms" : [ ],
    "Roles" : [ "Pleb", "Login", "Read Only" ]
  } ]
}

@majora2007 majora2007 merged commit b50a09d into main Dec 7, 2024
4 checks passed
@majora2007 majora2007 deleted the feature/stats-v3 branch December 7, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant