Skip to content
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

REST API endpoint returns empty workspaces list: /api /v2/organizations/{organizationId}/workspaces #2728

Open
dbsanfte opened this issue Nov 12, 2024 · 2 comments
Assignees

Comments

@dbsanfte
Copy link

I've been testing this API endpoint out and it seems to return an empty list of workspaces on my org.

https://infisical.com/docs/api-reference/endpoints/organizations/workspaces

I definitely have a lot in there. :)

I am using a Bearer token generated via an Admin-level Machine Identity and it can see other things like the groups in my org, etc.

But for workspaces I get nada:

dbsanfte@localhost:~$ curl --request GET --url https://eu.infisical.com/api/v2/organizations/{organizationId}/workspaces   --header 'Authorization: Bearer <my token>'

{"workspaces":[]}

Any ideas?

@DanielHougaard
Copy link
Contributor

Hi @dbsanfte. The identity can only list projects that the identity is a part of. I've replied to your email as well.

@DanielHougaard DanielHougaard self-assigned this Nov 12, 2024
@dbsanfte
Copy link
Author

Thanks. Is there a way to provision an access level of "org admin" to an identity so it can see all projects in the org?

Beyond my current Envkey migration needs, the use case I'm envisioning is having Golden Templates as Github Repos, and developers clone these to start new projects, and a GA workflow runs where a machine identity automatically creates an Infisical project for the new repo,, and assigns the user's Infisical team with access on the project.

Is this achievable in the current iteration of the Rest API / machine identities scheme? If not, how much work would you think is needed to enable this? Or is there another way to go about it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants