In SharePoint Online I need to Update item in Workflow Task List using REST API on same server.
I am receiving 403 forbidden error, but I am on the same error and unable to identify why should I am receiving this error.
$.ajax({
url: "https://mysite.sharepoint.com/it/_api/web/lists/GetByTitle('Workflow%20Tasks')/items?$filter=(Title%20eq%20%27Employee%20Application%20Request%20No:%20621%27)",
type: "POST",
data: JSON.stringify({ '__metadata': { 'type': 'SP.Data.WorkflowTasksItem' } }),
headers: {
"X-HTTP-Method":"MERGE",
"accept": "application/json;odata=verbose",
"content-type": "application/x-www-url-encoded",
//"content-length": 1000,
"X-RequestDigest": $("#__REQUESTDIGEST").val(),
"IF-MATCH": "*"
},
success: function (data) {
// Returning the results
console.log(data);
},
error: function (data) {
console.log(data);
}
});
And its giving below error: jquery-1.4.4.min.js:141 POST https://mysite.sharepoint.com/../ 403 (Forbidden)
/_api/web/lists/GetByTitle('Workflow%20Tasks')/items('{Item Id}')