Skip to content

Retrieve a project package

GET
/api/v4/projects/{id}/packages/{package_id}

Retrieves a specified project package. Only packages with status default or deprecated are returned.

id
required
One of:
string

The ID or URL-encoded path of the project

package_id
required
integer

The ID of a package

OK

Media type application/json
object
id
integer format: int64
name
string
conan_package_name
string
version
string
package_type
string
status
string
_links
string
created_at
string format: date-time
last_downloaded_at
string format: date-time
creator_id

ID of the user who created the package

integer format: int64
project_id
integer format: int64
project_path
string
tags
string
pipeline
object
id
integer format: int64
iid
integer
project_id
integer format: int64
sha
string
ref
string
status
string
source
string
created_at
string format: date-time
updated_at
string format: date-time
web_url
string
user
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
pipelines
object
id
integer format: int64
iid
integer
project_id
integer format: int64
sha
string
ref
string
status
string
source
string
created_at
string format: date-time
updated_at
string format: date-time
web_url
string
user
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
versions
object
id
string
version
string
created_at
string
tags
string
pipeline
object
id
integer format: int64
iid
integer
project_id
integer format: int64
sha
string
ref
string
status
string
source
string
created_at
string format: date-time
updated_at
string format: date-time
web_url
string
user
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
Example
{
"id": 1,
"name": "@foo/bar",
"version": "1.0.3",
"package_type": "npm",
"status": "default",
"created_at": "2022-09-16T12:47:31.949Z",
"last_downloaded_at": "2022-09-19T11:32:35.169Z",
"creator_id": 1,
"project_id": 2,
"project_path": "gitlab/foo/bar",
"pipeline": {
"id": 1,
"iid": 2,
"project_id": 3,
"sha": "0ec9e58fdfca6cdd6652c083c9edb53abc0bad52",
"ref": "feature-branch",
"status": "success",
"source": "push",
"created_at": "2022-10-21T16:49:48.000+02:00",
"updated_at": "2022-10-21T16:49:48.000+02:00",
"web_url": "https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61",
"user": {
"id": 1,
"username": "admin",
"public_email": "john@example.com",
"name": "Administrator",
"state": "active",
"avatar_url": "https://gravatar.com/avatar/1",
"avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png",
"custom_attributes": [
{
"key": "foo",
"value": "bar"
}
],
"web_url": "https://gitlab.example.com/root"
}
},
"pipelines": {
"id": 1,
"iid": 2,
"project_id": 3,
"sha": "0ec9e58fdfca6cdd6652c083c9edb53abc0bad52",
"ref": "feature-branch",
"status": "success",
"source": "push",
"created_at": "2022-10-21T16:49:48.000+02:00",
"updated_at": "2022-10-21T16:49:48.000+02:00",
"web_url": "https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61",
"user": {
"id": 1,
"username": "admin",
"public_email": "john@example.com",
"name": "Administrator",
"state": "active",
"avatar_url": "https://gravatar.com/avatar/1",
"avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png",
"custom_attributes": [
{
"key": "foo",
"value": "bar"
}
],
"web_url": "https://gitlab.example.com/root"
}
},
"versions": {
"pipeline": {
"id": 1,
"iid": 2,
"project_id": 3,
"sha": "0ec9e58fdfca6cdd6652c083c9edb53abc0bad52",
"ref": "feature-branch",
"status": "success",
"source": "push",
"created_at": "2022-10-21T16:49:48.000+02:00",
"updated_at": "2022-10-21T16:49:48.000+02:00",
"web_url": "https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61",
"user": {
"id": 1,
"username": "admin",
"public_email": "john@example.com",
"name": "Administrator",
"state": "active",
"avatar_url": "https://gravatar.com/avatar/1",
"avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png",
"custom_attributes": [
{
"key": "foo",
"value": "bar"
}
],
"web_url": "https://gitlab.example.com/root"
}
}
}
}

Bad Request

Forbidden

Not Found