Skip to main content

package

Gets or lists a package resource.

Overview​

Namepackage
TypeResource
Idgitlab.packages.package

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
idstringID of the package.
namestringName of the package.
composer_config_repository_urlstringUrl of the Composer setup endpoint.
composer_urlstringUrl of the Composer endpoint.
conan_urlstringUrl of the Conan project endpoint.
created_atstringDate of creation.
last_downloaded_atstringLast time that a file of the package was downloaded.
maven_urlstringUrl of the Maven project endpoint.
npm_urlstringUrl of the NPM project endpoint.
nuget_urlstringUrl of the Nuget project endpoint.
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.
public_packagebooleanIndicates if there is public access to the package.
pypi_setup_urlstringUrl of the PyPi project setup endpoint.
pypi_urlstringUrl of the PyPi project endpoint.
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
getselectid, hostFind a package. This field can only be resolved for one query in any single request. Returns null if a package has no default status. Generated from the GitLab GraphQL schema field Query.package (PackageDetailsType).

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
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)
idstringGlobal ID of the package.

SELECT examples​

Find a package. This field can only be resolved for one query in any single request. Returns null if a package has no default status. Generated from the GitLab GraphQL schema field Query.package (PackageDetailsType).

SELECT
id,
name,
composer_config_repository_url,
composer_url,
conan_url,
created_at,
last_downloaded_at,
maven_url,
npm_url,
nuget_url,
package_type,
project,
protection_rule_exists,
public_package,
pypi_setup_url,
pypi_url,
status,
status_message,
updated_at,
version
FROM gitlab.packages.package
WHERE id = '{{ id }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
;