I've written a very quick PHP script using that API and it appears to meet our needs:
echo "Using Production environment.<br>".PHP_EOL;
$sessionKey = CallSiginAPI(<OurURLandTenentID>);
$domainURL = "https://developer.prod-au.cayuse.com/v1/";
$authorization = "Authorization: Bearer ".$sessionKey;
$usersURL = $domainURL."users";
$response = CallAPI("GET", $usersURL, $authorization);
$decoded_json = json_decode($response, false);
$totalPages = $decoded_json->page->totalPages;
/* Get all pages */
$usertext = "Username,Name,Roles".PHP_EOL;
for ($currentPage = 0; $currentPage <= $totalPages; $currentPage++)
{
$response = CallAPI("GET", $usersURL."?page=".$currentPage, $authorization);
$decoded_json = json_decode($response, true);
$users = $decoded_json['users'];
foreach($users as $user)
{
if ($user['active'] != 1)
{
$usertext=$usertext.$user['username'].",".$user['firstName']." ".$user['lastName'].",";
$userid = $user['id'];
$response2 = CallAPI("GET", $usersURL."/".$userid."/"."roles", $authorization);
$decoded_roles_json = json_decode($response2, true);
$roles = $decoded_roles_json['user-group'];
foreach($roles as $role)
{
$usertext=$usertext.$role["groupGroupName"].",";
}
$usertext=$usertext.PHP_EOL;
}
}
}
file_put_contents($filename, $usertext);
echo "Done.";
------------------------------
William Clarke
Programmer Analyst & Team Leader
University of Southern Queensland
------------------------------
Original Message:
Sent: 08-08-2023 13:51
From: William Clarke
Subject: HRConnect/Admin - Is there an API to query User Data in Cayuse Admin?
Thanks very much Simon, that sounds like it could cover what we need.
------------------------------
William Clarke
Programmer Analyst & Team Leader
University of Southern Queensland
Original Message:
Sent: 08-08-2023 11:27
From: Simon Helton
Subject: HRConnect/Admin - Is there an API to query User Data in Cayuse Admin?
Hi William and Isabella,
Thanks for the question! I asked the folks in the know, since this is beyond my technical expertise, and this is what I was told:
First, our public API is documented here: https://app.swaggerhub.com/apis/CayuseLLC/CayusePublicApi
More specific to your question, we have retrieve roles for a user by user ID. You would first retrieve a list of users (so you'd have all users' IDs), then GET the roles for those users by ID.

I hope this is helpful. Let me know if there's anything this doesn't cover!
Simon
------------------------------
Simon Helton
He/him
Community Manager
Cayuse
Original Message:
Sent: 08-07-2023 23:23
From: William Clarke
Subject: HRConnect/Admin - Is there an API to query User Data in Cayuse Admin?
Hi All,
I was wondering if there is an API to query User Data in Cayuse Admin?
We're using the HRConnect API to load Units, Users, Roles and Internal Associations. But we'd like to be able to audit User-Role assignments and similar data, is there an API available to extract this information, especially as some data of this is managed manually by the operational team.
Thanks
------------------------------
William Clarke
Programmer Analyst & Team Leader
University of Southern Queensland
------------------------------