Core HTTP logic for Seven Bridges API
api( token = NULL, version = "v2", path = NULL, method = c("GET", "POST", "PUT", "DELETE", "PATCH"), query = NULL, body = list(), encode = c("json", "form", "multipart"), limit = getOption("sevenbridges")$limit, offset = getOption("sevenbridges")$offset, advance_access = getOption("sevenbridges")$advance_access, authorization = FALSE, fields = NULL, base_url = paste0("https://api.sbgenomics.com/", version, "/"), ... )
token | API auth token or |
---|---|
version | API version number, default is |
path | path connected with |
method | one of |
query | Passed to httr package GET/POST call. |
body | Passed to httr package GET/POST/PUT/DELETE call. |
encode | If the body is a named list, how should it be
encoded? Can be one of |
limit | How many results to return |
offset | The point at which to start displaying them |
advance_access | Enable advance access features?
Default is |
authorization | Logical. Is the |
fields | All API calls take the optional query parameter fields. This parameter enables you to specify the fields you want to be returned when listing resources (e.g. all your projects) or getting details of a specific resource (e.g. a given project). For example, fields="id,name,size" to return the fields id, name and size for files. More details please check https://docs.sevenbridges.com/docs/the-api#section-general-api-information |
base_url | defeault is |
... | passed to GET/POST/PUT/DELETE/PATCH call. |
returned request list of httr
Used for advanced users and the core method for higher level API in this package, please refer to the easy api vignette and additional vignettes pages for more convenient usage.
https://docs.sevenbridges.com/v1.0/page/api
token <- "your_token" # list projects if (FALSE) { api(token = token, path = "projects", method = "GET")}