I am using both Postman and Javascript to query the Confluence API on a Cloud atlassian.net account.
When I use +
in places of the spaces for CQL it works for me (so this isn't a matter of working out authorization - this works!!):
https://mycompany.atlassian.net:443/confluence/rest/api/content/search?os_authType=basic&cql=type=page+and+space+in+(DEV,OPS)+and+title+~+deploy
However using spaces does not:
https://mycompany.atlassian.net:443/confluence/rest/api/content/search?os_authType=basic&cql=type=page and space in (DEV,OPS) and title ~ deploy
Nor does the encoded version:
https://mycompany.atlassian.net:443/confluence/rest/api/content/search?os_authType=basic&cql=type=page%20and%20space%20in%20(DEV,OPS)%20and%20title%20~%20deploy
They both result in:
{
"statusCode": 400,
"data": {
"authorized": false,
"valid": true,
"errors": [],
"successful": false
},
"message": "Could not parse cql : type=page%20and%20space%20in(DEV,OPS)%20and%20title~deploy"
}
Based on the documentation I see no mention of needing to use the +
I was only able to gleen this based on the discussion following a question on Atlassian Answers.
The pluses are fine, but I need to use the fuzzy search to search multiple terms so things like:
title+~+deploy+my+app
Will result in:
"message": "Could not parse cql : type=page%20and%20space%20in(DEV,OPS)%20and%20title~deploy my app"
and:
title+~+"deploy+my+app"
Will result in:
"message": "Could not parse cql : type=page%20and%20space%20in(DEV,OPS)%20and%20title~%22deploy my app%22"
Is there a way to search a multi-word string for this cloud application?