I have used the very helpful quickstart Tutorials (API Quickstart Tutorial - Python – Support (monday.com))as templates and attempted to write Python code to query boards. The querying part works fine. I have successfully posted requests and received sensible data from boards in my Monday.com account. I am therefore sure that the API Key, Url etc for the headers are correct and working fine.
Changing the “value” of a “linked board” column, proofs to be elusive. No matter how I tried adapting the examples from the turtorials, I cannot update the linked column’s “value”.
On Sep 24, 2020, “Captain” posted a topic with almost identical content for assistance - Change_column_value NOT WORKING in python - FAQs - monday Community. There were zero replies to the topic since then. I hope this is not because the problem has no solution.
Below is the code snippet:
mutation = “mutation {change_column_value (board_id: 123456789, item_id:1205882003,column_id:"linked_board_col",value:"{"linkedPulseIds":u{"linkedPulseId":1205923661}],"changed_at":"2021-04-12T20:09:37.996Z"}"){id}}”
data = {‘query’ : mutation}
r = requests.post(url=apiUrl, json=data, headers=headers) # make request
print(r.json())
This results in the following error:
{‘errors’: o{‘message’: ‘Parse error on “: {” (STRING) at :1, 152]’, ‘locations’: [{‘line’: 1, ‘column’: 152}]}], ‘account_id’: 8564194}
Process finished with exit code 0
Please assist.