I know how to duplicate a layer in ArcMap and then republish to a feature service and it will create two layers with different layer IDs. But can I do the same on ArcGIS online without using ArcMap?
You can export an existing hosted feature layer to a CSV, FGDB, Shapefile and then re-publish that item as a new feature service.
Are you wanting to have two published Feature Services? Or are you wanting to use one Feature Service more than one time?
I would like to have two identical layers against the same data source on ArcGIS online. It could be two layers on one feature service or two feature services. Both solutions are ok as long as it's created it step-wise; first one layer and later on add a second identical layer, third identical layer against the same data source. They will be managed in a web application and where the user can add individual filters per layer.
I know how to do this in ArcMap, simply by copy the layer from the same feature class and then re-publish to the same feature service or to a new feature service. But I'm not sure how it can be done without ArcMap, on ArcGIS online.
Have you tried just adding the same service to your web map several times? Either through searching for it within your organization or just through adding the service from the web with its web link? Or is that not what you were intending?
Sorry no, I will not use web maps.
The web application that we implement consumes geodata from the REST feature services and map services and not by using web maps.
I understand. In theory, couldn't you consume the same rest service for each feature service or map service by listing the URL to that service more than one time? I am not sure how your application is looking or how it is formatted.
Yes, to allow same REST service URL and layer ID in our web application, will solve the problem. We tested that too, yesterday. But it gave us some other unwanted issues in the web application. Maybe we will have to remove this restriction and fix those issues.
Retrieving data ...