[API] List user details

We are currently migrating away from another system and are planning to user Nextcloud.
I am working on a realtime API integration and noticed there seems no way of returning a user list with all userdetails (Displayname, E-Mail etc…).
Is there any way of requesting all details without spamming the server with say 1000 single requests?

Okay Ive found a way but it seems that the API have a BUG.

Use: /ocs/v2.php/cloud/users/details

However when us use this the XML seems scrambled.

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>200</statuscode>
  <message>OK</message>
 </meta>
 <data>
<users>
<enabled>1</enabled>
   *REDACTED*
   </backendCapabilities>
  </users>
  <enabled>1</enabled>
  1. Notice where the tag starts and ends.
  2. Notice that the enabled TAG is inside the
  3. Notice that for the SECOND USER the enabled tag ist outside of the user

The XML is also not parsable!

Workaround: /ocs/v2.php/cloud/users/details?format=json