Table of Contentsnotebook
Get Notebook List Create Notebook Delete Notebooksection
Get Section List Create Sectionpage
Get Page List Get Page Content Create Page Update Page Delete PageSet of activities to be used to interact with MS OneNote.
| Get Notebook List |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| notebook.listNotebooks | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| filter | Array.<irpa_365online.notebookFilter> | optional | Items to filter |
| Name | Type | Description |
|---|---|---|
| notebooks | Array.<irpa_365online.notebook> | List of Notebooks |
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error getting the notebook list. |
| Create Notebook |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| notebook.createNotebook | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| name | string | mandatory | Name of Notebook |
| Name | Type | Description |
|---|---|---|
| notebook | irpa_365online.notebook | Information About Notebook |
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error while creating a notebook. |
| Delete Notebook |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| notebook.deleteNotebook | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| notebookId | string | mandatory | ID of the Notebook |
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error while deleting the notebook. |
| NotFound | irpa_core | Notebook not found. |
| Get Section List |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| section.listSections | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| notebookId | string | optional | ID of the Notebook | |
| filter | Array.<irpa_365online.sectionFilter> | optional | Items to filter |
| Name | Type | Description |
|---|---|---|
| sections | Array.<irpa_365online.section> | List of sections |
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error getting the section list. |
| Create Section |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| section.createSection | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| notebookId | string | mandatory | ID of the Notebook | |
| name | string | mandatory | Name of Section |
| Name | Type | Description |
|---|---|---|
| sectionId | string | ID of section |
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error while creating a section. |
| Get Page List |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| page.listPages | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| sectionId | string | optional | ID of Section | |
| filter | Array.<irpa_365online.pageFilter> | optional | Items to filter |
| Name | Type | Description |
|---|---|---|
| pages | Array.<irpa_365online.page> | List of Pages |
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error getting the page list. |
| Get Page Content |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| page.getPageContent | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| pageId | string | mandatory | Page ID | |
| format | irpa_365online.enums.oneNote.format | optional | html | Page Format |
| Name | Type | Description |
|---|---|---|
| content | string | Raw Content of Page |
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error while getting the page. |
| NotFound | irpa_core | Notebook not found. |
| Create Page |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| page.createPage | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| sectionId | string | mandatory | ID of Section | |
| title | string | mandatory | Page Title | |
| body | string | mandatory | Body of Page | |
| attachments | Array.<irpa_365online.oneNoteAttachment> | optional | Page Attachments |
| Name | Type | Description |
|---|---|---|
| page | irpa_365online.page | Page Information |
Sample Code:
await irpa_365online.onenote.page.createPage("1-d6b516d3-a15a-4a66-bbbd-7c43eae51338", "MyPage", '<div><span>beforebegin</span><div data-id="target"><span>afterbegin</span><p>Some text</p><span>beforeend</span></div><span>afterend</span></div>');
Note:
Microsoft can modify the provided body. For example if you add an id to a tag it will become a data-id (and erase any data-id, if present).
Note:
To upload an image and display it use "<img src='name:imageBlock1' alt='an image on the page' />" with "imageBlock1" the name of the referenced image in the attachments.
Note:
To upload a file and display it use "<object data-attachment="FileName.pdf" data="name:fileBlock1" type="application/pdf" />" with "fileBlock1" the name of the referenced file in the attachments.
Note:
The following types of file are supported "application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "image/png", "image/jpeg", "image/gif", "audio/wav", "video/mp4", "application/msword" and "application/mspowerpoint", "application/excel".
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error while creating a page. |
| Update Page |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| page.updatePage | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| pageId | string | mandatory | Page ID | |
| appendElements | Array.<irpa_365online.oneNoteUpdateElement> | mandatory | Elements to be updated in the page body | |
| attachments | Array.<irpa_365online.oneNoteAttachment> | optional | Page Attachments |
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error while creating a page. |
| Delete Page |
| Technical Name | Type | Minimal Agent Version |
|---|---|---|
| page.deletePage | asynchronous | WIN-3.24, MAC-3.24, CLOUD-3.34 |
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| pageId | string | mandatory | Page ID |
| Error Class | Package | Description |
|---|---|---|
| RequestError | irpa_core | Error while deleting the page. |
| NotFound | irpa_core | Ressource not found. |