Skip to content

feat: client for API content #435

@nealrichardson

Description

@nealrichardson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    sdkUsed for automation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions