Skip to content

fix(hwid): paginate get_hwid_users via query params, not GET body#59

Open
masasibata wants to merge 1 commit into
remnawave:developmentfrom
masasibata:fix/hwid-devices-query-pagination
Open

fix(hwid): paginate get_hwid_users via query params, not GET body#59
masasibata wants to merge 1 commit into
remnawave:developmentfrom
masasibata:fix/hwid-devices-query-pagination

Conversation

@masasibata

Copy link
Copy Markdown
Contributor

The get_hwid_users controller (GET /api/hwid/devices) annotates size/start with AttributeBody, so the SDK serializes them into the GET request body. The API reads pagination from query params, so size/start are ignored and every call returns a single default page.

Effect on consumers: bulk HWID device enumeration only ever sees the first page (e.g. ~25 users / <1000 devices for accounts with 60k+ real devices). Any code that assumes a complete snapshot silently gets partial data.

Fix

Switch size/start to Query(default=None, ...), matching get_top_users_by_hwid_devices on the adjacent /hwid/devices/top-users endpoint. Drop the now-unused AttributeBody import.

Verification

  • get_top_users_by_hwid_devices already uses the same Query pattern and paginates correctly.
  • Endpoint confirmed against RemnaWave API docs: GET /api/hwid/devices with query size/start.

size/start were annotated with AttributeBody, so the SDK serialized them into
the GET request body. The API reads pagination from query params, so they were
ignored and every call to GET /api/hwid/devices returned a single default page
— bulk HWID device enumeration only ever saw the first page.

Switch size/start to Query, matching get_top_users_by_hwid_devices on the
adjacent /hwid/devices/top-users endpoint. Drop the now-unused AttributeBody
import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant