get.workflows.Rd
Retrive a list of PEcAn Workflows from the database. Filters
can also be applied based on model_id & site_id to get details
about specific workflows. Hits the /api/workflows/
API endpoint with
relevant query parameters
get.workflows(server, model_id = NULL, site_id = NULL, offset = 0, limit = 50)
Server object obtained using the connect() function
ID of the specific model being used in workflows to be retrieved. Default: NULL (Returns workflows using any model)
ID of the specific site being used in workflows to be retrieved. Default: NULL (Returns workflows using any site)
The number of workflows to skip before starting to collect the result set.
The number of workflows to return (Available values : 10, 20, 50, 100, 500)
Response obtained from the /api/workflows/
endpoint with relevant query parameters
server <- connect(url="http://pecan.localhost:80", username="carya", password="illinois")
# Get list of all workflows
res1 <- get.workflows(server)
#> Sorry! Server not responding.
# Get list of all workflows using 'SIPNET-ssr' model
res2 <- get.workflows(server, model_id=1000000022)
#> Sorry! Server not responding.
##' # Get list of all workflows using 'Willow Creek (US-WCr)' as site
res3 <- get.workflows(server, site_id=676)
#> Sorry! Server not responding.
# Get list of workflow(s) that use 'SIPNET-ssr' model & 'Willow Creek (US-WCr)' as site
res4 <- get.workflows(server, 1000000022, 676)
#> Sorry! Server not responding.