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”.
Hey @louisdl
Actually there’s an error in your query.
If you put it into the API Playground you’ll find it gives you an error.
First of all, I don’t know if it’s something related to this forum style, but you need to use straight double quotes " instead of the diagonal ones “.
Then you need to escape all double quotes inside strings
I copied the text into the Monday.com Topic area from a text editor which I used to prepare the content of my post. I did not realize that some characters got lost in the copying and pasting - my code actually had all the escapes for the double quotes, and, it had the straight quotes.
I will post the same again and see if I can improve my post’s accuracy.
mutation - ‘mutation {change_column_value (board_id: 123456789,
item_id:1205882003, column_id:'linked_board_col', value:'{'linkedPulseIds':
[{'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())
It seems that the escapes gets lost in translation. Please assume that all quotes inside the the brackets has an escape character (backslash \ ) . I do not know why it does not show when I submit the post