search.models.Rd
Search PEcAn Models from the database using search string based on
model_name & revision. Hits the /api/models/
API endpoint with
relevant query parameters
search.models(server, model_name = "", revision = "", ignore_case = TRUE)
Server object obtained using the connect() function
Search string for model name Default: "" (Returns all models)
Search string for revision. Default: "" (Returns all revisions for a model)
Indicator of case sensitive or case insensitive search
Response obtained from the /api/models/
endpoint with relevant query parameters
server <- connect(url="http://pecan.localhost:80", username="carya", password="illinois")
# Get details of all models
res1 <- search.models(server)
#> Sorry! Server not responding.
# Get details of all models containing 'sip' in their name
res2 <- search.models(server, model_name="sip")
#> Sorry! Server not responding.
# Get details of the 'ssr' revision of the 'SIPNET' model
res3 <- search.models(server, model_name="SIPNET", revision="ssr")
#> Sorry! Server not responding.
# Get details of models where name contains "SIP" (case sensitive)
res4 <- search.models(server, model_name="SIPNET", ignore_case=FALSE)
#> Sorry! Server not responding.