1

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.

Rosmarine Popcorn
  • 10,761
  • 11
  • 59
  • 89
joefox97
  • 59
  • 7
  • This question appears to be about using a user-facing search feature in a web application, not programming. And project management software is not specifically a developer tool. – Ben Voigt Feb 27 '14 at 14:56
  • Sorry, you're incorrect. This is for pulling down those files using their API using C# (hence the tags). – joefox97 Feb 27 '14 at 15:10
  • Calling a URI query string an "API" is really stretching it. And slapping a `c#` tag on a question that has no code, no mention of programming, and no sign of C# or .NET anywhere does not magically make the question on topic. It doesn't appear that you have any question about how to use C# to perform an HTTP GET request or retrieve the response. That would be on-topic here. You simply don't know what GET request to enter in your HTTP client. Whether that client is Internet Explorer, Firefox, or your own C# code is really beside the point. Your problem is with the web application. – Ben Voigt Feb 27 '14 at 16:58
  • I appreciate your input @BenVoigt but this is the forum by which the AtTask development team respond to queries about their software's functionality. The documentation for the API doesn't contain this information. I do know how to create the request and retrieve the results in C#, so the question isn't C# specifically, but since the language I'm using for writing the app is C#, I've tagged it as such as that MAY impact the response (although that's unlikely). As there's much more to their API than this one method (it's a RESTful API, so they are all URi calls, really), your comment is invalid. – joefox97 Feb 27 '14 at 19:12

1 Answers1

1

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.

  • Thanks, Ryan! What is api-internal in the URL? I've been using either api or api/v4.0/. With those, it didn't work, but with api-internal, it is returning the expected result. – joefox97 Mar 07 '14 at 14:15
  • 1
    api-internal functions exactly like api-unsupported (and actually you should be using api-unsupported) in that it represents an unsupported api version meaning the functionality could change. It appears what you are wanting is relatively new functionality added to the system and has not yet made it into an officially versioned API. – Ryan Hamilton Mar 07 '14 at 20:23