locked
Sharepoint 2013 workflow HTTP-POST odata exception RRS feed

  • Question

  • Hi,
    I am adding items to the list using Http POST.

    I am getting Badd request error when i check logs i found below mentioned exception

    URL ENd  is _api/web/lists/getbyid(guid'4DD47937-277A-44D7-9785-11866594784F')/Items

    Created metadata dictionary as type string SP.Data.ListnameListItem
    another dictionary named as Parameters with items
    __metadata value assigned above created metadata
    & Title some title name

    OData Exception Reading Entity Body: Microsoft.Data.OData.ODataException: Found a node of type 'PrimitiveValue' when starting to read the property value; however, a node of type 'StartObject' was expected. The '__metadata' property must have an object value.

    Original error: Microsoft.SharePoint.Client.InvalidClientQueryException: Found a node of type 'PrimitiveValue' when starting to read the property value; however, a node of type 'StartObject' was expected. The '__metadata' property must have an object value.
    Thursday, October 29, 2015 9:29 PM

Answers

All replies

  • <p>i am able to make HTTP GET successful&nbsp;</p><p>HTTP POST failing with unauthorized&nbsp;</p><p>My Header looks like below</p>

    <p>__metadata i am passing below one</p><p>&nbsp;type :&nbsp;SP.Data.TestListItem</p><p>Title : some value</p><p>Web service properties</p>

    </p><p>PS: I have created workflow with my domain account which has full control on the site.</p><p>Do i have to take care of any other permissions like WorkFlow service account</p>

    • Merged by Patrick_Liang Monday, November 2, 2015 1:31 AM same question
    Thursday, October 29, 2015 6:32 AM
  • Hi ragsrams,

    According to your description, my understanding is that you want to add new list item using Workflow call Rest API with post method.

    I suggest you can refer the article below and check if you have missed some steps:

    Using SharePoint REST services from workflow with POST method

    Thanks

    Best Regards


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Monday, November 2, 2015 5:42 AM