Skip to content

manage_work_items

Manage Azure DevOps work items including tasks, bugs, user stories, epics, and features. Supports 18 actions covering CRUD operations, comments, linking, batch operations, and querying.

ActionDescriptionRequired ParamsOptional ParamsWrite
getGet a work item by IDwork_item_idproject_keyNo
batch_getGet multiple work items by IDswork_item_idsproject_key, fieldsNo
createCreate a new work itemproject_key, work_item_type, titledescription, state, assigned_to, area_path, iteration_path, priority, parent_id, tagsYes
updateUpdate an existing work itemwork_item_idproject_key, title, description, state, assigned_to, area_path, iteration_path, priority, tagsYes
deleteDelete a work itemwork_item_idproject_keyYes
add_commentAdd a comment to a work itemwork_item_id, commentproject_keyYes
update_commentUpdate an existing commentwork_item_id, comment_id, commentproject_keyYes
list_commentsList comments on a work itemwork_item_idproject_keyNo
get_linksGet work item relations/linkswork_item_idproject_keyNo
list_typesList available work item typesproject_keyNo
get_historyGet work item update historywork_item_idproject_keyNo
batch_updateUpdate multiple work items at oncework_item_idsproject_key, title, description, state, assigned_to, area_path, iteration_path, priority, tagsYes
add_childrenCreate child work items under a parentparent_id, work_item_type, titlesproject_keyYes
linkLink two work itemswork_item_id, target_id, link_typeproject_keyYes
unlinkRemove a relation from a work itemwork_item_id, relation_indexproject_keyYes
add_artifact_linkAdd an artifact link (e.g. commit)work_item_id, artifact_uri, link_typeproject_key, commentYes
my_itemsList work items assigned to the current userproject_keywork_item_type, include_completed, topNo
iteration_itemsList work items in an iterationproject_key, iteration_idteamNo
ParameterTypeDescription
actionstringRequired. The action to perform
project_keystringProject name (required for most actions)
work_item_idintegerWork item ID (required for get, update, delete, add_comment, list_comments, get_links, get_history)
work_item_idsinteger[]Work item IDs for batch operations (max 200)
work_item_typestringWork item type: Task, Bug, User Story, Epic, Feature, Issue (required for create)
titlestringWork item title (required for create)
descriptionstringWork item description in HTML (for create, update)
statestringWork item state: New, Active, Closed, etc. (for update)
assigned_tostringAssignee display name or email (for create, update)
area_pathstringArea path, e.g. Project\Team (for create, update)
iteration_pathstringIteration path, e.g. Project\Sprint 1 (for create, update)
priorityintegerPriority: 1=Critical, 2=High, 3=Medium, 4=Low (for create, update)
parent_idintegerParent work item ID to link (for create, add_children)
tagsstringSemicolon-separated tags (for create, update)
commentstringComment text in HTML (for add_comment, update_comment, add_artifact_link)
comment_idintegerComment ID (required for update_comment)
querystringWIQL query string
fieldsstring[]Fields to return for batch_get. Default: System.Title, System.State, System.AssignedTo
topintegerMax results to return (default 25 for my_items)
target_idintegerTarget work item ID (required for link)
link_typestringLink type name, e.g. System.LinkTypes.Related, System.LinkTypes.Hierarchy-Forward
relation_indexintegerRelation index to remove (required for unlink)
artifact_uristringArtifact URI, e.g. vstfs:///Git/Commit/{projectId}%2F{repoId}%2F{commitId}
titlesstring[]List of titles for child work items (required for add_children)
teamstringTeam name (optional, scopes iteration_items)
iteration_idstringIteration ID (required for iteration_items)
include_completedbooleanInclude completed/closed items (for my_items, default false)
{
"action": "get",
"work_item_id": 42
}
{
"action": "create",
"project_key": "MyProject",
"work_item_type": "Bug",
"title": "Login page returns 500 error",
"description": "<p>Steps to reproduce...</p>",
"priority": 2,
"assigned_to": "jane@example.com"
}
{
"action": "batch_get",
"work_item_ids": [42, 43, 44],
"fields": ["System.Title", "System.State", "System.AssignedTo"]
}
{
"action": "link",
"work_item_id": 42,
"target_id": 100,
"link_type": "System.LinkTypes.Related"
}
{
"action": "my_items",
"project_key": "MyProject",
"top": 50
}