> testxcst wrote:
> Hello vikasgirnar,
1 - have you used the 'count' parameter ?
2 - I have the same problem regarding getting some informations about a file : the queryFolder API service accepts a search pattern in its 'query' parameter, but this presents limitations.
Imagine you have a folder with 3 files 'foo', 'foo1', foo10'.
Querying folder with query='foo' returns 3 files.
Querying folder with query='foo1' returns 2 files (foo1, foo10).
So if you have a folder containing many fooXXXX files, how do you retrieve 'foo' ?
I have encountered other limitations as well, if filename contains unusual characters : queryFolder may return several results, or no result at all (ie if filename contains a '*')...
#1 About the count parameter
The count parameter is useful together with the offset parameter if you want to paginate your query.
For example, page 1:
#2 About searching for files by name
The query parameter is looking for exact matches you do not use the *, ie:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
Returns only the file 'foo'.
If you instead set it to 'title:foo*' it will return all files starting with 'foo'.
Edit: Using the quotes <query>"foo"</query> instead of <query>title:foo</query> also works.
#3 About the * in filenames
If you have files containing the star character, there may be some issues. I would strongly suggest you to avoid * in the filename, eventhough it's allowed.
If you name a file 'foo*' and search for it, you will indeed get all files starting with exactly that (see answer for #2). There is no escape for it.