Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add /workspaces to allow for filtered and paginated querying #1477

Closed as not planned
@kylecarbs

Description

@kylecarbs

There are currently two workspaces endpoints:

/organizations/<id>/workspaces is required to filter workspaces by the organization.
/users/<id>/workspaces returns all workspaces a user can access, across all organizations they have access to.

These can be combined into /workspaces. This endpoint should be paginated, always return all workspaces the authenticated user has access to by default, and have query parameters to filter the response.

Pagination can follow existing patterns found in the codebase. Here are some query parameters I can immediately see being valuable:

  • owner - Return all workspaces that are owned by a user with the specified name.
  • organization - Return all workspaces in the specified organization.
  • latest_job_status - Returns all workspaces with the latest build having the job status provided. This will be used to query: "all workspaces with the latest status of failed".
  • updated - Returns all workspaces that are up-to-date or not.
  • template - Returns all workspaces using the specified template name.
  • version - Returns all workspaces using the specified version name.

Inspiration for this is drawn from making the workspaces page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP APIsiteArea: frontend dashboard

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions