Maybe this is just documentation, but maybe there's some sugar to add. If I'm trying to talk to an API hosted on Connect, I have to authenticate against Connect. I realized I can do
from posit.connect import Client
client = Client()
my_client = client.session
and then my_client.get(f"{my_api_content_url}/some/resource"), .post(), etc. But you have to know to use the content URL for your API, and you have to concatenate your own URLs, etc.
Maybe it would be nice to have a helper that gives you the Session object, takes a content GUID, manages base URLs, etc.
Otherwise, this seems worth documenting, just to make it easier to figure this out.
Maybe this is just documentation, but maybe there's some sugar to add. If I'm trying to talk to an API hosted on Connect, I have to authenticate against Connect. I realized I can do
and then
my_client.get(f"{my_api_content_url}/some/resource"),.post(), etc. But you have to know to use the content URL for your API, and you have to concatenate your own URLs, etc.Maybe it would be nice to have a helper that gives you the
Sessionobject, takes a content GUID, manages base URLs, etc.Otherwise, this seems worth documenting, just to make it easier to figure this out.