vPUT.Rd
Wrapper to make generic DELETE calls to SAS Viya
vPUT(
session,
path,
payload,
...,
verbose = FALSE,
encode = "json",
output = "json"
)
viya_connection object, obtained through session
function
character, path to the GET api endpoint
list or json string, if it is a list, will be transformed in a json string using jsonlite::toJSON
additional parameters to be passed to httr::PUT
such as httr::add_headers
logical, return print API call information
payload encoding type, to be passed to httr::POST
.
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
.
This function in built on top of httr for convenience when calling SAS Viya API endpoints..
httr::GET()
, httr::POST()
, httr::PUT()
, httr::DELETE()
, httr::response()
Other core API requests:
vDELETE()
,
vGET()
,
vHEAD()
,
vPOST()
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)
} # }