i can only cql anonymous pages. i am using the python3 requests module.
import requests
import json
from requests.auth import HTTPBasicAuth
auth = HTTPBasicAuth("username","password")
url = "https://confluenceurl/confluence/rest/api/content/search"
headers = {"Content-type": "application/json"}
data='cql=(space.title ~ "anythinghere")
response = requests.request("GET",url,headers=headers,auth=auth, params=data, verify=False)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
i also tried adding the token in the headers:
{'results': [], 'start': 0, 'limit': 25, 'size': 0, 'cqlQuery': '(space.title ~ "whatimlookingfor")', 'searchDuration': 56, 'totalSize': 0.....
any help is appreciated.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.