Skip to content

API server: Allow filtering in paginated methods #4597

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

Open
1 task done
bisgaard-itis opened this issue Aug 10, 2023 · 1 comment
Open
1 task done

API server: Allow filtering in paginated methods #4597

bisgaard-itis opened this issue Aug 10, 2023 · 1 comment
Assignees
Labels
t:enhancement Improvement or request on an existing feature

Comments

@bisgaard-itis
Copy link
Contributor

bisgaard-itis commented Aug 10, 2023

Is there an existing issue for this?

  • I have searched the existing issues

User Story

If I have submitted 10**6 jobs to my solver I face performance issues when listing the jobs on the client side (even after introduction of the paginated methods). Hence, it would be nice to allow for filtering.

  • Include search

Definition of Done

Support filtering in some/all paginated endpoints of the API server

@pcrespov
Copy link
Member

  • i would very much like to have the filter/sort/pagination options/design analogous across all collections in the api-server
  • A good reference of how to design this I learned in docker api
  • We started (matus and me) building it into the projects but it is half done. SEE
    class ProjectCreateParams(BaseModel):
    from_study: ProjectID | None = Field(
    None,
    description="Option to create a project from existing template or study: from_study={study_uuid}",
    )
    as_template: bool = Field(
    default=False,
    description="Option to create a template from existing project: as_template=true",
    )
    copy_data: bool = Field(
    default=True,
    description="Option to copy data when creating from an existing template or as a template, defaults to True",
    )
    hidden: bool = Field(
    default=False,
    description="Enables/disables hidden flag. Hidden projects are by default unlisted",
    )
    class Config:
    extra = Extra.forbid
  • SEE also docker API https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerList
  • specifically look at the filters query parameter. They are "topic-based" filters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:enhancement Improvement or request on an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants