2017-08-25 3 views
0

Microsoft Graph APIからOneNoteにページをポストしようとしていますが、ポストするためにページに必要なセクションIDを入力するとエラーが表示されますその状態は次のとおりです。ページ複数パートとプレゼンテーションパートが必要Microsoft Graph API

ページ作成要求では、コンテンツがマルチパートであり、プレゼンテーションパートが必要です。

マイリクエストヘッダは次のようになります。

<!-- MyPartBoundary198374 --> 
Content-Disposition:form-data; name="Presentation" 
Content-Type:text/html 

<!DOCTYPE html> 
<html> 
    <head> 
    <title>A page with <i>rendered</i> images and an <b>attached</b> file</title> 
    <meta name="created" content="2015-07-22T09:00:00-08:00" /> 
    </head> 
    <body> 
    <p>Here's an image from an online source:</p> 
    <img src="http://..." alt="an image on the page" width="500" /> 
    <p>Here's an image uploaded as binary data:</p> 
    <img src="name:imageBlock1" alt="an image on the page" width="300" /> 
    <p>Here's a file attachment:</p> 
    <object data-attachment="FileName.pdf" data="name:fileBlock1" type="application/pdf" /> 
    </body> 
</html> 

<!-- MyPartBoundary198374 --> 
Content-Disposition:form-data; name="imageBlock1" 
Content-Type:image/jpeg 

<!-- ... binary image data ... --> 

<!-- MyPartBoundary198374 --> 
Content-Disposition:form-data; name="fileBlock1" 
Content-Type:application/pdf 

<!-- ... binary file data ... --> 

<!-- MyPartBoundary198374 --> 

ここに問題がある可能性がありますか?

答えて

0

あなたは最初の要求行方不明:

POST https://graph.microsoft.com/v1.0/me/onenote/sections/{id}/pages 
Content-length: 312 
Content-type: multipart/form-data; boundary=MyPartBoundary198374 
+0

をあなたの先生ありがとう!それは私の問題を解決した、あなたはまた、無効なエンティティIDのエラーにいくつかの光を当てることができますか? –

+0

私はそれを再び笑感謝を考え出した –

関連する問題