I am trying to use the call http web service in sharepoint designer to delete a list item on a subsite( for example, when a list item is deleted on subsite 1 delete item on subsite 2). for this example the target list i want to delete the item is called "Test".
I am able to read and create new items on this list(using call http Get and Post methods) just having issues using the delete method. what i have done below for the delete action is as follows. 3 dictionaries.
- Dictionary 1(Header) contains 2 strings accept and Content-type both with values set to "
application/json;odata=verbose
". - Dictionary 2(metadata) contains 1 string called type and its value is "
SP.Data.TestListItem
". - Dictionary 3 (parameters) contains
_metadata
variable and ID variables.
For the call http web service action the url is set to "https://mystiteurl.sharepoint.com/subsite2/_api/web/lists/getbytitle('test')/GetItemById(ID)
" with the Http method set to "http delete
". The request header is set to the dictionary variable mentioned above "header" and the Request content is set to the "parameters" variable.
can anyone point me in right direction to where I am going wrong I have searched a lot of forums and there does not seem to be any examples for the delete action.