<?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: How to access a statusURL value from CreateReplica()? in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-access-a-statusurl-value-from-createreplica/m-p/1335686#M4584</link>
    <description>&lt;P&gt;Would something like this work?&lt;/P&gt;&lt;P&gt;import json&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;with&lt;/SPAN&gt; &lt;SPAN&gt;open&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;json&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;load&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;statusString&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;"status"&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 06 Oct 2023 08:11:24 GMT</pubDate>
    <dc:creator>A_Wyn_Jones</dc:creator>
    <dc:date>2023-10-06T08:11:24Z</dc:date>
    <item>
      <title>How to access a statusURL value from CreateReplica()?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-access-a-statusurl-value-from-createreplica/m-p/1335648#M4583</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I asked this question in the API for Python forum, but I figure it's relevant here as well. I'll delete if cross-posts are frowned upon.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-api-for-python-questions/access-a-value-in-the-json-response-from/td-p/1335646/jump-to/first-unread-message" target="_self"&gt;https://community.esri.com/t5/arcgis-api-for-python-questions/access-a-value-in-the-json-response-from/td-p/1335646/jump-to/first-unread-message&lt;/A&gt;&lt;/P&gt;&lt;P&gt;What I'm trying to do is access the 'status' property of the JSON response to a successful Create Replica call. In &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/create-replica.htm" target="_blank" rel="noopener"&gt;the documentation&lt;/A&gt;, it says the the response from the call is the statusURL, and that URL links to a webpage containing these properties and example values:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"transportType":"esriTransportTypeUrl",&lt;BR /&gt;"responseType": "esriReplicaResponseTypeData",&lt;BR /&gt;"replicaName": "Meters",&lt;BR /&gt;"resultUrl": "&lt;A href="https://arcgis.com/lidGgNLxw9LL0SbI/ArcGIS/rest/services/SaveTheBay/replicafiles/c2f366ffbf5549a48727d2529b2c6ed5.json" target="_blank"&gt;https://arcgis.com/lidGgNLxw9LL0SbI/ArcGIS/rest/services/SaveTheBay/replicafiles/c2f366ffbf5549a48727d2529b2c6ed5.json&lt;/A&gt;",&lt;BR /&gt;"submissionTime": 1379366479000,&lt;BR /&gt;"lastUpdatedTime": 1379366482000,&lt;BR /&gt;"status": "Completed"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;I'm trying to access the 'status' property, but I can't find documentation on how to do that. Is it possible? I can access the HTML text of the page through response.text after a request.get call to the statusURL, but I don't know how to access that status value.&lt;/P&gt;&lt;P&gt;Any help would be most appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 00:45:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-access-a-statusurl-value-from-createreplica/m-p/1335648#M4583</guid>
      <dc:creator>DanielCardenas_G2</dc:creator>
      <dc:date>2023-10-06T00:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to access a statusURL value from CreateReplica()?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-access-a-statusurl-value-from-createreplica/m-p/1335686#M4584</link>
      <description>&lt;P&gt;Would something like this work?&lt;/P&gt;&lt;P&gt;import json&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;with&lt;/SPAN&gt; &lt;SPAN&gt;open&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;json&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;load&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;statusString&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;"status"&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Oct 2023 08:11:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-access-a-statusurl-value-from-createreplica/m-p/1335686#M4584</guid>
      <dc:creator>A_Wyn_Jones</dc:creator>
      <dc:date>2023-10-06T08:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to access a statusURL value from CreateReplica()?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-access-a-statusurl-value-from-createreplica/m-p/1335837#M4585</link>
      <description>&lt;P&gt;Thank you very much for the idea, unfortunately though, I wasn't able to get it to work. The code returns a type error passing the response object:&lt;BR /&gt;TypeError: expected str, bytes or os.PathLike object, not Response&lt;/P&gt;&lt;P&gt;I also tried&lt;BR /&gt;with open(r.json()) as f:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; data = json.load(f)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; statusString = data["status"]&lt;/P&gt;&lt;P&gt;but that also errored with :&lt;BR /&gt;JSONDecodeError: Expecting value: line 1 column 1 (char 0)&lt;/P&gt;&lt;P&gt;I think I'm just going to get the response.text and parse it for the status for now.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 16:52:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-access-a-statusurl-value-from-createreplica/m-p/1335837#M4585</guid>
      <dc:creator>DanielCardenas_G2</dc:creator>
      <dc:date>2023-10-06T16:52:50Z</dc:date>
    </item>
  </channel>
</rss>

