25-01-23 02:39 PM
25-01-23 09:54 PM
26-01-23 11:55 AM
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.