weeklyCounts

Weekly historical counts for a given owner. Returns paginated WeeklyCounts objects.

Parameters

Name Type Description
ownerType required String

Can be Company, Org, or StackApp.

weekStartDate required DateTime

Week start date. Must be a Monday.

ownerId optional ID

If provided, returns weekly counts for a specific owner. If not provided, returns weekly counts for all owners of type owner_type.

Example Queries

Get a company's weekly counts:
{
  weeklyCounts(weekStartDate: "2023-05-01", ownerType: "Company", ownerId: "stackshare") {
    edges {
      node {
        weekStartDate
        totalUsedTools
        totalUsedPackages
        totalMajorVersions
        createdUsers
        totalUsers
        totalLicenseTools
        totalVulnerabilities
        totalLicensePackages
        createdDecisions
        totalVulnerableStacks
        totalAdoptionStageTools
        totalVulnerableStackApps
        totalToolStacks
        createdRepos
        totalRepos
        createdStackApps
        totalStackApps
        createdStacks
        totalStacks
        totalStacksWithoutStackApps
        totalPrivatePackageStacks
      }
    }
  }
}

Get all the weekly counts of all stack apps:

{
  weeklyCounts(weekStartDate: "2023-05-01", ownerType: "StackApp") {
    edges {
      node {
        weekStartDate
        owner {
          slug
        }
        totalUsedTools
        totalUsedPackages
        totalMajorVersions
        totalVulnerabilities
        totalVulnerableStacks
        totalToolStacks
        totalPrivatePackageStacks
      }
    }
  }
}