According to the response parameters at Get Groups API Response- Confluence Cloud, the shouldReturnTotalSize boolean should be supported, and when set to True, it should return totalSize.
However,
import requests
from requests.auth import HTTPBasicAuth
import json
import csv
url = "https://xxxx.atlassian.net/wiki/rest/api/group"
auth = HTTPBasicAuth("myname@xxxx.com", "abcdefghijklomnop")
headers = {
"Accept": "application/json",
}
response = requests.request(
"GET",
url,
headers=headers,
auth=auth,
params= {
'start': 0,
'limit': 2,
'shouldReturnTotalSize': True
}
)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
returns the following, missing totalSize. Please assist!
"_links": {
"base": "https://xxxx.atlassian.net/wiki",
"context": "/wiki",
"next": "/rest/api/group?next=true&limit=2&start=2&shouldReturnTotalSize=True",
"self": "https://xxxx.atlassian.net/wiki/rest/api/group?shouldReturnTotalSize=True"
},
"limit": 2,
"results": [
{
"_links": {
"self": "https://sonosinc-sandbox-559.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "d58844de-702b-4d51-a640-d34c4e6be24b",
"name": "system-administrators",
"type": "group"
},
{
"_links": {
"self": "https://sonosinc-sandbox-559.atlassian.net/wiki/rest/experimental/group/confluence-users-sonosinc-sandbox-559"
},
"id": "ea750de6-8025-4a49-bdda-63df0a3b2dc7",
"name": "confluence-users-sonosinc-sandbox-559",
"type": "group"
}
],
"size": 2,
"start": 0
}