I'm testing out the Azure Boards rest API. I can currently create, delete and get items successfully, however I can't seem to move them between columns.
This is my request
https://{{AzureBoardsToken}}@{{AzureBoardsPath}}/_apis/wit/workitems/8907?api-version=6.0-preview.3
with a payload of
[
{
"op": "move",
"path": "{no idea what to put here}",
"from": "{no idea what to put here}",
"value": "{not sure if this is relevant for this operation}"
}
]
I don't find the documentation particularly useful as it assumes you know what those properties mean and where to get them.
Any help would be highly appreciated! The idea is to then integrate it in nodejs
To move workitem to another column you have to change "WEF_{id}_Kanban.Column" field.
Use PATCH to update your workitem with body:
[
{
"op": "replace",
"path": "/fields/WEF_F9DCD9224F6E466499435017DB7D2D07_Kanban.Column",
"value": "<column name>"
}
]
To move workitem to another column you have to change it "state". This only works if you assigned that state to the column.
Use PATCH to update your workitem with body:
[
{
"op": "replace",
"path": "/fields/System.State",
"value": "<column name>"
}
]
doc: https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/update?view=azure-devops-rest-6.0
EDIT (Adding new state):
Go to organization settings -> Process -> choose your workflow -> choose item type -> states -> new state (Add "In progress" here)

Tutorial: https://learn.microsoft.com/en-us/azure/devops/organizations/settings/work/customize-process-workflow?view=azure-devops#add-a-workflow-state
Then go to column setting on Kanban Board and associate new state with column

Tutorial: https://learn.microsoft.com/en-us/azure/devops/boards/boards/add-columns?view=azure-devops#update-kanban-column-to-state-mappings
After that try using API REST to change state, it should work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With