Graph API - SharePoint - Get Drive Items in a Drive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-23 02:39 PM
Below is my settings for the new action:
Parameters:
Request:
I tried the same on POSTMAN and it worked. Any help on this would be greatly appreciated!
------------------------------
Weng Lam Cheong
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
25-01-23 09:54 PM
Is this a WebAPI you've created yourself, or are you using something from the Digital Exchange?
Cheers,
------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-01-23 11:55 AM
------------------------------
Weng Lam Cheong
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-01-23 12:52 PM
Hi @Weng_LamCheong
I believe the problem is in the URLPath you're providing. As I understand from your inputs, you are trying to get the children of the root. The way you wrote it wont work because the children is not a part of the drive items properties, but there's a relationship between them. To get the properties you need to use slashes as you wrote. However, to get the relationships you have to expand them. See below.
/sites/[SiteId]/drives/[DriveId]/root/?expand=children
An alternative to that would be sending multiple requests that gives you certain data that has direct properties with what you need. For example, There's an action in that sharepoint webservice called "Get Root Folder ID" that will be giving you the root folder ID. You can then utilize that ID to get the "Get Drive Items" which will have this URL Path "/sites/[SiteId]/drives/[DriveId]/items/[FolderId]/children" Notice that children is not being expanded because it is a property of that folder.
You can refer to Graph API Documentation
I hope this helps.
------------------------------
Eslam Ghandour
RPA Developer
------------------------------
