Skip to content

Filter by organizationId in ListWorkspaces #18402

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

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

filiptronicek
Copy link
Member

@filiptronicek filiptronicek commented Aug 1, 2023

Description

With this PR, you can optionally pass an organization_id to ListWorkspaces for workspace filtering akin to the Dashboard.

Summary generated by Copilot

🤖 Generated by Copilot at 38fc47f

Added support for listing workspaces by organization in the experimental v1 workspaces API. Extended the proto message, the TypeScript client library, the Go protocol service, and the public API server with a new organization_id field and parameter.

Related Issue(s)

Fixes EXP-287

How to test

Create two orgs and in each make a workspace. Then note down the organization ID and with a PAT execute this:

curl -X POST 'https://api.ft-papi-li91b56fd16f.preview.gitpod-dev.com/gitpod.experimental.v1.WorkspacesService/ListWorkspaces' \
-H 'Authorization: Bearer gitpod_pat_token' \
-H 'Content-Type: application/json' \
-d '{"organizationId":"org_id"}' | jq .

This should only give the one workspace back to you.

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally looks good, please don't just copy things from server API

/hold

Remove `IncludeWithoutProject`
@filiptronicek filiptronicek force-pushed the ft/papi-listworkspaces-org-id branch from cc1348a to f8849c8 Compare August 1, 2023 20:44
@roboquat roboquat merged commit c5059f2 into main Aug 1, 2023
@roboquat roboquat deleted the ft/papi-listworkspaces-org-id branch August 1, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants