Hi,
I’m trying to update the board-relation value in an item.
The column id I want to update is: ‘boards_verbinden9’, and it’s type is: ‘board-relation’.
The item_id = ‘1281247162’
the contact_id (item_id from the item in the other board I want to connect it to) = ‘1281240291’
The query I’m using in Python is:
query = ' mutation ($myItemID: ID!, $columnVals: JSON!) { change_multiple_column_values (item_id: $myItemID, board_id: 1274270217, column_values:$columnVals) { id } }'
vars = {'$myItemID': item_id,
'columnVals': json.dumps({
"boards_verbinden9": f'{{"linkedPulseIds": {{"linkedPulseId":{contact_id} }}]}}'
})}
data = {'query': query, 'variables': vars}
monday_headers = {"Authorization": API-KEY, 'API-Version': '2023-10'}
monday_apiUrl = "https://api.monday.com/v2"
r = requests.post(url=monday_apiUrl, json=data, headers=monday_headers)
r = r.json()
And the error I’m obtaining is:
{'errors': ={'message': 'Variable $myItemID of type ID! was provided invalid value', 'locations': i{'line': 1, 'column': 12}], 'extensions': {'value': None, 'problems': l{'path': ,], 'explanation': 'Expected value to not be null'}]}}], 'account_id':XXXXX}
$myItemID var is of type ID since I’m using ‘API-Version’: ‘2023-10’
Please help me identifying what I’m doing wrong.
Thanks!