-
Notifications
You must be signed in to change notification settings - Fork 2
Add Connect Cloud account retrieval API #2700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # internal/clients/http_client/http_client.go # internal/services/api/api_service.go
I tried this out and am getting a PreviewI'm using httpie but the concept is the same
and the
Is there anything else I need to setup to get this working? Anything on the Cloud side? |
Just tried this again with my curl and your httpie command and it worked. Which request did you copy the auth header from? I think something is probably off about that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve, changes look good, just had the one comment request. I will try this locally now to see if it works.
I tried it and it is working for me, here's my output:
|
I just pulled this down again and tried it and am still getting the same thing I posted above. I'm copying the Authorization request header from the |
I was not pointed at staging - got this working with @rodriin after pointing that out 😄 |
Intent
Resolves #2694.
The API is called as follows:
Type of Change
Approach
The endpoint calls Connect Cloud's
GET /users/me
endpoint, which returns the accounts the user is a member of and what roles they have. The user's role on the account is used to determine whether they have permission to publish.User Impact
None until we implement the add credential flow for Connect Cloud.
Automated Tests
Added tests for the new API handler and the new connect cloud API client.
Directions for Reviewers
To test this, we have to call the API manually with a vivid-api JWT. Eventually we'll use the access token from the lucid-auth token exchange, but we don't have all the pieces for that in place yet.
Authorization
header from an API calljust build && just run ui
curl -vv 'http://localhost:${your_port}/api/connect-cloud/accounts' -H 'Connect-Cloud-Base-Url: https://api.staging.connect.posit.cloud' -H 'Authorization: Bearer ${token_from_step_2}'
Checklist