To get the robot name from the orchestrator, try using this API:
Example - https://platform.uipath.com/odata/Sessions?$top=10&$filter=State eq ‘Available’ (gives information such as name, machinename, id, env’s etc… for first 10 robots which are available)
More information here:
https://docs.uipath.com/orchestrator/reference#robots-requests