apiPUT: apiPUT - Do a PUT to the PFS API.

Description Usage Arguments Details Value Author(s) Examples

View source: R/apiPUT.R

Description

apiPUT - Do a PUT to the PFS API.

Usage

1
2
3
apiPUT(coreApi, resource = NULL, query = NULL, body = NULL, encode,
  headers = NULL, special = NULL, useVerbose = FALSE, unbox = TRUE,
  valueFlag = FALSE, fullReturn = TRUE)

Arguments

coreApi

coreApi object with valid jsessionid

resource

entity type for PUT

query

query string

body

body for request

encode

encoding to use for request option are "multipart", "form", "json", "raw"

headers

headers to be added to httr::PUT.

special

passed to buildUrl for special sdk endpoints

useVerbose

use verbose communication for debugging

unbox

use autounbox when doing list-to-JSON conversion

valueFlag

Tells the PUT if there needs to be a /$value added to the end.

fullReturn

Return the entire response object, or just the response content (default TRUE)

Details

apiPUT Do a PUT to the PFS API.

Value

List of length 2, containing content and response objects:

Author(s)

Craig Parman info@ngsanalytics.com

Adam Wheeler adam.wheeler@thermofisher.com

Francisco Marin francisco.marin@thermofisher.com

Scott Russell scott.russell@thermofisher.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
api <- coreAPI("PATH TO JSON FILE")
login <- authBasic(api)
response <- apiPUT(login$coreApi,
  "SAMPLE",
  body,
  "json",
  special = NULL,
  useVerbose = FALSE,
  unbox = TRUE
)
content <- response$content
error <- response$error$message
logOut(login$coreApi)

## End(Not run)

AmundsenJunior/pfsrsdk documentation built on July 18, 2019, 8:10 p.m.