Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions authentik/api/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
from rest_framework.response import Response

from authentik.api.v3.schema.response import PAGINATION
from authentik.lib.config import CONFIG


class Pagination(pagination.PageNumberPagination):
"""Pagination which includes total pages and current page"""

page_query_param = "page"
page_size_query_param = "page_size"
max_page_size = CONFIG.get("pagination.max_page_size")

def get_paginated_response(self, data):
previous_page_number = 0
Expand Down
3 changes: 3 additions & 0 deletions authentik/lib/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ throttle:
device: 20/hour
default: 1000/second

pagination:
page_size: 100

outposts:
# Placeholders:
# %(type)s: Outpost type; proxy, ldap, etc
Expand Down
2 changes: 1 addition & 1 deletion authentik/root/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@

REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "authentik.api.pagination.Pagination",
"PAGE_SIZE": 100,
"PAGE_SIZE": CONFIG.get("pagination.page_size", 100),
"DEFAULT_FILTER_BACKENDS": [
"authentik.rbac.filters.ObjectFilter",
"django_filters.rest_framework.DjangoFilterBackend",
Expand Down
10 changes: 10 additions & 0 deletions website/docs/install-config/configuration/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,16 @@ Configure how long unauthenticated sessions last for. Does not impact how long a

Defaults to `days=1`.

### `AUTHENTIK_PAGINATION__PAGE_SIZE`:ak-version[2026.2]

Configure the default number of items per page returned on paginated endpoints.

Defaults to `100`.

### `AUTHENTIK_PAGINATION__MAX_PAGE_SIZE`:ak-version[2026.2]

Configure the maximum number of items per page returned on paginated endpoints.

### `AUTHENTIK_WEB__WORKERS`

Configure how many gunicorn worker processes should be started (see https://docs.gunicorn.org/en/stable/design.html).
Expand Down
Loading