validate_endpoints {r311} | R Documentation |
Validate endpoints
Description
Checks whether and which endpoints are correctly defined, reachable,
and/or valid. Iterates through all endpoints defined in
o311_endpoints
and returns their status along with a
reason, if applicable.
Usage
validate_endpoints(
idx = NULL,
checks = c("discovery", "services", "requests"),
methods = c("formal", "down", "valid")
)
Arguments
idx |
Index numbers of endpoints to check. Index numbers follow
row numbers in |
checks |
Which open311 method to check. By default, checks all methods. |
methods |
Which checks to apply. |
Value
A dataframe containing the name of the endpoint, one to three columns on check results, and one to three columns on reasons if a check turned out to be negative.
Examples
# check the first three endpoints in o311_endpoints()
validate_endpoints(1:3)
# check only requests
validate_endpoints(1:3, checks = "requests")
# check only whether an endpoint is down
validate_endpoints(1:3, methods = "down")