I am trying to send a post request to ContentVersion to migrate my contentVersions from point A to B :
i build the body like this :
body = ('{"Title" :"'+Title+'",
"PathOnClient":"' +PathOnClient+'",
"ContentLocation" :"' +ContentLocation +'",
"FirstPublishLocation": { "External_ID__c" :
"'+FirstPublishLocationId+'"},
"versionData" :"'+VersionDataString+ '"}');
reqInsert.setBody( body);
I know that the problem comes from this polymorphic field :
"FirstPublishLocation": { "External_ID__c" : "'+FirstPublishLocationId+'"},
but I don't know how to fix it ?
I have
Error 400 Bad request
has any one did a similar thing before ?
Thank you !