<?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: Get data sources that are used by ArcGIS Server map services with Python (Alex Tereshenkov) in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/get-data-sources-that-are-used-by-arcgis-server/m-p/28423#M1020</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the service have multiple layers using different connections? &amp;nbsp;I'm not sure of the format of the JSON that's returned, but there's a list somewhere in there that you'll need to loop through. &amp;nbsp;I would print the data variable and see what it stores.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Dec 2016 21:54:14 GMT</pubDate>
    <dc:creator>JonathanQuinn</dc:creator>
    <dc:date>2016-12-05T21:54:14Z</dc:date>
    <item>
      <title>Get data sources that are used by ArcGIS Server map services with Python (Alex Tereshenkov)</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/get-data-sources-that-are-used-by-arcgis-server/m-p/28422#M1019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paging Alex Tereshenkov!&amp;nbsp; I'm trying to run your script located here:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://tereshenkov.wordpress.com/2016/11/02/get-data-sources-that-are-used-by-arcgis-server-map-services-with-python/" title="https://tereshenkov.wordpress.com/2016/11/02/get-data-sources-that-are-used-by-arcgis-server-map-services-with-python/"&gt;Get data sources that are used by ArcGIS Server map services with Python | Tereshenkov's Blog&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I'm getting an error when I get to here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;def get_connection(data):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '''return database connection string for the service'''&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return data['SVCManifest']['Databases']['SVCDatabase']['OnPremiseConnectionString']&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;TypeError: list indices must be integers, not str&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&amp;nbsp; This looks very useful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2016 23:00:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/get-data-sources-that-are-used-by-arcgis-server/m-p/28422#M1019</guid>
      <dc:creator>KevinBell</dc:creator>
      <dc:date>2016-12-01T23:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get data sources that are used by ArcGIS Server map services with Python (Alex Tereshenkov)</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/get-data-sources-that-are-used-by-arcgis-server/m-p/28423#M1020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the service have multiple layers using different connections? &amp;nbsp;I'm not sure of the format of the JSON that's returned, but there's a list somewhere in there that you'll need to loop through. &amp;nbsp;I would print the data variable and see what it stores.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2016 21:54:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/get-data-sources-that-are-used-by-arcgis-server/m-p/28423#M1020</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2016-12-05T21:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get data sources that are used by ArcGIS Server map services with Python (Alex Tereshenkov)</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/get-data-sources-that-are-used-by-arcgis-server/m-p/28424#M1021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp; I am also having this problem.&amp;nbsp; I with some help I have found that&amp;nbsp;return data['SVCManifest']['Databases']['SVCDatabase'][0]['OnPremiseConnectionString'] works.&amp;nbsp; Note [0] is the first in a list.&amp;nbsp; Does any have code to loop through it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2019 17:16:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/get-data-sources-that-are-used-by-arcgis-server/m-p/28424#M1021</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-01-16T17:16:29Z</dc:date>
    </item>
  </channel>
</rss>

