<?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 ApplyEdits - Update Attachment in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/applyedits-update-attachment/m-p/1114366#M4000</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am trying to do an update to the content type for some hosted attachments. These have been incorrectly created from an Integromat scenario which has since been corrected. Now onto a data cleanse so our users can view the attachments on their Ipads.&lt;/P&gt;&lt;P&gt;I'm using the applyedits rest API for this fix but currently receiving an error.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Current Workflow&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Using the attachments box in the applyedits service&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;{
	"updates": [{
		"globalId": "{6719C5CB-0785-4C74-9CC3-2C159C905214}",
		"contentType": "image/pjpeg"
	}]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;which is giving me the following error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;  "attachments" : {
    "addResults" : [
    ], 
    "updateResults" : [
      {
        "objectId" : 0, 
        "globalId" : "{6719C5CB-0785-4C74-9CC3-2C159C905214}", 
        "success" : false, 
        "error" : 
        {
          "code" : 0, 
          "description" : "The parameterized query '(@fKey int)SELECT COUNT(ATTACHMENTID) FROM service_642a58e32f9b4' expects the parameter '@fKey', which was not supplied."
        }
      }
    ], 
    "deleteResults" : [
    ]
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use GlobalIds is set to true and from my understanding, this should be enough to make the update?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;EM&gt;"When&amp;nbsp;&lt;SPAN class=""&gt;useGlobalIds&lt;/SPAN&gt;&amp;nbsp;is&amp;nbsp;&lt;SPAN class=""&gt;true&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN class=""&gt;updates&lt;/SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;SPAN class=""&gt;deletes&lt;/SPAN&gt;&amp;nbsp;are identified by each feature or attachment&amp;nbsp;&lt;SPAN class=""&gt;globalId&lt;/SPAN&gt;, rather than their&amp;nbsp;&lt;SPAN class=""&gt;objectId&lt;/SPAN&gt;&amp;nbsp;or&amp;nbsp;&lt;SPAN class=""&gt;attachmentId&lt;/SPAN&gt;."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have tried a number of possible combinations including adding a parentglobalid without success?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help with this would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mick&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Nov 2021 00:38:19 GMT</pubDate>
    <dc:creator>MickF</dc:creator>
    <dc:date>2021-11-05T00:38:19Z</dc:date>
    <item>
      <title>ApplyEdits - Update Attachment</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/applyedits-update-attachment/m-p/1114366#M4000</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am trying to do an update to the content type for some hosted attachments. These have been incorrectly created from an Integromat scenario which has since been corrected. Now onto a data cleanse so our users can view the attachments on their Ipads.&lt;/P&gt;&lt;P&gt;I'm using the applyedits rest API for this fix but currently receiving an error.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Current Workflow&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Using the attachments box in the applyedits service&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;{
	"updates": [{
		"globalId": "{6719C5CB-0785-4C74-9CC3-2C159C905214}",
		"contentType": "image/pjpeg"
	}]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;which is giving me the following error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;  "attachments" : {
    "addResults" : [
    ], 
    "updateResults" : [
      {
        "objectId" : 0, 
        "globalId" : "{6719C5CB-0785-4C74-9CC3-2C159C905214}", 
        "success" : false, 
        "error" : 
        {
          "code" : 0, 
          "description" : "The parameterized query '(@fKey int)SELECT COUNT(ATTACHMENTID) FROM service_642a58e32f9b4' expects the parameter '@fKey', which was not supplied."
        }
      }
    ], 
    "deleteResults" : [
    ]
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use GlobalIds is set to true and from my understanding, this should be enough to make the update?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;EM&gt;"When&amp;nbsp;&lt;SPAN class=""&gt;useGlobalIds&lt;/SPAN&gt;&amp;nbsp;is&amp;nbsp;&lt;SPAN class=""&gt;true&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN class=""&gt;updates&lt;/SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;SPAN class=""&gt;deletes&lt;/SPAN&gt;&amp;nbsp;are identified by each feature or attachment&amp;nbsp;&lt;SPAN class=""&gt;globalId&lt;/SPAN&gt;, rather than their&amp;nbsp;&lt;SPAN class=""&gt;objectId&lt;/SPAN&gt;&amp;nbsp;or&amp;nbsp;&lt;SPAN class=""&gt;attachmentId&lt;/SPAN&gt;."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have tried a number of possible combinations including adding a parentglobalid without success?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help with this would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mick&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 00:38:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/applyedits-update-attachment/m-p/1114366#M4000</guid>
      <dc:creator>MickF</dc:creator>
      <dc:date>2021-11-05T00:38:19Z</dc:date>
    </item>
  </channel>
</rss>

