GitHub Container Registry Organization Packages API

Manage container packages owned by an organization

OpenAPI Specification

github-container-registry-organization-packages-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: GitHub Container Registry Organization Packages API
  description: REST API endpoints for managing container packages on GitHub Container Registry (ghcr.io) via the GitHub Packages API. Image push/pull operations use the OCI Distribution Spec at ghcr.io.
  version: 1.0.0
  contact:
    name: GitHub
    url: https://docs.github.com/en/rest/packages/packages
servers:
- url: https://api.github.com
  description: GitHub REST API
security:
- BearerAuth: []
tags:
- name: Organization Packages
  description: Manage container packages owned by an organization
paths:
  /orgs/{org}/packages:
    get:
      summary: List packages for an organization
      operationId: listOrgPackages
      tags:
      - Organization Packages
      parameters:
      - name: org
        in: path
        required: true
        schema:
          type: string
      - name: package_type
        in: query
        required: true
        schema:
          type: string
          enum:
          - npm
          - maven
          - rubygems
          - docker
          - nuget
          - container
      responses:
        '200':
          description: A list of packages
  /orgs/{org}/packages/{package_type}/{package_name}:
    get:
      summary: Get a package for an organization
      operationId: getOrgPackage
      tags:
      - Organization Packages
      parameters:
      - name: org
        in: path
        required: true
        schema:
          type: string
      - name: package_type
        in: path
        required: true
        schema:
          type: string
      - name: package_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Package details
    delete:
      summary: Delete a package for an organization
      operationId: deleteOrgPackage
      tags:
      - Organization Packages
      parameters:
      - name: org
        in: path
        required: true
        schema:
          type: string
      - name: package_type
        in: path
        required: true
        schema:
          type: string
      - name: package_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Package deleted
  /orgs/{org}/packages/{package_type}/{package_name}/restore:
    post:
      summary: Restore a package for an organization
      operationId: restoreOrgPackage
      tags:
      - Organization Packages
      parameters:
      - name: org
        in: path
        required: true
        schema:
          type: string
      - name: package_type
        in: path
        required: true
        schema:
          type: string
      - name: package_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Package restored
  /orgs/{org}/packages/{package_type}/{package_name}/versions:
    get:
      summary: Get all package versions for a package owned by an organization
      operationId: listOrgPackageVersions
      tags:
      - Organization Packages
      parameters:
      - name: org
        in: path
        required: true
        schema:
          type: string
      - name: package_type
        in: path
        required: true
        schema:
          type: string
      - name: package_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: A list of package versions
  /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}:
    get:
      summary: Get a package version for an organization
      operationId: getOrgPackageVersion
      tags:
      - Organization Packages
      parameters:
      - name: org
        in: path
        required: true
        schema:
          type: string
      - name: package_type
        in: path
        required: true
        schema:
          type: string
      - name: package_name
        in: path
        required: true
        schema:
          type: string
      - name: package_version_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Package version
    delete:
      summary: Delete a package version for an organization
      operationId: deleteOrgPackageVersion
      tags:
      - Organization Packages
      parameters:
      - name: org
        in: path
        required: true
        schema:
          type: string
      - name: package_type
        in: path
        required: true
        schema:
          type: string
      - name: package_name
        in: path
        required: true
        schema:
          type: string
      - name: package_version_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Version deleted
  /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore:
    post:
      summary: Restore a package version for an organization
      operationId: restoreOrgPackageVersion
      tags:
      - Organization Packages
      parameters:
      - name: org
        in: path
        required: true
        schema:
          type: string
      - name: package_type
        in: path
        required: true
        schema:
          type: string
      - name: package_name
        in: path
        required: true
        schema:
          type: string
      - name: package_version_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Version restored
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token