Skip to main content

Items_page_by_column_values doesnt exist on type 'query'

  • October 2, 2023
  • 4 replies
  • 962 views

  • Participating Frequently

Hello,

I am trying to use the new items_page_by_column_values, but keep getting the error “Field ‘items_page_by_column_values’ doesn’t exist on type ‘Query’”

Here is the code used to make the request in Python:

apiKey = os.environ['MONDAY_TOKEN']

apiUrl = "https://api.monday.com/v2"

headers = {"Authorization" : apiKey}

query1 = '{items_page_by_column_values (board_id: 123123123, columns: [ {column_id: "name" }]) { items }}'

data1={'query' : query1}

r1 = requests.post(url=apiUrl, json=data1, headers=headers) # make request

print(r1.json())

Im assuming maybe Im using incorrect API version? Im really not sure. Any help would be appreciated.

Thank you

4 replies

Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • October 2, 2023

Hello there @dog,

You are correct. You need to pass the 2023-10 version of the API in the headers:

API-Version: 2023-10

Example:

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
    'API-Version' : '2023-10'
   },
   body: JSON.stringify({
     'query' : 'query{version {kind value} }'
   })
  });

Hope that helps 😁

Cheers,
Matias


  • Author
  • Participating Frequently
  • October 2, 2023

but this solution is not for Python right, how do I specify version in python?


  • Author
  • Participating Frequently
  • October 2, 2023

nevermind I discovered how


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • October 3, 2023

That’s great @dog !

Let us know if you need anything else!

Cheers,
Matias