我同时使用 Postman 和 Javascript 来查询 Cloud atlassian.net 帐户上的 Confluence API。
当我+
在 CQL 空间的地方使用它时,它对我有用(所以这不是制定授权的问题 - 这有效!!):
https://mycompany.atlassian.net:443/confluence/rest/api/content/search?os_authType=basic&cql=type=page+and+space+in+(DEV,OPS)+and+title+~+deploy
但是使用空格不会:
https://mycompany.atlassian.net:443/confluence/rest/api/content/search?os_authType=basic&cql=type=page and space in (DEV,OPS) and title ~ deploy
编码版本也没有:
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
它们都导致:
{
"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"
}
根据文档,我看不到需要使用的内容,+
我只能根据Atlassian Answers 上的问题后的讨论来了解这一点。
优点很好,但我需要使用模糊搜索来搜索多个术语,例如:
title+~+deploy+my+app
将导致:
"message": "Could not parse cql : type=page%20and%20space%20in(DEV,OPS)%20and%20title~deploy my app"
和:
title+~+"deploy+my+app"
将导致:
"message": "Could not parse cql : type=page%20and%20space%20in(DEV,OPS)%20and%20title~%22deploy my app%22"
有没有办法为这个云应用程序搜索一个多字串?