sp_request: Send a request to the SharePoint API

View source: R/sharepoint_driver.R

sp_requestR Documentation

Send a request to the SharePoint API

Description

Send a request via GET or POST to the SharePoint RESTful API

Usage

sp_request(con, request, verb = "GET", json = T, body = NULL)

Arguments

con

A SharePoint connection returned by sp_connection()

request

A request URL. Can be either a full URL or the last part of the request URL which will be concatenated to the API-URL of the SharePoint connection

verb

Method to use for the request. Either GET (default) or POST.

json

retreive data using JSON formatting

body

Body of the request (only for POST).

Value

The response as list

Examples

sp_con = sp_connection("https://yourdomain.sharepoint.com", "YourUsername", "YourPassword", Office365 = T)
lists = sp_request(sp_con, "lists", verb = "GET", json = T, body = NULL)

LukasK13/sharepointr documentation built on Jan. 9, 2023, 12:22 p.m.