arcgis-python-api
arcgis-python-api copied to clipboard
`sources` endpoint for hosted views is not exposed
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.