attachFile: attachFile - Attaches a file to an entity or file attribute.

Description Usage Arguments Details Value Author(s) Examples

Description

attachFile Attaches a file to entity identified by barcode. Note: This function uses the JSON API to post a file to an entity and Odata to post to an attribute.

Usage

1
2
attachFile(coreApi, entityType, barcode, filePath,
  targetAttributeName = "", useVerbose = FALSE)

Arguments

coreApi

coreApi object with valid jsessionid

entityType

PFS entity type

barcode

User provided barcode as a character string

filePath

path to the file to attach

targetAttributeName

- if included the name if the attribute to attach the file to. Must be in all caps.

useVerbose

Use verbose communication for debugging

Details

attachFile Attaches a file to an entity or file attribute.

Value

RETURN returns a list $entity contains entity information (if present), $response contains the entire http response

Author(s)

Craig Parman info@ngsanalytics.com

Adam Wheeler adam.wheeler@thermofisher.com

Scott Russell scott.russell@thermofisher.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
api <- coreAPI("PATH TO JSON FILE")
login <- authBasic(api)
modifiedItem <- attachFile(login$coreApi,
  entitytype,
  barcode,
  filePath,
  targetAttributeName = "",
  useVerbose = FALSE
)
logOut(login$coreApi)

## End(Not run)

ajwtech/pfsrsdk documentation built on June 14, 2019, 10:34 a.m.