download.workflow.file.Rd
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)
Server object obtained using the connect() function
ID of the PEcAn workflow whose file is needed
Name of the file to be downloaded
File name to save the downloaded file as. Default: NULL (same
name as filename
would be used)
Response obtained from the /api/workflows/{id}/file/{filename}
endpoint
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.