Manage packages for authenticated users and organizations.
27 endpoints tagged packages, each listing its
parameters and possible responses. Search or scroll the index below to
jump to a specific endpoint.
No endpoints match your search.
GET /orgs/{org}/docker/conflicts
Lists all packages that are in a specific organization, are readable by the requesting user, and that encountered a conflict during a Docker migration.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /orgs/{org}/packages
Lists packages in an organization readable by the user.
| Name | In | Required | Description |
|---|---|---|---|
package_type | query | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
org | path | yes | The organization name. The name is not case sensitive. |
visibility | query | no | The selected visibility of the packages. This parameter is optional and only filters an existing result set. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
| 400 | The value of per_page multiplied by page cannot be greater than 10000. | no |
GET /orgs/{org}/packages/{package_type}/{package_name}
Gets a specific package in an organization.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /orgs/{org}/packages/{package_type}/{package_name}
Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
POST /orgs/{org}/packages/{package_type}/{package_name}/restore
Restores an entire package in an organization.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
org | path | yes | The organization name. The name is not case sensitive. |
token | query | no | package token |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /orgs/{org}/packages/{package_type}/{package_name}/versions
Lists package versions for a package owned by an organization.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
org | path | yes | The organization name. The name is not case sensitive. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
state | query | no | The state of the package, either active or deleted. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}
Gets a specific package version in an organization.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
org | path | yes | The organization name. The name is not case sensitive. |
package_version_id | path | yes | Unique identifier of the package version. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}
Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
org | path | yes | The organization name. The name is not case sensitive. |
package_version_id | path | yes | Unique identifier of the package version. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore
Restores a specific package version in an organization.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
org | path | yes | The organization name. The name is not case sensitive. |
package_version_id | path | yes | Unique identifier of the package version. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /user/docker/conflicts
Lists all packages that are owned by the authenticated user within the user's namespace, and that encountered a conflict during a Docker migration.
No parameters.
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /user/packages
Lists packages owned by the authenticated user within the user's namespace.
| Name | In | Required | Description |
|---|---|---|---|
package_type | query | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
visibility | query | no | The selected visibility of the packages. This parameter is optional and only filters an existing result set. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 400 | The value of per_page multiplied by page cannot be greater than 10000. | no |
GET /user/packages/{package_type}/{package_name}
Gets a specific package for a package owned by the authenticated user.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /user/packages/{package_type}/{package_name}
Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
POST /user/packages/{package_type}/{package_name}/restore
Restores a package owned by the authenticated user.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
token | query | no | package token |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /user/packages/{package_type}/{package_name}/versions
Lists package versions for a package owned by the authenticated user.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
state | query | no | The state of the package, either active or deleted. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}
Gets a specific package version for a package owned by the authenticated user.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
package_version_id | path | yes | Unique identifier of the package version. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}
Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
package_version_id | path | yes | Unique identifier of the package version. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore
Restores a package version owned by the authenticated user.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
package_version_id | path | yes | Unique identifier of the package version. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /users/{username}/docker/conflicts
Lists all packages that are in a specific user's namespace, that the requesting user has access to, and that encountered a conflict during Docker migration.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /users/{username}/packages
Lists all packages in a user's namespace for which the requesting user has access.
| Name | In | Required | Description |
|---|---|---|---|
package_type | query | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
visibility | query | no | The selected visibility of the packages. This parameter is optional and only filters an existing result set. |
username | path | yes | The handle for the GitHub user account. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
| 400 | The value of per_page multiplied by page cannot be greater than 10000. | no |
GET /users/{username}/packages/{package_type}/{package_name}
Gets a specific package metadata for a public package owned by a user.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /users/{username}/packages/{package_type}/{package_name}
Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
POST /users/{username}/packages/{package_type}/{package_name}/restore
Restores an entire package for a user.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
username | path | yes | The handle for the GitHub user account. |
token | query | no | package token |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /users/{username}/packages/{package_type}/{package_name}/versions
Lists package versions for a public package owned by a specified user.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}
Gets a specific package version for a public package owned by a specified user.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
package_version_id | path | yes | Unique identifier of the package version. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}
Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
username | path | yes | The handle for the GitHub user account. |
package_version_id | path | yes | Unique identifier of the package version. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore
Restores a specific package version for a user.
| Name | In | Required | Description |
|---|---|---|---|
package_type | path | yes | The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry. |
package_name | path | yes | The name of the package. |
username | path | yes | The handle for the GitHub user account. |
package_version_id | path | yes | Unique identifier of the package version. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |