WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Documentation Error, API #2733

@GezerWezer

Description

@GezerWezer

Versions

  • Pi-hole: 6.2.2
  • Web: 6.3
  • FTL: 6.3.2

Expected behavior

The API documentation for the /queries endpoint states:

By default, the returned queries always start at the most recent query. This can be changed by supplying the parameter cursor. Each result of this API callback contains a cursor pointing the beginning of the next length queries chunk. This provides a very fast and lightweight server-side pagination implementation.

This implies that the cursor in the response a pre-calculated pointer that can be used directly in a subsequent request to fetch the next chunk of queries.

Actual behavior / bug

Instead of providing a cursor for the next chunk of data, the API actually returns a cursor that points to the start of the current chunk. If a cursor is passed in the request, the API simply returns that same cursor value in the response.

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to local documentation
  2. Click try on the /queries endpoint
  3. Copy the returned cursor, paste it into the cursor field, press try again
  4. you will see that the response contains the same cursor value that was provided in the request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions