How To Create Users And Machines And Assign Them To A Folder With The Help Of API ?

How to create users and machines and then assign them to a folder with the help of API ?

Issue Description: The below actions need to be performed via API for each Robot,

  1. Create the user with an Unattended Robot
  2. Create a machine corresponding to this Robot
  3. Assign the user to the shared folder
  4. Assign the machine to the shared folder



Resolution: No one single API call can achieve this. It can be achieved by using the following API's,

  • POST /odata/Users
  • POST /odata/Machines
  • POST /odata/Folders/UiPath.Server.Configuration.OData.AssignDomainUser or POST /odata/Folders/UiPath.Server.Configuration.OData.AssignUsers
  • POST /odata/Folders/UiPath.Server.Configuration.OData.AssignMachines .