posit-dev / rsconnect-python

Command line interface for publishing to Posit Connect
https://docs.posit.co/rsconnect-python/
GNU General Public License v2.0
28 stars 20 forks source link

Use `v1/bootstrap` if Connect version supports it #594

Open nealrichardson opened 2 months ago

nealrichardson commented 2 months ago

As this endpoint comes out of experimental, we should switch to the new endpoint depending on the version of the Connect server we're talking to.

aronatkins commented 1 month ago

The 2024.05.0 release includes POST /__api__/v1/bootstrap. The POST /__api__/v1/experimental/boostrap endpoint is deprecated and scheduled for removal with 2024.12.0.

rsconnect-python should start using the /v1/ API for Connect 2024.05.0 and newer, using the /v1/experimental/ API for older versions until they pass beyond the support horizon (18mos from 2024.04.0).

aronatkins commented 1 month ago

A challenge for this particular endpoint: the internal server_settings API is used to obtain the Connect version, but server version is not provided to unauthenticated requests.

nealrichardson commented 1 month ago

Hmm, then do we have to

try:
    POST /__api__/v1/bootstrap
except:
    POST /__api__/v1/experimental/bootstrap