OneDrive for Business API - Shared with Me - onedrive

I have successfully received a list of items using the OneDrive API, however the items that have been Shared with Me in OneDrive don't appear.
"When a shared folder is added to OneDrive, the folder appears in the root..."
"When enumerating a collection of items, shared folders appear as
items with the remoteItem facet."
https://dev.onedrive.com/misc/working-with-links.htm
It would appear the items in OneDrive's Shared with Me section should be returned with the following method:
GET /drive/root/children
However they aren't.
Is there a separate endpoint for Shared items?

The documentation you referenced is specifically referring to mounting scenarios. Unfortunately there is not currently a way to enumerate items shared with you that are not mounted, but we're definitely aware of the need to have such a mechanism!

Related

OneDrive: Save shortcuts to files and folders shared by Copy Link

We use Office 365 and OneDrive at work. We often share files and folders by generating a link and sharing it rather than using the direct share function. We do it this way so we can include more context and information in an email with a link to the relevant file(s).
When doing that the shared items don't show up in the other users' Shared With Me section. It's challenging to find those files again in the future, we have to search through our emails for where it was originally sent.
Is there a way to save shortcuts to files and folders shared by link?

Using the Quip API, how can you get a list of all threads?

I need to get a list of all publicly-visible Quip documents in my company using the Quip API. I have a service worker account that will make the API calls.
My question: how do I find the root folder to start from?
Quip's API docs tell you how to get info about one or more folders using Get Folders by passing in the folder ids. You can call this again for nested folders, and you can call Get Threads to get information about each document. (Quip uses the terminology "threads," not "documents.")
But where do I start? I need a root folder to start recursing from, right.
Here's what I've tried:
The Get Folders docs say "To find your desktop or archive folder ID, see Get Authenticated User." I've tried that but it returns folders called Desktop, Archive, Starred, Private, Shared, and Group.
Desktop seemed like a good place to start but its only child is Archive, and...
Archive only contains a couple dozen docs. The meaning of the Archive folder is not documented.
Starred is docs you've favorited.
Private is your private docs.
Shared is docs that have been shared with you.
Group seemed promising because the Folders UI at quip.com/browse shows the word "Group Folders" at the top. But my account's Group Folder list is empty.
A bit late to this, but since the QUIP API is poorly maintained and not well documented, for those looking to solve the same problem, here is one way:
Step 1: Add your company's root folder to your favorite (Starred folder), and drag it to the top of the favorite list.
Step 2: Get you authenticated instance:
quip_client = quip.QuipClient(access_token=login_token)
user = quip_client.get_authenticated_user()
print (user)
You will retrieve a json result with basic information like name, id... and most importantly the starred_folder_id for the user.
Step 3: Pass the starred_folder_id to the get_folder method:
print (quip_client.get_folder("starred_folder_id"))
You will receive yet another json with a key named as children which contains values of your starred folders/files in the order it appears on your quip app. The first folder_id will be your company folder id.
You can now use the folder_id to retrieve the rest of your company documents by more get_folder.

Microsoft Graph .NET SDK: Getting items from mycompany.sharepoint.com/Shared%20Documents

Debugging the code, I see the request is like:
https://graph.microsoft.com:443/v1.0/drives/the-shared-docs-id/items/the-root-id/children
I know for sure that the-shared-docs-id and the-root-id are right.
Furthermore, this same request returns the expected results when issued from the Graph explorer.
However, the .NET SDK returns nothing. No items at all.
The same user (me) created the files and folders, and authorized the app to access OneDrive. This user is even the admin of everything.
I was testing with two different apps, one with Files.ReadWrite scope only, and other with Files.ReadWrite.All.
I thought Files.ReadWrite.All was needed to access other user's files. It turns out, it is also needed to access the shared folder, even being the same (admin) user who created the shared items (files and folders), and even having full permissions to access them.
I think this is weird... but it looks like this is the way it is.
Using the app with Files.ReadWrite.All scope, I was able to see the items in the shared folder.
Using the Files.ReadWrite scope, I get an empty list of items.

View all shared folders a member has access to

I've been looking at the Dropbox and Dropbox for Business API and I was trying to see if it would be possible to create a list of all the members and what shared folders they have access to.
I have found a project by Dropbox (Github Source) that lists all the shared folders and which people have access to them. I essentially want to do the opposite, list the users and what folders they have.
I have read through all the API (Core and Business) docs but can't seem to find a way to do it, unless I'm missing something. I also read about a preview of the new API, but again I don't think that is what I want.
Does anyone know if this can be done?
If I understand correctly what you're trying to do, you just need to call /shared_folders for each member of the team.
(You can list the members of the team via /team/members/list.)

Is it possible to know the folder content? OneDrive

I wanna try OneDrive Api for Android and I was taking a look at the methods and possibilities this Api offers on this link and this other one but I don't see any way of listing the files a folder contains.
My App would need to upload some files to OneDrive, always using the same folder as root, say /MyFolder. The problem is that it only knows this root folder and all its content must be found out by means of recursive calls, that is, I list the files contained in /MyFolder and check if it's a folder or a file and in the first case list the files again it contains and so on.
Am I missing something or this Api doesn't provide such thing?
The Json object returned for a query against a Folder should contain a "data" property that is an array of children for the folder. You can see this in the interactive SDK (http://isdk.dev.live.com/dev/isdk/default.aspx) by playing with the "Reading Folder Properties" API.