How to list and delete blobs created using the REST API "Create a blob" #112515
Replies: 2 comments 1 reply
-
The GitHub REST API doesn't provide direct endpoints to list or delete individual blobs. Blobs are typically referenced as part of other Git objects (such as trees and commits) rather than being standalone entities. |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I'm using the REST APIS to create and retrieve blobs without problems but I don't see a way to list all the blobs I created and/or to delete them.
The blobs are created as showed in the docs: https://docs.github.com/en/rest/git/blobs?apiVersion=2022-11-28#create-a-blob
curl -L
-X POST
-H "Accept: application/vnd.github+json"
-H "Authorization: Bearer "
-H "X-GitHub-Api-Version: 2022-11-28"
https://api.github.com/repos/OWNER/REPO/git/blobs
-d '{"content":"Content of the blob","encoding":"utf-8"}'
and once created they can be downloaded as showed here: https://docs.github.com/en/rest/git/blobs?apiVersion=2022-11-28#get-a-blob
curl -L
-H "Accept: application/vnd.github+json"
-H "Authorization: Bearer "
-H "X-GitHub-Api-Version: 2022-11-28"
https://api.github.com/repos/OWNER/REPO/git/blobs/FILE_SHA
Is there a way to list/delete the blobs?
Beta Was this translation helpful? Give feedback.
All reactions