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)

Arguments

server

Server object obtained using the connect() function

format_name

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

ignore_case

Indicator of case sensitive or case insensitive search

revision

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

Value

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

Author

Tezan Sahu

Examples

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.