feat: add drive special folder GET endpoints - #74
Open
dschmidt wants to merge 3 commits into
Open
Conversation
Add GET /v1.0/drives/{drive-id}/special/{special-id} and its /children,
addressing a drive's special folders by well-known name. Defines the
recyclebin special folder as the drive trash: children carry the trash
facet (trashedBy/trashedDateTime) and parentReference for the original
location, and the folder need not be reachable in the normal item tree.
Listing only for now; restore/purge follow separately.
restore and permanentDelete on the single-item driveItem endpoints (v1.0 and v1beta1 drives, me/drive), a member DELETE to purge one trashed item from a special folder, and a DELETE on the special folder itself to empty it. Restore and permanentDelete follow MS Graph; the member DELETE mirrors delete recycleBinItem; empty has no MS equivalent and mirrors the WebDAV trash-bin DELETE. permanentDelete hard-deletes a live item bypassing the trash and does not address trashed items.
dschmidt
marked this pull request as ready for review
September 7, 2026 10:56
dschmidt
requested review from
butonic,
dragotin,
fschade,
kulmann,
micbar and
rhafer
as code owners
September 7, 2026 10:56
This was referenced Sep 7, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address a drive's trash over the Graph API as a special folder, and operate on trashed and live items.
special-nameis an enum, currently[recyclebin], resolving to the drive's trash. The special folder need not be reachable in the normal item tree. Trash entries aredriveItems carrying the existingtrashfacet (trashedBy,trashedDateTime) with aparentReferencefor their original location.Listing
/v1.0/drives/{drive-id}/special/{special-name}$expand=childrenembeds the listing)/v1.0/drives/{drive-id}/special/{special-name}/childrenRestore
MS Graph
driveItem: restore. Optional body{ parentReference, name }to restore elsewhere; returns the restoreddriveItem./v1.0/drives/{drive-id}/items/{item-id}/restore/v1beta1/drives/{drive-id}/items/{item-id}/restore/v1.0/me/drive/items/{item-id}/restorepermanentDelete
MS Graph
driveItem: permanentDelete: hard-delete a live item bypassing the trash (it does not address trashed items). Offered on every single-item endpoint for consistency./v1.0/drives/{drive-id}/items/{item-id}/permanentDelete/v1beta1/drives/{drive-id}/items/{item-id}/permanentDelete/v1.0/me/drive/items/{item-id}/permanentDeletePurge and empty
Purge one trashed item (member DELETE, mirrors MS Graph delete recycleBinItem) or empty the whole trash (DELETE on the virtual special folder, which stays addressable; no MS equivalent, mirrors the WebDAV trash-bin DELETE).
/v1.0/drives/{drive-id}/special/{special-name}/items/{item-id}/v1.0/drives/{drive-id}/special/{special-name}Notes
special/{special-name}:/{path}and:/{path}:/children), noted in the descriptions since OpenAPI cannot express the colon segment.permanentDelete(live, skip trash) and purge (remove an item already in the trash) are distinct: verified against MS Graph,permanentDeletereturns 404 on a trashed item.trashfacet; nothing populates it yet, the server side follows.