uploadResource: Generate a workunit and upload a resource (file) to a...

View source: R/fgcz.R

uploadResourceR Documentation

Generate a workunit and upload a resource (file) to a internal bfabric storage

Description

Generate a workunit and upload a resource (file) to a internal bfabric storage

Usage

uploadResource(
  login = NULL,
  webservicepassword = NULL,
  posturl = NULL,
  containerid = 3000,
  applicationid = 212,
  status = "PENDING",
  description = "",
  inputresourceid = NULL,
  workunitname = "bfabricShiny result",
  resourcename = "bfabricShiny report",
  file = NULL
)

Arguments

login

bfabric login

webservicepassword

bfabric webservicepassword, visible when you check your user details in the bfabric system.

posturl

where the flask server is working

containerid

a containerid (project id or order id)

applicationid

a application id

status

in c('AVAILABLE', 'FAILED', 'PENDING') default is 'PENDING'.

description

free text, default is is empty.

inputresourceid

an integer or a list of integer of inputresourceIds. Of note, this works only for succeeding/preceding applications. Default is set to NULL.

workunitname

the workunit name

resourcename

the reosurce name

file

a filename for a file to be uploaded.

Value

returns a nested list containing the workunit and the resource object returned by the save method.

Author(s)

Christian Panse <cp@fgcz.ethz.ch> 2016-2023, MdE 2023-03-17

Examples

fRp <- file.path(Sys.getenv("HOME"), ".Rprofile")
source(fRp, local=TRUE)
tf <- tempfile()
write.csv(iris, file=tf)
rv <- bfabricShiny::uploadResource(login, webservicepassword, bfabricposturl,
   containerid = 3000,
   status = 'PENDING',
   description = "generated by a test run",
   applicationid = 212,
   workunitname = "bfabricShiny example",
   resourcename = "R's iris data",
   file = tf)
   
print(rv)

cpanse/bfabricShiny documentation built on March 27, 2024, 1:53 a.m.