Hello, im trying to add a new Feature in my rest service using ajax, but i got the following error:
- Object
- code:500
- details:Array[1]
- 0:"No edits ('adds', 'updates' or 'deletes') were specified."
- length:1
- __proto__:Array[0]
- message:"Unable to complete operation."
What am i doing wrong?
//Example url: http://myserverarcgis/arcgis/rest/services/mylayer/FeatureServer/1/applyEdits
//My attributes from my layer are: user,from and module.
function saveLogin(){
var arrayOfAttributes = [
{ "adds":[
{
"attributes" : {
"user" : "Evelyn4",
"from" : "Evelyn4",
"module" : "Evelyn4"
}
}
]
}
];
var url = myLayers.write_logAccess();
jQuery.ajax({
type: 'POST',
url: url,
data: arrayOfAttributes,
dataType:'json',
success: (success) => {
console.log(success);
},
error: (error) => {
console.log(error);
}
});
}Thanks for ur help
.