Here are the steps you need to copy the layer from one service to another; i.e., from service1 to service2
1. Create an empty layer (table you need) using service addToDefinition admin API. This will add an empy table or layer to the feature service. You will need to copy the list of fields from the source layer (service1) into the definition below which will live in service2.
help url: Add to Definition (Feature Service)—ArcGIS REST API: Services Directory | ArcGIS for Developers
https://url/ArcGIS/rest/admin/services/<service2>/FeatureServer/addToDefinition
Json to use will look like:
{
"layers" : [
{
"name" : "mylayername",
"type" : "Table", // you can also make a feature layer by using Feature "Feature Layer" instead of "Table
"fields" : [
{
name" : "myFieldName",
// copy the rest from the original layer
} ,
...
]
}
]
}
2. Export the layer from service one into a filegdb.
3. use Update data from the online UX to append the filegdb into the empty layer you created earlier.
By completing 1,2,3 then you have move the table from service 1 to service 2.
Then you will be able to add the relationship as we talked earlier.
Hope that helps.
Khaled