let’s say I have a board like below, I want to update the Status column based on the item id. I want to update the text of Customer Status column if a matched item id was found. In this case, the text ‘Active’ will be change to ‘Inactive’. How to do it python?
I tried:
query = ‘mutation ($columnVals: JSON!) { create_item (board_id:1234, item_name:12345, column_values:$columnVals) { id } }’
vars = {
‘columnVals’ : json.dumps({
‘status3’ : {‘text’ : ‘Inactive’}
})
}
data = {‘query’ : query, ‘variables’ : vars}
r = requests.post(url=apiUrl, json=data, headers=headers)
jsondata = r.json()
print(jsondata)
board item info:
“boards”: [
{
“name”: “myboard”,
“id”: “1234”,
“description”: “”,
“items”: [
{
“name”: “12345”,
“id”: “1234567”,
“column_values”: [
{
“title”: “Subitems”,
“id”: “subitems”,
“type”: “subtasks”,
“text”: “02342”
},
{
“title”: “Customer Status”,
“id”: “status3”,
“type”: “color”,
“text”: “Active Customer”
}]
}
]
}
]