vGET.RdWrapper to make generic GET calls to SAS Viya
vGET(session, path, ..., query, verbose = FALSE, output = "json")viya_connection object, obtained through session function
character, path to the GET api endpoint
additional parameters to be passed to httr::GET such as httr::add_headers
list, additional URL query parameters
logical, return print API call information
string, if json will return httr::fromJSON(httr::content(response, as = "text")) with etag information parsed,
else if response will return a httr::response() object, if text will return content(response, as = "text")
list if output = "json" default. httr::response() if output = response.
httr::GET(), httr::POST(), httr::PUT(), httr::DELETE()
Other core API requests:
vDELETE(),
vHEAD(),
vPOST(),
vPUT()
if (FALSE) { # \dontrun{
folders <- vGET(session,
path = "folders/folders/")
newFolder <- vPOST(session,
path = paste0("folders/folders/"),
query = list(parentFolderUri = folders$items$parentFolderUri[1]),
payload = list(name = "newFolder"),
httr::content_type("application/json"))
deletedFolder <- vDELETE(session,
path = "folders/folders/",
resourceID = newFolder$id)
} # }