sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Missing example for transferring odata.type

Open jfgoodhew1 opened this issue 6 years ago • 4 comments

Under Rename a Folder using MERGE method: "From the result, obtain the odata.type value, such as SP.Data.Shared_x0020_DocumentsItem (the value may be different depending on your library configuration). Then issue a MERGE" It is unclear how to transfer the odata.type from the GET request into the MERGE request. odata.type is not a valid dynamic item in Power Automate.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

jfgoodhew1 avatar Jan 13 '20 14:01 jfgoodhew1

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Jan 13 '20 14:01 msft-github-bot

The sample after the section you quote shows how it should be used. You don't pass the odata.type, rather it's just type as a property of the __metadata object.

It's included in the object submitted in the body of the request, like this:

{
  "__metadata": {
    "type": "SP.Data.Shared_x0020_DocumentsItem" 
  }
}

andrewconnell avatar Jan 14 '20 10:01 andrewconnell

Closing issue as "answered". If you encounter similar issue(s), please open up a NEW issue. Thank you.

msft-github-bot avatar Jan 17 '20 11:01 msft-github-bot

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 24 '20 12:01 msft-github-bot