Created
          November 22, 2019 08:08 
        
      - 
      
- 
        Save ghorbanzade/284f5167279f40a94264330f2af6bbba to your computer and use it in GitHub Desktop. 
    registryPackagesForQuery and deletePackageVersion
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | curl -X POST \ | |
| -H "Accept: application/vnd.github.package-deletes-preview+json" \ | |
| -H "Authorization: bearer <PERSONAL_ACCESS_TOKEN>" \ | |
| -d '{"query":"mutation { deletePackageVersion(input:{packageVersionId:\"<PACKAGE_VERSION>\"}) { success }}"}' \ | |
| https://api.github.com/graphql | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | curl -X POST \ | |
| -H "Authorization: bearer <ACCESS_TOKEN>" \ | |
| -H "Accept: application/vnd.github.packages-preview+json" \ | |
| -d '{"query": "{user(login: \"<USERNAME>\") { registryPackagesForQuery(packageType: DOCKER, first: 100) { edges { node { name id versions(first: 100) { nodes {id} } } } } } }"}' \ | |
| https://api.github.com/graphql | 
Try
{"query": "{user(login: \"<USERNAME>\") { packages(packageType: DOCKER, first: 100) { edges { node { name id versions(first: 100) { nodes {id version} } } } } } }"}
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Changes scheduled for 2020-04-01
Breaking A change will be made to Organization.registryPackagesForQuery.
Description: registryPackagesForQuery will be removed. Use the PackageSearch object instead.
Reason: Renaming GitHub Packages fields and objects.
Github Breaking Changes
Does anyone have the updated query?