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.

Usage

1
2
attachFile(coreApi, barcode, filename, filepath, targetAttributeName = "",
  useVerbose = FALSE)

Arguments

coreApi

coreApi object with valid jsessionid

barcode

User provided barcode as a character string

filename

name to use for the attached file

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, $response contains the entire http response

Author(s)

Craig Parman ngsAnalytics, ngsanalytics.com

Examples

1
2
3
4
5
6
7
8
## Not run: 
api<-CoreAPI("PATH TO JSON FILE")
login<- CoreAPIV2::authBasic(api)
modifiedItem<-CoreAPIV2::attachFile(response$coreApi,barcode,filename,
         filepath,targetAttributeName="",useVerbose=FALSE)
CoreAPIV2::logOut(login$coreApi )

## End(Not run)

ceparman/Core5.3 documentation built on May 7, 2019, 8:16 a.m.