Skip to main content

project_statistics

Gets or lists a project_statistics resource.

Overview​

Nameproject_statistics
TypeResource
Idgitlab.projects.project_statistics

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
build_artifacts_sizenumberBuild artifacts size of the project in bytes.
commit_countnumberCommit count of the project.
container_registry_sizenumberContainer registry size of the project in bytes.
lfs_objects_sizenumberLarge File Storage (LFS) object size of the project in bytes.
packages_sizenumberPackages size of the project in bytes.
pipeline_artifacts_sizenumberCI Pipeline artifacts size in bytes.
repository_sizenumberRepository size of the project in bytes.
snippets_sizenumberSnippets size of the project in bytes.
storage_sizenumberStorage size of the project in bytes.
uploads_sizenumberUploads size of the project in bytes.
wiki_sizenumberWiki size of the project in bytes.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfull_path, hostStatistics of the project. Generated from the GitLab GraphQL schema field Project.statistics (ProjectStatistics).

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
full_pathstringFull path of the project, for example gitlab-org/gitlab
hoststringGitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST)

SELECT examples​

Statistics of the project. Generated from the GitLab GraphQL schema field Project.statistics (ProjectStatistics).

SELECT
build_artifacts_size,
commit_count,
container_registry_size,
lfs_objects_size,
packages_size,
pipeline_artifacts_size,
repository_size,
snippets_size,
storage_size,
uploads_size,
wiki_size
FROM gitlab.projects.project_statistics
WHERE full_path = '{{ full_path }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
;