powered by
Sends an HTTP request to a specified API endpoint using the stored bearer token for authentication.
call_endpoint(method, endpoint, params = list(), data = NULL)
A list containing the API response.
The HTTP method (e.g., "GET", "POST", "PUT", "DELETE").
The API endpoint (e.g., `/api/projects`).
A named list of query parameters (optional).
A named list or `JSON` object to include in the request body (optional).
if (FALSE) { response <- call_endpoint("GET", "/api/projects") print(response) }
Run the code above in your browser using DataLab