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)

Arguments

server

Server object obtained using the connect() function

model_id

ID of the specific model being used in workflows to be retrieved. Default: NULL (Returns workflows using any model)

site_id

ID of the specific site being used in workflows to be retrieved. Default: NULL (Returns workflows using any site)

offset

The number of workflows to skip before starting to collect the result set.

limit

The number of workflows to return (Available values : 10, 20, 50, 100, 500)

Value

Response obtained from the /api/workflows/ endpoint with relevant query parameters

Author

Tezan Sahu

Examples

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.