nvm, figured it out, leaving it here for anyone else to see:
using "Run PowerShell" script to call the RESTAPI:
Use TSEnvironment or Powershell to get Devicename, then:
$DeviceName = "Test01"
$URL = "https://SITESERVER/AdminService/v1.0/Device?$filter=startswith(Name,'$Device')"
$DeviceInf = Invoke-RestMethod -Method 'GET' -Uri $URL -Credential $Credentials
$DeviceResourceID = $DeviceInf.value | select -ExpandProperty MachineId