<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Find a layer's data source in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/find-a-layer-s-data-source/m-p/1419302#M4741</link>
    <description>&lt;P&gt;Did you ever find a way to do this using the REST API?&lt;/P&gt;&lt;P&gt;The &lt;A href="https://developers.arcgis.com/rest/enterprise-administration/server/servicemanifest.htm" target="_self"&gt;manifest.json&lt;/A&gt; of the service gives me all the source names, but it doesn't tell me which layer uses which source.&lt;/P&gt;&lt;P&gt;I'd rather not use python since I'd have to install a web server on each and every one of our ArcGIS Server instances (unless there's a way to call a python script directly from the REST API).&lt;/P&gt;</description>
    <pubDate>Mon, 06 May 2024 13:58:26 GMT</pubDate>
    <dc:creator>YohanBienvenue</dc:creator>
    <dc:date>2024-05-06T13:58:26Z</dc:date>
    <item>
      <title>Find a layer's data source</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/find-a-layer-s-data-source/m-p/1113486#M3997</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm struggling to find information showing the relationship/dependency of data source to a layer within a service. Is it possible to call 1, 2 or whatever it takes REST API calls to find what data source (eg. enterprise geodatabase and featureclass) a layer within a service is using?&lt;/P&gt;&lt;P&gt;I know how to get the service's manifest.json which tells me about the enterprise geodatabase, RDBMS, username, etc and what feature classes it references as a collective.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 02:03:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/find-a-layer-s-data-source/m-p/1113486#M3997</guid>
      <dc:creator>AnthonyRyanEQL</dc:creator>
      <dc:date>2021-11-03T02:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Find a layer's data source</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/find-a-layer-s-data-source/m-p/1113524#M3998</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;You can read the mxd or mapx file in the service's directory with arcpy in Python too. You will find database / file source and the layer's ID with which you can make the connection between database and service.&lt;/P&gt;&lt;P&gt;You can find the path to the mxd file in the service properties. Do a loop on all services to have all files of all services.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/guide/managing-your-gis-servers/" target="_self"&gt;Managing GIS Servers with Python&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/fr/pro-app/latest/arcpy/mapping/arcgisproject-class.htm" target="_self"&gt;Work with arcpy and ArcGIS Project&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Create temporary ArcGIS Projec to import service file
aprx = arcpy.mp.ArcGISProject(r"C:\projectArcGISPRO.aprx")
# Import service file with file path in service's properties
aprx.importDocument(filepath)
#List all maps in ArcGIS PRO
mapList = aprx.listMaps()
    for m in mapList:
        #List layers in map
        layerList = m.listLayers()
        for l in layerList:
            if not l.isGroupLayer:
                if l.supports("DATASOURCE"):
                    #Find datasource 
                    datasource = l.dataSource
                    #Find layerID used in service
                    layerID = l.getDefinition('V2').serviceLayerID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 08:18:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/find-a-layer-s-data-source/m-p/1113524#M3998</guid>
      <dc:creator>GaetanPRU</dc:creator>
      <dc:date>2021-11-03T08:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Find a layer's data source</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/find-a-layer-s-data-source/m-p/1147825#M4089</link>
      <description>&lt;P&gt;Thanks for the reply. I have used Python before to get this information but as our environment is cloud based and controlled by a 3rd party company, I don't have access to the original project files and therefore I'm looking for a REST API only solution.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 02:33:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/find-a-layer-s-data-source/m-p/1147825#M4089</guid>
      <dc:creator>AnthonyRyanEQL</dc:creator>
      <dc:date>2022-02-25T02:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Find a layer's data source</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/find-a-layer-s-data-source/m-p/1419302#M4741</link>
      <description>&lt;P&gt;Did you ever find a way to do this using the REST API?&lt;/P&gt;&lt;P&gt;The &lt;A href="https://developers.arcgis.com/rest/enterprise-administration/server/servicemanifest.htm" target="_self"&gt;manifest.json&lt;/A&gt; of the service gives me all the source names, but it doesn't tell me which layer uses which source.&lt;/P&gt;&lt;P&gt;I'd rather not use python since I'd have to install a web server on each and every one of our ArcGIS Server instances (unless there's a way to call a python script directly from the REST API).&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 13:58:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/find-a-layer-s-data-source/m-p/1419302#M4741</guid>
      <dc:creator>YohanBienvenue</dc:creator>
      <dc:date>2024-05-06T13:58:26Z</dc:date>
    </item>
  </channel>
</rss>

