Skip to content

400 Error - {'code': 400, 'message': 'limit + offset must be less than 10000'} #536

Answered by jshcodes
SamsGitHub1 asked this question in Q&A
Discussion options

You must be logged in to vote

Offsets are not (nor do they look like) integers when using query_devices_by_filter_scroll, so we have to handle them differently to accomplish the same goal.

Check out this example and let us know if it helps get you started.

def get_query_results(max_rows: int):
    """
    Performs a QueryDevicesByFilterScroll operation.
    Loops thru all results available.
    """
    # Higher than counter so our loop starts
    total = 1
    # Running counter
    counter = 0
    # List to hold all of the IDs returned by calls
    returning = []
    # Since the scrolling offset value is a string,
    # we will need to use a second variable to track
    # it's value when using this method
    offset_v…

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jshcodes
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question ❓ Further information is requested hosts Hosts or Host Groups issues and questions
2 participants
Converted from issue

This discussion was converted from issue #532 on January 31, 2022 17:05.