Skip to content

content#

Interact with Posit Connect's content API.

Usage:

content [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

content build#

Build content on Posit Connect. Requires Connect >= 2021.11.1

Usage:

content build [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.

content build add#

Mark a content item for build. Use build run to invoke the build on the Connect server.

Usage:

content build add [OPTIONS]

Options:

  -n, --name TEXT              The nickname of the Posit Connect server to
                               deploy to.
  -s, --server TEXT            The URL for the Posit Connect server to deploy
                               to. (Also settable via CONNECT_SERVER
                               environment variable.)
  -k, --api-key TEXT           The API key to use to authenticate with Posit
                               Connect. (Also settable via CONNECT_API_KEY
                               environment variable.)
  -i, --insecure               Disable TLS certification/host validation.
                               (Also settable via CONNECT_INSECURE environment
                               variable.)
  -c, --cacert FILE            The path to trusted TLS CA certificates. (Also
                               settable via CONNECT_CA_CERTIFICATE environment
                               variable.)
  -v, --verbose                Enable verbose output. Use -vv for very verbose
                               (debug) output.
  -g, --guid GUID[,BUNDLE_ID]  Add a content item by its guid. This flag can
                               be passed multiple times.  [required]
  --help                       Show this message and exit.

content build history#

Get the build history for a content item.

Usage:

content build history [OPTIONS]

Options:

  -n, --name TEXT     The nickname of the Posit Connect server to deploy to.
  -s, --server TEXT   The URL for the Posit Connect server to deploy to. (Also
                      settable via CONNECT_SERVER environment variable.)
  -k, --api-key TEXT  The API key to use to authenticate with Posit Connect.
                      (Also settable via CONNECT_API_KEY environment
                      variable.)
  -i, --insecure      Disable TLS certification/host validation. (Also
                      settable via CONNECT_INSECURE environment variable.)
  -c, --cacert FILE   The path to trusted TLS CA certificates. (Also settable
                      via CONNECT_CA_CERTIFICATE environment variable.)
  -v, --verbose       Enable verbose output. Use -vv for very verbose (debug)
                      output.
  -g, --guid TEXT     The guid of the content item.  [required]
  --help              Show this message and exit.

content build logs#

Print the logs for a content build.

Usage:

content build logs [OPTIONS]

Options:

  -n, --name TEXT           The nickname of the Posit Connect server to deploy
                            to.
  -s, --server TEXT         The URL for the Posit Connect server to deploy to.
                            (Also settable via CONNECT_SERVER environment
                            variable.)
  -k, --api-key TEXT        The API key to use to authenticate with Posit
                            Connect. (Also settable via CONNECT_API_KEY
                            environment variable.)
  -i, --insecure            Disable TLS certification/host validation. (Also
                            settable via CONNECT_INSECURE environment
                            variable.)
  -c, --cacert FILE         The path to trusted TLS CA certificates. (Also
                            settable via CONNECT_CA_CERTIFICATE environment
                            variable.)
  -v, --verbose             Enable verbose output. Use -vv for very verbose
                            (debug) output.
  -g, --guid TEXT           The guid of the content item.  [required]
  -t, --task-id TEXT        The task ID of the build.
  -f, --format [text|json]  The output format of the logs. Defaults to text.
  --help                    Show this message and exit.

content build ls#

List the content items that are being tracked for build on a given Connect server.

Usage:

content build ls [OPTIONS]

Options:

  -n, --name TEXT                 The nickname of the Posit Connect server to
                                  deploy to.
  -s, --server TEXT               The URL for the Posit Connect server to
                                  deploy to. (Also settable via CONNECT_SERVER
                                  environment variable.)
  -k, --api-key TEXT              The API key to use to authenticate with
                                  Posit Connect. (Also settable via
                                  CONNECT_API_KEY environment variable.)
  -i, --insecure                  Disable TLS certification/host validation.
                                  (Also settable via CONNECT_INSECURE
                                  environment variable.)
  -c, --cacert FILE               The path to trusted TLS CA certificates.
                                  (Also settable via CONNECT_CA_CERTIFICATE
                                  environment variable.)
  -v, --verbose                   Enable verbose output. Use -vv for very
                                  verbose (debug) output.
  --status [NEEDS_BUILD|RUNNING|ABORTED|COMPLETE|ERROR]
                                  Filter results by status of the build
                                  operation.
  -g, --guid TEXT                 Check the local build state of a specific
                                  content item. This flag can be passed
                                  multiple times.
  -v, --verbose                   Enable verbose output. Use -vv for very
                                  verbose (debug) output.
  --help                          Show this message and exit.

content build rm#

Remove a content item from the list of content that are tracked for build. Use build ls to view the tracked content.

Usage:

content build rm [OPTIONS]

Options:

  -n, --name TEXT     The nickname of the Posit Connect server to deploy to.
  -s, --server TEXT   The URL for the Posit Connect server to deploy to. (Also
                      settable via CONNECT_SERVER environment variable.)
  -k, --api-key TEXT  The API key to use to authenticate with Posit Connect.
                      (Also settable via CONNECT_API_KEY environment
                      variable.)
  -i, --insecure      Disable TLS certification/host validation. (Also
                      settable via CONNECT_INSECURE environment variable.)
  -c, --cacert FILE   The path to trusted TLS CA certificates. (Also settable
                      via CONNECT_CA_CERTIFICATE environment variable.)
  -v, --verbose       Enable verbose output. Use -vv for very verbose (debug)
                      output.
  -g, --guid TEXT     Remove a content item by guid.
  --all               Remove all content items from the list of content
                      tracked for build.
  -p, --purge         Remove build history and log files from the local
                      filesystem.
  --help              Show this message and exit.

content build run#

Start building content on a given Connect server.

Usage:

content build run [OPTIONS]

Options:

  -n, --name TEXT              The nickname of the Posit Connect server to
                               deploy to.
  -s, --server TEXT            The URL for the Posit Connect server to deploy
                               to. (Also settable via CONNECT_SERVER
                               environment variable.)
  -k, --api-key TEXT           The API key to use to authenticate with Posit
                               Connect. (Also settable via CONNECT_API_KEY
                               environment variable.)
  -i, --insecure               Disable TLS certification/host validation.
                               (Also settable via CONNECT_INSECURE environment
                               variable.)
  -c, --cacert FILE            The path to trusted TLS CA certificates. (Also
                               settable via CONNECT_CA_CERTIFICATE environment
                               variable.)
  -v, --verbose                Enable verbose output. Use -vv for very verbose
                               (debug) output.
  --parallelism INTEGER RANGE  Defines the number of builds that can run
                               concurrently. Defaults to 1.  [x>=1]
  --retry                      Build all content that is in the NEEDS_BUILD,
                               ABORTED, ERROR, or RUNNING state.
  --all                        Build all content, even if it is already marked
                               as COMPLETE.
  --poll-wait INTEGER RANGE    Defines the number of seconds between polls
                               when polling for build output. Defaults to 1.
                               [x>=1]
  -f, --format [text|json]     The output format of the logs. Defaults to
                               text.
  --debug                      Log stacktraces from exceptions during
                               background operations.
  --force                      Always build content even if a build is already
                               marked as running.
  --help                       Show this message and exit.

content describe#

Describe a content item on Posit Connect.

Usage:

content describe [OPTIONS]

Options:

  -n, --name TEXT     The nickname of the Posit Connect server to deploy to.
  -s, --server TEXT   The URL for the Posit Connect server to deploy to. (Also
                      settable via CONNECT_SERVER environment variable.)
  -k, --api-key TEXT  The API key to use to authenticate with Posit Connect.
                      (Also settable via CONNECT_API_KEY environment
                      variable.)
  -i, --insecure      Disable TLS certification/host validation. (Also
                      settable via CONNECT_INSECURE environment variable.)
  -c, --cacert FILE   The path to trusted TLS CA certificates. (Also settable
                      via CONNECT_CA_CERTIFICATE environment variable.)
  -v, --verbose       Enable verbose output. Use -vv for very verbose (debug)
                      output.
  -g, --guid TEXT     The GUID of a content item to describe. This flag can be
                      passed multiple times.  [required]
  --help              Show this message and exit.

content download-bundle#

Download a content item's source bundle.

Usage:

content download-bundle [OPTIONS]

Options:

  -n, --name TEXT              The nickname of the Posit Connect server to
                               deploy to.
  -s, --server TEXT            The URL for the Posit Connect server to deploy
                               to. (Also settable via CONNECT_SERVER
                               environment variable.)
  -k, --api-key TEXT           The API key to use to authenticate with Posit
                               Connect. (Also settable via CONNECT_API_KEY
                               environment variable.)
  -i, --insecure               Disable TLS certification/host validation.
                               (Also settable via CONNECT_INSECURE environment
                               variable.)
  -c, --cacert FILE            The path to trusted TLS CA certificates. (Also
                               settable via CONNECT_CA_CERTIFICATE environment
                               variable.)
  -v, --verbose                Enable verbose output. Use -vv for very verbose
                               (debug) output.
  -g, --guid GUID[,BUNDLE_ID]  The GUID of a content item to download.
                               [required]
  -o, --output PATH            Defines the output location for the download.
                               [required]
  --overwrite                  Overwrite the output file if it already exists.
  --help                       Show this message and exit.

Search for content on Posit Connect.

Usage:

content search [OPTIONS]

Options:

  -n, --name TEXT                 The nickname of the Posit Connect server to
                                  deploy to.
  -s, --server TEXT               The URL for the Posit Connect server to
                                  deploy to. (Also settable via CONNECT_SERVER
                                  environment variable.)
  -k, --api-key TEXT              The API key to use to authenticate with
                                  Posit Connect. (Also settable via
                                  CONNECT_API_KEY environment variable.)
  -i, --insecure                  Disable TLS certification/host validation.
                                  (Also settable via CONNECT_INSECURE
                                  environment variable.)
  -c, --cacert FILE               The path to trusted TLS CA certificates.
                                  (Also settable via CONNECT_CA_CERTIFICATE
                                  environment variable.)
  -v, --verbose                   Enable verbose output. Use -vv for very
                                  verbose (debug) output.
  --published                     Search only published content.
  --unpublished                   Search only unpublished content.
  --content-type [unknown|shiny|rmd-static|rmd-shiny|static|api|tensorflow-saved-model|jupyter-static|python-api|python-dash|python-streamlit|python-bokeh|python-fastapi|quarto-shiny|quarto-static|python-shiny|jupyter-voila|python-gradio]
                                  Filter content results by content type.
  --r-version VERSIONSEARCHFILTER
                                  Filter content results by R version.
  --py-version VERSIONSEARCHFILTER
                                  Filter content results by Python version.
  --title-contains TEXT           Filter content results by title.
  --order-by [created|last_deployed]
                                  Order content results.
  --help                          Show this message and exit.