Skip to contents

Generic API request for Eratos and Senaps

Usage

eratos_request(
  type = c("eratos.workspace", "senaps.sensor", "senaps.datasource", "senaps.tmd"),
  path = "/",
  method = "GET",
  query = NULL,
  body = NULL,
  ...
)

Arguments

type

One of: "eratos.workspace", "senaps.sensor", "senaps.datasource", "senaps.tmd"

path

API endpoint path (e.g. "/workspaces" or "streams/list")

method

HTTP method, e.g. "GET", "POST", "PUT", "DELETE"

query

List of query parameters

body

Optional JSON body for POST/PUT requests

...

Additional arguments passed to `httr2::req_perform()`

Value

Parsed JSON content or response object