Select to view content in your preferred language

Temporal Extent for ArcGIS API's

89
1
Tuesday
Labels (1)
LukeFarchione
New Contributor

Hi all! This is my first post here. 

I have a catalog of ArcGIS API's and their endpoints. 

Is there any way to talk to these endpoints and pull out the temporal extent of the data that's held at that endpoint? Thanks for any information

0 Kudos
1 Reply
David_McRitchie
Esri Contributor

Hey Luke,

I think it would depend how we are accessing these endpoints. I would look to add these to ArcGIS Online/Enterprise as a URL item then see if you can use the following code sample to pull the extent out from the Layer ID.

 

from arcgis.gis import GIS
from arcgis.features import FeatureLayer
gis = GIS("home")

serviceId = "<INSERT LAYER ID>"
serviceItem = gis.content.get(serviceId)
serviceItem

print(serviceItem.extent)

 

If that doesn't work then I imagine that creating a Feature Layer from the endpoint and querying the extent from this will be the way forward.

Hope that helps,

David

Esri UK -Technical Support Analyst
0 Kudos