Does anyone have a sample Workbench (WB) for creating a replica using the ArcGIS REST API?
Your question is too general to give an answer. What do you want to copy? All metadata from your portal items, your users, your Groups. features of all services, features in a single service, features in a specific sublayer of a service? Please specify. Also what you are asking is generally a lot of work and if people don't watch out they might share sensitive information.
Have you looked at the Esri documentation on creating replicas? https://developers.arcgis.com/rest/services-reference/enterprise/create-replica/
In its simplest implementation you'd using an HTTPCaller and call the above endpoint.
Aligning with what
I would like to copy all features including attachment into a filegeodatabase. I was able to generate the token and create a replica using httpcaller but was stock downloading it to filegeodatabase.
Thanks for the additional info. Are you stuck because you don't know the call you need to download the FGDB or do you have the call and the Httpcaller transformer is not giving you the response you want (i.e. crashing or error messages)?
I don't have any experience with creating replica's, personally I use the export option on hosted feature layers and I do know how to download after that. I can give you an example httpcaller for the download but I'm still not quite sure what you need.