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:
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 theget_folder
method: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 yourquip
app. The firstfolder_id
will be your company folder id.You can now use the
folder_id
to retrieve the rest of your company documents by moreget_folder
.