Skip to content

REST API offset inconsistent with UI pagination #14816

@clickheretoday

Description

@clickheretoday

Deployment Type

Self-hosted

NetBox Version

v3.7.0

Python Version

3.11

Steps to Reproduce

  1. Fresh install NetBox 3.7.0
  2. Create sample contact Sample1
  3. Create sample contract role SampleRole1
  4. Create sample contract group SampleGroup1
  5. Import tenants from the file attached to get 350 Tenants
  6. Import contact assignments from the file attached to get 350 contact assignments
  7. Get http://localhost/api/tenancy/contact-assignments/
  8. Get http://localhost/api/tenancy/contact-assignments/?offset=100
  9. Get http://localhost/api/tenancy/contact-assignments/?limit=500

sample_tenants.csv
sample_contact assignments.csv

Expected Behavior

REST API returns the same result as ORM or GUI templates.

Observed Behavior

REST API doesn't return the contract assignment with ID 101 neither on page 3 (https://localhost/api/tenancy/contact-assignments/?offset=100) or any another paginated result (offset=50, 150, 200, 250, 300). The response on page 3 starts with ID 102.
The request http://localhost/api/tenancy/contact-assignments/?limit=500 returns results as expected.
The issue happens only when paginating results through the API.

Metadata

Metadata

Assignees

Labels

severity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions