Skip to main content

project_packages

Gets or lists a project_packages resource.

Overview​

Nameproject_packages
TypeResource
Idgitlab.packages.project_packages

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
idstringID of the package.
namestringName of the package.
created_atstringDate of creation.
package_typestringPackage type. (MAVEN, NPM, CONAN, NUGET, PYPI, COMPOSER, GENERIC, GOLANG, DEBIAN, RUBYGEMS, HELM, TERRAFORM_MODULE, RPM, ML_MODEL, CARGO)
projectobjectProject identity (id, full_path, name)
protection_rule_existsbooleanWhether any matching package protection rule exists for the package.
statusstringPackage status. (DEFAULT, HIDDEN, PROCESSING, ERROR, PENDING_DESTRUCTION, DEPRECATED)
status_messagestringStatus message.
updated_atstringDate of most recent update.
versionstringVersion string.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectfull_path, hostinclude_versionless, package_name, package_type, package_version, sort, statusPackages of the project. Generated from the GitLab GraphQL schema field Project.packages (connection of Package nodes).

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)
include_versionlessbooleanInclude versionless packages.
package_namestringSearch a package by name.
package_typestringFilter a package by type.
package_versionstringFilter a package by version. If used in combination with include_versionless, then no versionless packages are returned.
sortstringSort packages by the criteria.
statusstringFilter a package by status.

SELECT examples​

Packages of the project. Generated from the GitLab GraphQL schema field Project.packages (connection of Package nodes).

SELECT
id,
name,
created_at,
package_type,
project,
protection_rule_exists,
status,
status_message,
updated_at,
version
FROM gitlab.packages.project_packages
WHERE full_path = '{{ full_path }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND include_versionless = '{{ include_versionless }}'
AND package_name = '{{ package_name }}'
AND package_type = '{{ package_type }}'
AND package_version = '{{ package_version }}'
AND sort = '{{ sort }}'
AND status = '{{ status }}'
;