简体   繁体   中英

In AtTask, how can I get a list of documents not in a folder?

I've created a query to pull a list of documents, and I'd like to limit the request to only those that aren't in a folder. I have other logic that pulls documents for each folder in order to maintain the folder structure. I was hoping that something like this would work: /attask/api/v4.0/document/search?projectID=XXX&fields=folders:name_Mod=isnull , but the Mod operators don't appear to work on collections. Is there another modifier for working with collections to see that they're empty? Or another way to say "Give me all documents for this project that don't have a folder? I've looked at all the data elements and am not seeing anything else that might work.

My fallback position will be to iterate through the folders and files first, storing an array of the IDs I've already downloaded so I don't re-download them, but would prefer something that actually tells me which folders are in the root of a project and not in any folder. I figure there must be a way to do this, as the AT UI renders it properly, but I might be missing something.

Try adding folders_Join=allowingnull. Usually our private collections on objects are only populated if there is information for them, in this case you want the opposite.

attask/api-internal/docu/search?projectID=5314e38b00000003b76ff5980a142082&folders:name_Mod=isnull&&folders_Join=allowingnull

Hope that helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM