HOW TO

Identify the database source of a service in ArcGIS Enterprise using API for Python

Last Published: March 5, 2025

Summary

A service can be published to ArcGIS Server from multiple sources, for example, from ArcGIS Pro or direct file uploads to Portal for ArcGIS. Refer to ArcGIS Enterprise: Publish in ArcGIS Enterprise for more information. To identify a database source, users can manually check the manifest.json file in the following directory:

C:\arcgis\arcgisserver\config-store\services\<Service Folder>\<Service Name>\esriinfo\manifest

Another way to identify the database source of a service is using ArcGIS API for Python. This article provides the workflow to identify the database source of a service using a Python script.

Procedure

  1. Import the necessary modules.
from arcgis.gis import GIS
import pprint
  1. Specify the credentials for the portal and connect.
gis = GIS('https://<machine>.<domain>/<web adaptor name>', 'username', 'password', verify_cert=False)
print('Connected')
  1. List the available servers in the portal.
servers = gis.admin.servers.get(role="HOSTING_SERVER")
print(servers)
  1. Specify the folder containing the services and select the service. The following example demonstrates the first service in the folder.
server1 = servers[0]
services = server1.services.list(folder="<Folder Name>")
service = services[0]
  1. Get the service information and properties, and return the result in the console.
ii = service.iteminformation
manifest = ii.manifest
pprint.pprint(manifest)

properties = ii.properties
pprint.pprint(properties)

The code block below demonstrates the full working script.

from arcgis.gis import GIS
import pprint

gis = GIS('https://machine.esri.com/portal', 'username', 'password', verify_cert=False)
print('Connected')

servers = gis.admin.servers.get(role="HOSTING_SERVER")
print(servers)

server1 = servers[0]
services = server1.services.list(folder="Test_Folder")
service = services[0]

ii = service.iteminformation
manifest = ii.manifest
pprint.pprint(manifest)

properties = ii.properties
pprint.pprint(properties)

Article ID: 000028180

Software:
  • Portal for ArcGIS
  • ArcGIS Server

Get support with AI

Resolve your issue quickly with the Esri Support AI Chatbot.

Start chatting now

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Start chatting now

Go to download options