Description Usage Arguments Details Value Examples
Simple, flexible REST API calls to MS SharePoint.
1 2 3 4 5 6 7 8 9 10 |
query |
The full URL for the query to send to the MS Office Graph or SharePoint API |
Username |
Your email for authentication on the SharePoint server |
Method |
Defaults to GET but also supports POST. MERGE support hasn't been written in yet. |
acceptLanguage |
Defaults to en |
reenterPassword |
Option to manually clear your password |
refreshTokens |
Option to manually clear all tokens, for example, to connect from a different user account |
tokens_timeout_in_hours |
Set number of hours before new tokens will be requested. The default is 3, but regardless, new token requests will be handled as needed automatically. |
This function allows R to send normally constructed SharePoint queries and return the response as a simple data.frame.
For more information about how to construct queries, see the SharePoint REST API documentation: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints
To further refine your queries, see the OData documentation: https://www.odata.org/documentation/
A data.frame with the complete, pagerized response to your query.
1 2 3 4 5 6 | ListItems <- SP("https://{YOUR TENANT}.sharepoint.com/sites/_api/Web/Lists(guid'{THE ID OF YOUR LIST}')/Items", Username = "{YOUR AUTHENTICATION EMAIL}")
You can use pipes for a clearer view of your queries:
ListItems <- "https://{YOUR TENANT}.sharepoint.com/sites/_api/Web/Lists(guid'{THE ID OF YOUR LIST}')/Items" %>% SP(Username = "{YOUR AUTHENTICATION EMAIL}")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.