Python code assistance to use Items_Page to retrieve all content from a board

The python code in the sample guide to extract all content from a board works unless there is too much data and a timeout occurs.

Here is the sample:

Getting all the data from a board
Now let’s take advantage of GraphQL’s flexibility and return a fuller set of data for a given board. Specifically, we will return the board’s name, ID, and description and then all the items on the board. For each item, we will return the value and type of each column.

Here’s our query:

{ boards (limit:1) {
name
id
description
items {
name
column_values {
title
id
type
text
} } } }

I have inserted Items_page in front of items, which isn’t working for me. While I continue to troubleshoot, I wanted to ask the board for guidance. How would you convert this code to use items_page and how do you make sure you have retrieved all items form the board into your JSON?

Thanks

Additional info.

This query works in the API playground:
{boards (ids: 3904414045) {items_page {cursor items { id name column_values {id value } } } } }

But using it in Python, I get this error:

{‘errors’: [{‘message’: “Field ‘items_page’ doesn’t exist on type ‘Board’”, ‘locations’: [{‘line’: 1, ‘column’: 28}], ‘path’: [‘query’, ‘boards’, ‘items_page’], ‘extensions’: {‘code’: ‘undefinedField’, ‘typeName’: ‘Board’, ‘fieldName’: ‘items_page’}}], ‘account_id’: #####}

User error :slight_smile: I was not specifying the newer version of the API. I assumed it always used the latest.

headers = {“Authorization” : apiKey, “API-Version” : “2024-01”}

Now to figure out the pagination and filling the JSON.

Newbie here, trying to wrap my head around Python! This thread about using the Items page to retrieve board content is exactly what I needed. I’m working on a similar project for bussines-school and getting the data right is crucial.

While I’m learning the ropes of Python, it might be smarter for some parts of my project to be tackled by experts. I’ve been thinking about hire remote software developers to handle some of the more complex coding.

That way, I can focus on understanding the core functionality while they handle the heavy lifting. Has anyone here had experience working with remote developers? Any tips on finding reliable ones or balancing collaboration when you’re not shoulder-to-shoulder?

Thanks in advance for any advice!