I am attempting Advanced Search using the Confluence API, and I am experiencing the following problems.
(NOTE: When publishing this topic, the forum made changes to the HTML links below because it said they were invalid. I hope they didn't change them too much!!!)
If I surround two or more conditions in the URL with parenthesis, an error is returned
THIS WORKS (no parenthesis):
· http://wiki.intra.lutron.com/rest/api/content/search?cql=type=attachment&title="EODB"
THIS WORKS (parenthesis around each criteria):
· http://wiki.intra.lutron.com/rest/api/content/search?cql=(type=attachment)&(title="EODB")
THIS DO NOT WORK (parenthesis around BOTH criteria):
· http://wiki.intra.lutron.com/rest/api/content/search?cql=(type=attachment&title="EODB")
· {"statusCode":400,"data":{"authorized":false,"valid":true,"errors":[],"successful":false},"message":"Missing closing parenthesis near field (()"}
THIS DO NOT WORK (parenthesis around each and BOTH criteria):
· http://wiki.intra.lutron.com/rest/api/content/search?cql=((type=attachment)&(title="EODB"))
· {"statusCode":400,"data":{"authorized":false,"valid":true,"errors":[],"successful":false},"message":"Could not parse cql : ((type=attachment)"}
If I use more than one criteria, it seems that some criteria are not executed
· http://wiki.intra.lutron.com/rest/api/content/search?cql=type=attachment&title="EODB"&limit=200
· This returns 200 records (when it should return 0) because the titles were not filtered to only include the file titled "EODB".
· It seems that the type and limit were executed, but title was not
· Examples of the titles returned include:
· SeeTouchExample.pdf
· DEPRECATED_Application_(GUI)_Software_Release_Authorization.xlsx
· image2016-10-7 16:30:12.png
· image2017-12-1_17-33-38.png
· image2017-12-1_17-33-59.png
· image2017-12-4_9-6-15.png
· http://wiki.intra.lutron.com/rest/api/content/search?cql=title="EODB"&type=attachment&limit=200
· This returns no records (which is correct), and all I did was swap the order of TYPE and TITLE
Wildcards do not seem to work:
· http://wiki.intra.lutron.com/rest/api/content/search?cql=title="EODB*"
· http://wiki.intra.lutron.com/rest/api/content/search?cql=title~"EODB*"
· Both of these return an empty set
· http://wiki.intra.lutron.com/rest/api/content/search?cql=title~"EODB"
· Returns 3 records, as expected
Please help…
Thanks!
Mike