Files
2026-04-11 09:45:12 -05:00

2.3 KiB

OneDrive Routing Reference

App name: one-drive Base URL proxied: graph.microsoft.com

API Path Pattern

/one-drive/v1.0/me/drive/{resource}

Common Endpoints

Get User's Drive

GET /one-drive/v1.0/me/drive

List Drives

GET /one-drive/v1.0/me/drives

Get Drive Root

GET /one-drive/v1.0/me/drive/root

List Root Children

GET /one-drive/v1.0/me/drive/root/children

Get Item by ID

GET /one-drive/v1.0/me/drive/items/{item-id}

Get Item by Path

GET /one-drive/v1.0/me/drive/root:/Documents/file.txt

List Folder Children by Path

GET /one-drive/v1.0/me/drive/root:/Documents:/children

Create Folder

POST /one-drive/v1.0/me/drive/root/children
Content-Type: application/json

{
  "name": "New Folder",
  "folder": {}
}

Upload File (Simple - up to 4MB)

PUT /one-drive/v1.0/me/drive/root:/filename.txt:/content
Content-Type: text/plain

{file content}

Delete Item

DELETE /one-drive/v1.0/me/drive/items/{item-id}
POST /one-drive/v1.0/me/drive/items/{item-id}/createLink
Content-Type: application/json

{
  "type": "view",
  "scope": "anonymous"
}

Search Files

GET /one-drive/v1.0/me/drive/root/search(q='query')

Special Folders

GET /one-drive/v1.0/me/drive/special/documents
GET /one-drive/v1.0/me/drive/special/photos

Recent Files

GET /one-drive/v1.0/me/drive/recent

Shared With Me

GET /one-drive/v1.0/me/drive/sharedWithMe

Notes

  • Authentication is automatic - the router injects the OAuth token
  • Uses Microsoft Graph API (graph.microsoft.com)
  • Use colon (:) syntax for path-based addressing
  • Simple uploads limited to 4MB; use resumable upload for larger files
  • Download URLs in @microsoft.graph.downloadUrl are pre-authenticated
  • Supports OData query parameters: $select, $expand, $filter, $orderby, $top

Resources