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)

Arguments

server

Server object obtained using the connect() function

model_name

Search string for model name Default: "" (Returns all models)

revision

Search string for revision. Default: "" (Returns all revisions for a model)

ignore_case

Indicator of case sensitive or case insensitive search

Value

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

Author

Tezan Sahu

Examples

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.