Downloads & saves the desired file for a workflow. Hits the /api/workflows/{id}/file/{filename} API endpoint

download.workflow.file(server, workflow_id, filename, save_as = NULL)

Arguments

server

Server object obtained using the connect() function

workflow_id

ID of the PEcAn workflow whose file is needed

filename

Name of the file to be downloaded

save_as

File name to save the downloaded file as. Default: NULL (same name as filename would be used)

Value

Response obtained from the /api/workflows/{id}/file/{filename} endpoint

Author

Tezan Sahu

Examples

server <- connect(url="http://pecan.localhost:80", username="carya", password="illinois")

# Download the 'ensemble.ts.99000000017.NPP.2002.2002.Rdata' output file for the workflow with id = 99000000031
download.workflow.file(server, workflow_id=99000000031, filename='ensemble.ts.99000000017.NPP.2002.2002.Rdata')
#> Sorry! Server not responding.