microsoftgraph / microsoftgraph/msgraph-sdk-typescript
Add `itemWithPath` to OneDrive items
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 44
- Forks
- 7
- Avg merge
- 12h 40m
- Merged PRs (30d)
- 5
Description
Is your feature request related to a problem? Please describe the problem.
The OneDrive APIs support getting an item with a path instead of an ID. From https://learn.microsoft.com/en-us/graph/api/driveitem-get?view=graph-rest-1.0&tabs=http:
GET /drives/{drive-id}/root:/{item-path}
Other SDKs implement this as a custom request builder, for example in C#:
https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/609cef23d74a36afc7112d48e766b5d417224515/src/Microsoft.Graph/Extensions/DriveItemRequestBuilderExtensions.cs#L45
This SDK should implement something similar.
Describe the solution you'd like.
const uploadSession = await graphClient.drives
.byDriveId(myDrive.id)
.items.byDriveItemId('root')
.itemWithPath('some/path.txt')
.createUploadSession
.post(uploadSessionBody);
Additional context?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TypeScript SDK entry point for DriveItem requests and compare its structure with the linked Microsoft Graph API example and C# request-builder extension. Implement the itemWithPath flow so the provided createUploadSession example can target a path, then verify that this request is generated and usable as shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100