Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you do a wildcard search instead of supplying a feature layer's name in the URL for arc.open()? #93

Open
Walshe-d opened this issue Aug 28, 2024 · 1 comment

Comments

@Walshe-d
Copy link

This is an improvement/question not a bug. I have tried to search for this functionality or a work around but I haven't been able to find anyone else who wants to do this.

I am using this package to create local copies of geodatabases as backups that are currently stored in Arcgis online. I think it would be great if you could do a wildcard search for all the layers with a key term(s) in the feature layer's name so that you could loop through each layer and download them.

For example, I have three layers all associated with one project: Project1_Feature_Layer1, Project1_Feature_Layer2, Project1_Feature_Layer3 and the the current process is to specify the layer name as such:
flayer1 <- arc.open("https://arcgis.com/insert_your_service/arcgis/rest/services/Project1_Feature_Layer1/FeatureServer/0")
flayer2 <- arc.open("https://arcgis.com/insert_your_service/arcgis/rest/services/Project1_Feature_Layer2/FeatureServer/0")
flayer3 <- arc.open("https://arcgis.com/insert_your_service/arcgis/rest/services/Project1_Feature_Layer3/FeatureServer/0")

However if we could search for all layers associated with the Project with a wildcard such as something like this:
flayers <- arc.search("https://arcgis.com/insert_your_service/arcgis/rest/services/Project1*/FeatureServer/")
that would make looping through each layer a lot easier.

Is this already built in and I've missed it? Is it possible to do?

@scw
Copy link
Member

scw commented Aug 28, 2024

Nice thought! I think the arcgislayers package is the right place for this functionality since it has aspirations to cover more workflows related to interacting with the REST API than arcgisbinding itself does. There's an issue for search here: R-ArcGIS/arcgislayers#22

If you wanted to do this today with existing code, you might look at the Python API which has the capabilities to search and download today, here's an example backing up services that might prove useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants