Skip to contents

plumber::plumb_api() was added in plumber 1.0.0 to standardize the process to wrap an API inside a package. However, deploying that API takes some extra steps. This function streamlines that process.

Usage

deploy_pkg_api(
  package,
  folder_name,
  ...,
  cookie_endpoint_src = cookie_endpoint_httr2(),
  server = "posit.cloud",
  api_name = folder_name
)

Arguments

package

Character. The name of the package that contains the API.

folder_name

Character. The name of the folder that contains the API.

...

Additional arguments to rsconnect::deployApp().

cookie_endpoint_src

Character. The source code for the cookie endpoint, such as those returned by cookie_endpoint_httr2() (the default) and cookie_endpoint_simple().

server

Character. The server to deploy to. Defaults to "posit.cloud".

api_name

Character. The name of the API. Defaults to folder_name.

Value

Whether the deployment was successful, invisibly.