arcgis-python-api icon indicating copy to clipboard operation
arcgis-python-api copied to clipboard

`sources` endpoint for hosted views is not exposed

Open philnagel opened this issue 10 months ago • 0 comments

Is your feature request related to a problem? Please describe. The sources endpoint for hosted feature layer views is not exposed in this package. It would be good to have a way to find the source service of a hosted view.

Describe the solution you'd like For example:

item = gis.contentget(itemid)
if item.isView:
  sources = item.sources()
{'currentVersion': 11.2,
 'services': [{'name': 'survey123',
   'type': 'FeatureServer',
   'url': 'https://services.arcgis.com/orgid/ArcGIS/rest/services/survey123/FeatureServer',
   'serviceItemId': 'sourceItemID'}]}

Describe alternatives you've considered Currently I have to manually retrieve the token and make a request via requests.get to get this information.

Additional context I am not seeing this endpoint documented in the REST docs, but it is exposed in the UI when accessing a REST endpoint of a hosted view. Screenshot 2024-04-19 at 12 14 20 PM

philnagel avatar Apr 19 '24 17:04 philnagel