R-ArcGIS / arcgislayers

ArcGIS Location Services
http://r.esri.com/arcgislayers/
Apache License 2.0
38 stars 9 forks source link

Support for Portal Directory API aka Sharing API #204

Open elipousson opened 1 month ago

elipousson commented 1 month ago

Is your feature request related to a problem? Please describe.

The Portal Directory API aka Sharing API supports a lot of useful features for interacting with items on ArcGIS Online (distinct from the underlying Tables and FeatureServers).

Describe the solution you'd like

Key features supported by this API that would be useful to support include:

The API also can interact with groups, portals, and sharing.

Describe alternatives you've considered

This could be implemented in a separate package but, given the common confusion between item URLs for a single FeatureLayer and the FeatureLayer URLs themselves, I think it may be easier for users to have the API implemented within this package.

Additional context

There are several existing esri2sf functions that I wrote to implement parts of this API.

Happy to adapt these for reuse here. Both functions rely on URL validation and parsing approaches that we discussed me adding to arcgisutils per https://github.com/R-ArcGIS/arcgisutils/issues/31

JosiahParry commented 1 month ago

Thanks, @elipousson! This is something that @mmachir has been pushing for. I implemented one of these endpoints in the arc_self_meta()

elipousson commented 1 month ago

Glad to hear other folks are pushing for it too! When we chatted about feature ideas in advance of the next CRAN release, I got a bit mixed up myself between the update item info feature supported by this API and the update definition layer for the services API.

I'll try to prioritize a PR for the URL validation in the next week or two since, if the package supports both item URLs and FeatureServer URLs, some URL validation that helps people figure out when they've provided their URL to the wrong function is essential IMHO.