<?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: Can the Python API be used in a Web Tool for managing Portal Items? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/842428#M3569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've decided to go with a server side python web deployment.&amp;nbsp; I am wondering if there is a way to register the portal somehow for this to work in a web tool.&amp;nbsp; I've not found any documentation stating either way.&amp;nbsp; I was thinking the federation would be registering a connection, but perhaps its just not supported to begin with?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Mar 2020 13:11:05 GMT</pubDate>
    <dc:creator>RichardHughes2</dc:creator>
    <dc:date>2020-03-25T13:11:05Z</dc:date>
    <item>
      <title>Can the Python API be used in a Web Tool for managing Portal Items?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/842427#M3568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've created a Script Tool in ArcPro 2.5 that uses the Python API to manage hosted layers.&amp;nbsp; It is not passing the Analyze step in the Web Tool publishing workflow to publish to Portal 10.8.&amp;nbsp; The line where the GIS is being declared is causing a broken project data source error.&amp;nbsp; This is a real bummer.&amp;nbsp; I think I have to scrap this entire model.&amp;nbsp; It is simple, but very&amp;nbsp;critical for copying an empty hosted layer in Portal to a new service for&amp;nbsp;a user to edit in a web app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts on whether the Python API can be used in a GP Service?&amp;nbsp; My alternatives are a custom server side app or the javascript api and do it all in the widget.&amp;nbsp; This solution of the python API would be perfect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2020 17:04:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/842427#M3568</guid>
      <dc:creator>RichardHughes2</dc:creator>
      <dc:date>2020-03-24T17:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can the Python API be used in a Web Tool for managing Portal Items?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/842428#M3569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've decided to go with a server side python web deployment.&amp;nbsp; I am wondering if there is a way to register the portal somehow for this to work in a web tool.&amp;nbsp; I've not found any documentation stating either way.&amp;nbsp; I was thinking the federation would be registering a connection, but perhaps its just not supported to begin with?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2020 13:11:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/842428#M3569</guid>
      <dc:creator>RichardHughes2</dc:creator>
      <dc:date>2020-03-25T13:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can the Python API be used in a Web Tool for managing Portal Items?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/842429#M3570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you succeeded with publishing your workflow to portal? Can you describe your workaround? I have run into the same issue lately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/253890-error-00068-broken-data-source-when-trying-to-publish-web-tool-with-portal-connection"&gt;https://community.esri.com/thread/253890-error-00068-broken-data-source-when-trying-to-publish-web-tool-with-portal-connection&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2020 11:57:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/842429#M3570</guid>
      <dc:creator>MarkusBenninghoff</dc:creator>
      <dc:date>2020-06-01T11:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Can the Python API be used in a Web Tool for managing Portal Items?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/842430#M3571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using a restAPI python server app, makes a request to a url and runs python api code to create a new service and layer from an empty hosted feature layer in Portal, then passes the url of the new layer back to the client so it can be edited.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To create the new hosted feature layer from an existing empty hosted feature layer I am using&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;target_item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; template_layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;copy_feature_layer_collection&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layout_name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 layers&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;layer_index&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 description&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"New Layer Created From Template"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 owner&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;target_user&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;username&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;/PRE&gt;&lt;P&gt;I've not attempted this as a GP Service / WebTool again recently though to see if&amp;nbsp;this data type is supported.&amp;nbsp; It is something I will be testing again soon though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:18:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/842430#M3571</guid>
      <dc:creator>RichardHughes2</dc:creator>
      <dc:date>2021-12-12T10:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can the Python API be used in a Web Tool for managing Portal Items?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/1077907#M6343</link>
      <description>&lt;P&gt;I've recently found that the Web Tools published from ArcPro 2.7.1 do allow the GIS object to be created.&amp;nbsp; This might work with previous versions as well.&lt;/P&gt;&lt;P&gt;The trick is that the Portal URL has to be provided as a user parameter to the script tool.&amp;nbsp; Otherwise, the Analyze step fails with a broken Project Data Source if the Portal URL is hardcoded.&lt;/P&gt;&lt;P&gt;This is a game changer.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 17:20:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/1077907#M6343</guid>
      <dc:creator>rhughes522</dc:creator>
      <dc:date>2021-07-12T17:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can the Python API be used in a Web Tool for managing Portal Items?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/1103154#M6689</link>
      <description>&lt;P&gt;Merely importing arcgis causes publish to fail for me. Not even creating the gis object. Passes Analyze, but fails on publish.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 16:09:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-the-python-api-be-used-in-a-web-tool-for/m-p/1103154#M6689</guid>
      <dc:creator>TedChapin</dc:creator>
      <dc:date>2021-09-29T16:09:45Z</dc:date>
    </item>
  </channel>
</rss>

