When you do a REST call you define an import mapping. And you can use the result as a variable. In your example when you trigger this call you get a list of Departments in return. If you have chosen to commit the objects these objects are then already in your database.
Regards,
Ronald