Skip to contents

Starts the plumber API server for programmatic data access. The API reads pre-computed results from the targets store.

Usage

api_serve(port = 8080L, host = "127.0.0.1", store = "_targets")

Arguments

port

Port number (default: 8080)

host

Host address (default: "127.0.0.1")

store

Path to targets store (default: "_targets")

Value

Invisible NULL (starts server)

Examples

if (FALSE) { # \dontrun{
# Start the API server
api_serve(port = 8080)

# Then query from R or curl:
# curl http://localhost:8080/datasets
# curl http://localhost:8080/data/clinical?variables=submitter_id,gender
} # }