AnsweredAssumed Answered

update data in portal hosted layer using rest end point

Question asked by sandhyabaratam@gmail.com on Oct 8, 2020

Hi Team,

 

I have to update gdb data in portal-> hosted feature layer using its item id. I got below rest end point to perform this.

https://<hostname>/arcgis/sharing/rest/content/users/<userid>/items/<itemid>/update

 

While executing below code, I am getting an error --- {ERR_INVALID_ARG_TYPE] the first argument must be one of type string or buffer.

can any one please let me know how to resolve this or any change in passing inputs etc..

 

var options = 

{

   file:fs.createReadstream(<fPath of gdb/zip file>),

   overwrite:true,

   f:'json',

   token:<tokenVal>,

   filename:<fname>

}

 

request.post( {url:<url>,formData:options}, function(err, response,body){

   ------to do--------------

});

 

Regards,

Sandhya.

Outcomes