Hello when I make the following request to the Confluence Cloud Api I get a different result every time. How is this possible? We just migrated from the Server to Cloud. When I add a sleep time the result is higher, but also inconsistent. What am I doing wrong? Is somebody facing the same problem when executing the script?
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
from requests.auth import HTTPBasicAuth
import json
from time import sleep
url = "https://<domain>.atlassian.net/wiki/rest/api/content/search?cql=space=<space>"
auth = HTTPBasicAuth("<user>", "<api_key>")
headers = {
"Accept": "application/json"
}
amount = 0
while True:
response = requests.request(
"GET",
url,
headers=headers,
auth=auth
)
json = response.json()
#sleep(10)
amount += len(json["results"])
if "next" in json["_links"]:
url = "https://<domain>.atlassian.net/wiki" + json["_links"]["next"]
else:
break
print(amount)
hi! looks like issue with ordering
I dont know, but when I tried to set the orderBy flag, the problem was the same. Maybe the problem is the internal ordering?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
maybe need to request make a reindex of content
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.