h2o.api {h2o} | R Documentation |
Perform a REST API request to a previously connected server.
Description
This function is mostly for internal purposes, but may occasionally be useful for direct access to the backend H2O server.
It has same parameters as :meth:H2OConnection.request <h2o.backend.H2OConnection.request>
.
Usage
h2o.api(endpoint, params = NULL, json = NULL)
Arguments
endpoint |
A H2O REST API endpoint. |
params |
A list of params passed in the url. |
json |
A list of params passed as a json payload. |
Details
REST API endpoints can be obtained using:
endpoints <- sapply(h2o.api("GET /3/Metadata/endpoints")$routes, function(r) paste(r$http_method, r$url_pattern))
For a given route, the supported params can be otained using:
parameters <- sapply(h2o.api("GET /3/Metadata/schemas/{route$input_schema}")$schemas[[1]]$fields, function(f) { l <-list(); l[f$name] <- f$help; l })
Value
The parsed response.
Examples
## Not run:
res <- h2o.api("GET /3/NetworkTest")
res$table
## End(Not run)
[Package h2o version 3.44.0.3 Index]