Select to view content in your preferred language

Issue on Listing Service Service Workspaces Information Using ArcGIS API for Python

299
2
04-10-2024 09:12 AM
BHK
by
New Contributor III

Can someone please let me know how I can get Service Workspaces information of a service using ArcGIS API for Python? I need to get the SDE name and the layers associated with the service. Also I need to see if it is Query Layer or not?

BHK_0-1712765204385.png

I used this to get the properties of the service but looks like

 

folders = ['Streets']

for container in folders:
   services = server1.services.list(folder= container) 
   for service in services:
       print(service.properties)

 

 

but apparently this properties is not returning thoses Admin level information

 

 

0 Kudos
2 Replies
BHK
by
New Contributor III

Does anyone has any idea regarding this post?

0 Kudos
EarlMedina
Esri Regular Contributor

I don't have a reliable way to test this at the moment, but you would expect to find that kind of information in the service manifest. Per the API Reference,

The service manifest resource documents the data and other resources that define the service origins and power the service. This resource will tell you underlying databases and their location along with other supplementary files that make up the service.

 

Instead of "service.properties" you would use "service.service_manifest()" - this function returns JSON with the described information.

0 Kudos