I'm not sure what
requests is, but here is an example of a curl command using the query paged endpoint:
curl 'https://server/rest/orgs/202/incidents/query_paged?return_level=partial' -H 'Cookie: _ga=GA1.2.310013028.1554732927; CSRF_TOKEN=7b2276616c7565223a226265313261663836313362393534313563316161343264656366393661666633227d; JSESSIONID=61B558A4E7CCFAE7C22BBDCBE573584D' -H 'handle_format: objects' -H 'Content-Type: application/json; charset=UTF-8' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'X-sess-id: 5ed84e5954aadbd01f7b5514d3ab9b16' -H 'Connection: keep-alive' --data-binary '{"filters":[],"start":0,"length":1}' --compressed --insecure
This returns the following:
{"recordsTotal":707,"recordsFiltered":707,"data":[{"name":"inc1 v1 by temp user1","description":null,"phase_id":{"id":1013,"name":"Initial"},"inc_training":false,"id":26214,"discovered_date":1565123397022,"due_date":null,"create_date":1565123476355,"owner_id":{"id":232,"name":"jones@foobar.com","type":"user","display_name":"Jones Smith"},"severity_code":null,"plan_status":"A"}]}
Notice the recordsTotal, which is what I think you are looking for.
------------------------------
Ben Lurie
------------------------------