Skip to main content

when i try this in the API sandbox it works :


mutation {

change_multiple_column_values(board_id : 1140656959,

item_id :3969481029,

column_values: “{"person":{"personsAndTeams":"{"id":22027695,"kind":"person"}]}}”) {id}

}


when i try via posting JSON to the API - i get a 500 error code. heres what i post


{“query”:

“mutation {

change_multiple_column_values(board_id : 1140656959,

item_id :3969481240,

column_values: “{"person":{"personsAndTeams":n{"id":22027695,"kind":"person"}]}}”) {id}

}”}


heres the header info


Url = “https://api.monday.com/v2

Set objHTTP = CreateObject(“WinHttp.WinHttpRequest.5.1”)

objHTTP.Open “POST”, Url, False

objHTTP.setRequestHeader “Authorization”, apiKey

objHTTP.setRequestHeader “Content-Type”, “application/json”

objHTTP.send postData


both look identical.

i have a bunch of other updates status/name etc called in the same way that work fine, just for the person update i get the 500.

Hi @veloxjon


Generally when you receive a 500 error, it is due to the formatting of the request.


My guess in this instance would be your JSON encoding of the column_values value.


It looks like you are using VBA which I don’t have too much experience with making requests with, but this is a sample query in curl:

curl "https://api.monday.com/v2" \\ -X POST \\ -H "Content-Type:application/json" \\ -H "Authorization:MY_API_KEY" \\ -d '{"query":"mutation{change_multiple_column_values(item_id:162169283, board_id:162169280, column_values:\\"{\\\\\\"people_2\\\\\\" : {\\\\\\"personsAndTeams\\\\\\":"{\\\\\\"id\\\\\\":4616627,\\\\\\"kind\\\\\\":\\\\\\"person\\\\\\"},{\\\\\\"id\\\\\\":4616666,\\\\\\"kind\\\\\\":\\\\\\"person\\\\\\"},{\\\\\\"id\\\\\\":51166,\\\\\\"kind\\\\\\":\\\\\\"team\\\\\\"}]}}\\"){name}}"}'


This might help you with the JSON encoding of the payload.


Reply