project_statistics
Gets or lists a project_statistics resource.
Overview​
| Name | project_statistics |
| Type | Resource |
| Id | gitlab.projects.project_statistics |
Fields​
The following fields are returned by SELECT queries:
- get
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
build_artifacts_size | number | Build artifacts size of the project in bytes. |
commit_count | number | Commit count of the project. |
container_registry_size | number | Container registry size of the project in bytes. |
lfs_objects_size | number | Large File Storage (LFS) object size of the project in bytes. |
packages_size | number | Packages size of the project in bytes. |
pipeline_artifacts_size | number | CI Pipeline artifacts size in bytes. |
repository_size | number | Repository size of the project in bytes. |
snippets_size | number | Snippets size of the project in bytes. |
storage_size | number | Storage size of the project in bytes. |
uploads_size | number | Uploads size of the project in bytes. |
wiki_size | number | Wiki size of the project in bytes. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | full_path, host | Statistics 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.
| Name | Datatype | Description |
|---|---|---|
full_path | string | Full path of the project, for example gitlab-org/gitlab |
host | string | GitLab 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​
- get
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)
;