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