Not sure your use case. But perhaps just grab this info from the database. Have you checked out the "BPAResource" table? Think its the same or very similar..
Example below.
/****** BP Workforce_Avail SQL ******/
SET TRANSACTION ISOLATION LEVEL SNAPSHOT
select resourceid as ResourceID
, [BluePrism62AD-2].[dbo].[BPAResource].name as Name
/*, status as Status*/
, DisplayStatus as DisplayStatus
, [BluePrism62AD-2].[dbo].[BPAResourceAttribute].AttributeName
, processesrunning as ProcessesRunning
, actionsrunning as ActionsRunning
, unitsallocated as UnitsAllocated
,[BluePrism62AD-2].[dbo].[BPAProcess].name AS Process_Automation
,[BluePrism62AD-2].[dbo].[BPASession].startdatetime
,[BluePrism62AD-2].[dbo].[BPASession].enddatetime
,[BluePrism62AD-2].[dbo].[BPASession].processid
,[BluePrism62AD-2].[dbo].[BPASession].laststage
,[BluePrism62AD-2].[dbo].[BPASession].lastupdated
FROM [BluePrism62AD-2].[dbo].[BPAResource]
LEFT join [BluePrism62AD-2].[dbo].[BPAResourceAttribute] on [BluePrism62AD-2].[dbo].[BPAResource].AttributeID = [BluePrism62AD-2].[dbo].[BPAResourceAttribute].AttributeID
LEFT join [BluePrism62AD-2].[dbo].[BPASession] on [BluePrism62AD-2].[dbo].[BPASession].runningresourceid = [BluePrism62AD-2].[dbo].[BPAResource].resourceid
LEFT join [BluePrism62AD-2].[dbo].[BPAProcess] on [BluePrism62AD-2].[dbo].[BPASession].processid = [BluePrism62AD-2].[dbo].[BPAProcess].processid
WHERE ([BluePrism62AD-2].[dbo].[BPASession].sessionnumber in (
select max(sessionnumber) from [BluePrism62AD-2].[dbo].[BPASession] group by runningresourceid))
ORDER BY [BluePrism62AD-2].[dbo].[BPAResource].name DESC
------------------------------
Philip Trovato
------------------------------