project_packages
Gets or lists a project_packages resource.
Overview​
| Name | project_packages |
| Type | Resource |
| Id | gitlab.packages.project_packages |
Fields​
The following fields are returned by SELECT queries:
- list
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the package. |
name | string | Name of the package. |
created_at | string | Date of creation. |
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. |
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 |
|---|---|---|---|---|
list | select | full_path, host | include_versionless, package_name, package_type, package_version, sort, status | Packages 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.
| 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) |
include_versionless | boolean | Include versionless packages. |
package_name | string | Search a package by name. |
package_type | string | Filter a package by type. |
package_version | string | Filter a package by version. If used in combination with include_versionless, then no versionless packages are returned. |
sort | string | Sort packages by the criteria. |
status | string | Filter a package by status. |
SELECT examples​
- list
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 }}'
;