Skip to content

Paginate Policies API #13434

Description

@mostlikelee

the Policies page and GET /policies API slow significantly when policies are added due to slow database query performance.

The /policies APIs must paginate to limit queries on the policy_membership table speed up response times.

The frontend Policy tab needs to utilize pagination options (page and per_page) on the existing /policies endpoints to limit the number of policies a user receives from an API request to 20.

New params for existing global policies and team policies endpoints:

  • page
  • per_page
  • query
  • order_key
  • order_direction

New APIs required:

  • Add a count endpoint for global policies
  • Add a count endpoint for team policies

Metadata

Metadata

Assignees

Labels

#g-endpoint-opsEndpoint ops product group~backendBackend-related issue.~frontendFrontend-related issue.~sub-taskA technical sub-task that is part of a story. (Not QA'd. Not estimated.)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions