Support for Portal Directory API aka Sharing API
Opened this issue · 2 comments
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:
- search
- suggest related items (see #97)
- update item info (see Item Info for more info)
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.
- esriitem: https://github.com/elipousson/esri2sf/blob/master/R/esriitem.R
- esriuser: https://github.com/elipousson/esri2sf/blob/c9a535d13d30560f70d8da326fb05cca7928c0dc/R/esriuser.R
- esrisearch: https://github.com/elipousson/esri2sf/blob/c9a535d13d30560f70d8da326fb05cca7928c0dc/R/esrisearch.R
Happy to adapt these for reuse here. Both functions rely on URL validation and parsing approaches that we discussed me adding to arcgisutils per R-ArcGIS/arcgisutils#31
Thanks, @elipousson! This is something that @mmachir has been pushing for. I implemented one of these endpoints in the arc_self_meta()
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.