Deploy the sample API in the folder
You can deploy using either:
Push button deployment
setwd("05_api") rsconnect::deployAPI(".", server = ..., account = ...)
Try out the Swagger Docs for the API
Your task is to restrict access to the published API, then make an authenticated request from the linux terminal
First, restrict access to the sample API to authenticated users only.
Then, generate an API key in Connect
Make a request from
bash, filling in
curl -X GET "YOUR_BASE_URL/mpg?new_hp=300" -H "accept: application/json" -H "Authorization: Key YOUR_AUTH_KEY"