package
Gets or lists a package resource.
Overview​
| Name | package |
| Type | Resource |
| Id | gitlab.packages.package |
Fields​
The following fields are returned by SELECT queries:
- get
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the package. |
name | string | Name of the package. |
composer_config_repository_url | string | Url of the Composer setup endpoint. |
composer_url | string | Url of the Composer endpoint. |
conan_url | string | Url of the Conan project endpoint. |
created_at | string | Date of creation. |
last_downloaded_at | string | Last time that a file of the package was downloaded. |
maven_url | string | Url of the Maven project endpoint. |
npm_url | string | Url of the NPM project endpoint. |
nuget_url | string | Url of the Nuget project endpoint. |
package_type | string | Package type. (MAVEN, NPM, CONAN, NUGET, PYPI, COMPOSER, GENERIC, GOLANG, DEBIAN, RUBYGEMS, HELM, TERRAFORM_MODULE, RPM, ML_MODEL, CARGO) |
project | object | Project identity (id, full_path, name) |
protection_rule_exists | boolean | Whether any matching package protection rule exists for the package. |
public_package | boolean | Indicates if there is public access to the package. |
pypi_setup_url | string | Url of the PyPi project setup endpoint. |
pypi_url | string | Url of the PyPi project endpoint. |
status | string | Package status. (DEFAULT, HIDDEN, PROCESSING, ERROR, PENDING_DESTRUCTION, DEPRECATED) |
status_message | string | Status message. |
updated_at | string | Date of most recent update. |
version | string | Version string. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, host | 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). |
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 |
|---|---|---|
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) |
id | string | Global ID of the package. |
SELECT examples​
- get
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)
;