ApplyEdits - Update Attachment

525
0
11-04-2021 05:38 PM
MickF
by
New Contributor

Hi All,

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.

I'm using the applyedits rest API for this fix but currently receiving an error.

Current Workflow

Using the attachments box in the applyedits service

 

{
	"updates": [{
		"globalId": "{6719C5CB-0785-4C74-9CC3-2C159C905214}",
		"contentType": "image/pjpeg"
	}]
}

 

 which is giving me the following error

 

  "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" : [
    ]
  }
}

 

 

Use GlobalIds is set to true and from my understanding, this should be enough to make the update?

 "When useGlobalIds is trueupdates and deletes are identified by each feature or attachment globalId, rather than their objectId or attachmentId."

 

 I have tried a number of possible combinations including adding a parentglobalid without success? 

 

Any help with this would be appreciated.

Thanks

Mick

 

0 Replies