Azure DevOps
App · Code Repositories · 20 actions
Work with Azure Boards, Repos and Pipelines from a workflow: create, update, query and comment on work items; list branches and commits; open, review, comment on and complete pull requests; and start pipeline runs and follow them to a result.
Actions
| Action | What it does |
|---|---|
| Comment on a pull request | Start a new comment thread on a pull request's overview. |
| Comment on a work item | Add a comment to a work item's discussion. |
| Create a pull request | Open a pull request from one branch into another. |
| Create a work item | Create a work item: a Task, Bug, User Story or any type the project has. |
| Delete a work item | Delete a work item. |
| Get a pipeline run | Get a pipeline run's state and, once finished, its result. |
| Get a pull request | Get one pull request with its reviewers, votes and linked work items. |
| Get a work item | Get one work item with all its fields. |
| List branches | List a repository's branches. |
| List commits | List a repository's commits, newest first. |
| List pipeline runs | List a pipeline's runs, newest first. |
| List pipelines | List a project's pipelines. |
| List projects | List the projects in the organization that the token can see. |
| List pull requests | List a repository's pull requests. |
| List repositories | List a project's Git repositories with their default branches. |
| List work item types | List a project's work item types with their states and required fields. |
| Query work items | Find work items with a WIQL query and return them with their fields. |
| Run a pipeline | Start a pipeline run. |
| Update a pull request | Retitle a pull request, abandon or reactivate it, or complete (merge) it. |
| Update a work item | Change a work item's fields. |
Comment on a pull request
Start a new comment thread on a pull request's overview.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Repository
repositorytextRequired - Pick a repository after choosing the project, or type its name or id.
- Pull request ID
pull_request_idtextRequired - The pull request's number, or its Azure DevOps link.
- Comment
contenttextRequired - The comment, in Markdown.
- Thread status
thread_statustext - Defaults to Active.One of:
active,pending,fixed(Resolved),wontFix(Won't fix),byDesign(By design),closed.
Outputs
authortextcomment_idtextcontenttextpublished_datetextpull_request_idtextstatustextthread_idtext
Example output
{
"author": "Jamal Hartnett",
"comment_id": "1",
"content": "Looks good once the tests pass.",
"published_date": "2026-09-22T09:30:00Z",
"pull_request_id": "22",
"status": "active",
"thread_id": "148"
}Comment on a work item
Add a comment to a work item's discussion.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Work item ID
work_item_idtextRequired - The work item's number, or its Azure DevOps link.
- Comment
commenttextRequired - The comment. Basic HTML is kept.
Outputs
commenttextrevnumberurltextwork_item_idtext
Example output
{
"comment": "Release notes drafted.",
"rev": 3,
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_workitems/edit/131",
"work_item_id": "131"
}Create a pull request
Open a pull request from one branch into another.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Repository
repositorytextRequired - Pick a repository after choosing the project, or type its name or id.
- Source branch
source_branchtextRequired - The branch with the changes, e.g. feature/export.
- Target branch
target_branchtext - Defaults to the repository's default branch.
- Title
titletextRequired - The pull request's title.
- Description
descriptiontext - Markdown, up to 4,000 characters.
- Draft
is_drafttrue/false - Open it as a draft, so reviewers are not asked yet.Default:
false. - Reviewer IDs
reviewer_idslist - Reviewers' Azure DevOps user ids (GUIDs). 'Get a pull request' lists reviewers with their ids.
- Work item IDs
work_item_idslist - Work items to link to the pull request.
Outputs
closed_datetextcreated_bytextcreated_by_emailtextcreation_datetextdescriptiontextidtextis_drafttrue/falselast_merge_source_committextmerge_statustextprojecttextrepository_idtextrepository_nametextreviewerslistsource_branchtextsource_ref_nametextstatustexttarget_branchtexttarget_ref_nametexttitletexturltextwork_item_idslist
Example output
{
"closed_date": null,
"created_by": "Jamal Hartnett",
"created_by_email": "jamal@fabrikam.com",
"creation_date": "2026-09-22T09:10:00Z",
"description": "Adds a CSV export to the reports page.",
"id": "22",
"is_draft": false,
"last_merge_source_commit": "b60280bc6e62e2f880f1b63c1e24987664d3bda3",
"merge_status": "succeeded",
"project": "Fabrikam-Fiber",
"repository_id": "5febef5a-833d-4e14-b9c0-14cb638f91e6",
"repository_name": "Fabrikam-Fiber",
"reviewers": [
{
"display_name": "Normal Paulk",
"id": "d6245f20-2af8-44f4-9451-8107cb2767db",
"is_required": false,
"unique_name": "normal@fabrikam.com",
"vote": 0,
"vote_label": "no vote"
}
],
"source_branch": "feature/export",
"source_ref_name": "refs/heads/feature/export",
"status": "active",
"target_branch": "main",
"target_ref_name": "refs/heads/main",
"title": "Add CSV export",
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber/pullrequest/22",
"work_item_ids": [
"131"
]
}Create a work item
Create a work item: a Task, Bug, User Story or any type the project has.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Type
work_item_typetextRequired - Pick a type after choosing the project.
- Title
titletextRequired - The work item's title.
- Description
descriptiontext - The description. Basic HTML such as <b> and <ul> is kept.
- Assigned to
assigned_totext - The person's email address as it appears in Azure DevOps.
- State
statetext - e.g. New, Active, Closed. Must be a state of this type and, on an update, a valid next step from the current one.
- Priority
prioritytext - 1 is the highest.One of:
1(1 (highest)),2(2 (high)),3(3 (medium)),4(4 (low)). - Tags
tagslist - Tags to set. On an update this replaces the item's tags.
- Area path
area_pathtext - e.g. MyProject\Web. Defaults to the project's root area.
- Iteration path
iteration_pathtext - e.g. MyProject\Sprint 12. Defaults to the project's root.
- Other fields
additional_fieldsobject - Any other fields, keyed by reference name, e.g. {"Microsoft.VSTS.Scheduling.StoryPoints": 3}.
Outputs
area_pathtextassigned_totextassigned_to_emailtextchanged_datetextcreated_bytextcreated_datetextdescriptiontextfieldsobjectidtextiteration_pathtextprioritynumberprojecttextreasontextrevnumberstatetexttagslisttitletexturltextwork_item_typetext
Example output
{
"area_path": "Fabrikam-Fiber",
"assigned_to": "Jamal Hartnett",
"assigned_to_email": "jamal@fabrikam.com",
"changed_date": "2026-09-22T09:00:00.000Z",
"created_by": "Jamal Hartnett",
"created_date": "2026-09-22T09:00:00.000Z",
"description": "<div>Cover the new export feature.</div>",
"fields": {
"System.State": "New",
"System.Title": "Update the release notes",
"System.WorkItemType": "Task"
},
"id": "131",
"iteration_path": "Fabrikam-Fiber\\Sprint 12",
"priority": 2,
"project": "Fabrikam-Fiber",
"reason": "New",
"rev": 1,
"state": "New",
"tags": [
"docs"
],
"title": "Update the release notes",
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_workitems/edit/131",
"work_item_type": "Task"
}Delete a work item
Delete a work item. By default it goes to the project's Recycle Bin, where it can be restored.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Work item ID
work_item_idtextRequired - The work item's number, or its Azure DevOps link.
- Delete permanently
permanentlytrue/false - Skip the Recycle Bin. This cannot be undone, and needs the 'Permanently delete work items' permission.Default:
false.
Outputs
deletedtrue/falsedeleted_bytextdeleted_datetextidtextpermanentlytrue/false
Example output
{
"deleted": true,
"deleted_by": "Jamal Hartnett",
"deleted_date": "2026-09-22T10:00:00Z",
"id": "131",
"permanently": false
}Get a pipeline run
Get a pipeline run's state and, once finished, its result.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Pipeline
pipeline_idtextRequired - Pick a pipeline after choosing the project, or type its id (the definitionId in the pipeline's address).
- Run ID
run_idtextRequired - The run's id, or its Azure DevOps link (buildId=...).
Outputs
created_datetextfinished_datetextidtextnametextpipeline_idtextpipeline_nametextresulttextstatetexttemplate_parametersobjecturltext
Example output
{
"created_date": "2026-09-22T09:20:00Z",
"finished_date": "2026-09-22T09:25:00Z",
"id": "345",
"name": "20260922.1",
"pipeline_id": "12",
"pipeline_name": "Fabrikam-Fiber CI",
"result": "succeeded",
"state": "completed",
"template_parameters": {},
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_build/results?buildId=345"
}Get a pull request
Get one pull request with its reviewers, votes and linked work items.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Repository
repositorytextRequired - Pick a repository after choosing the project, or type its name or id.
- Pull request ID
pull_request_idtextRequired - The pull request's number, or its Azure DevOps link.
Outputs
closed_datetextcreated_bytextcreated_by_emailtextcreation_datetextdescriptiontextidtextis_drafttrue/falselast_merge_source_committextmerge_statustextprojecttextrepository_idtextrepository_nametextreviewerslistsource_branchtextsource_ref_nametextstatustexttarget_branchtexttarget_ref_nametexttitletexturltextwork_item_idslist
Example output
{
"closed_date": null,
"created_by": "Jamal Hartnett",
"created_by_email": "jamal@fabrikam.com",
"creation_date": "2026-09-22T09:10:00Z",
"description": "Adds a CSV export to the reports page.",
"id": "22",
"is_draft": false,
"last_merge_source_commit": "b60280bc6e62e2f880f1b63c1e24987664d3bda3",
"merge_status": "succeeded",
"project": "Fabrikam-Fiber",
"repository_id": "5febef5a-833d-4e14-b9c0-14cb638f91e6",
"repository_name": "Fabrikam-Fiber",
"reviewers": [
{
"display_name": "Normal Paulk",
"id": "d6245f20-2af8-44f4-9451-8107cb2767db",
"is_required": false,
"unique_name": "normal@fabrikam.com",
"vote": 0,
"vote_label": "no vote"
}
],
"source_branch": "feature/export",
"source_ref_name": "refs/heads/feature/export",
"status": "active",
"target_branch": "main",
"target_ref_name": "refs/heads/main",
"title": "Add CSV export",
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber/pullrequest/22",
"work_item_ids": [
"131"
]
}Get a work item
Get one work item with all its fields.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Work item ID
work_item_idtextRequired - The work item's number, or its Azure DevOps link.
Outputs
area_pathtextassigned_totextassigned_to_emailtextchanged_datetextcreated_bytextcreated_datetextdescriptiontextfieldsobjectidtextiteration_pathtextprioritynumberprojecttextreasontextrevnumberstatetexttagslisttitletexturltextwork_item_typetext
Example output
{
"area_path": "Fabrikam-Fiber",
"assigned_to": "Jamal Hartnett",
"assigned_to_email": "jamal@fabrikam.com",
"changed_date": "2026-09-22T09:00:00.000Z",
"created_by": "Jamal Hartnett",
"created_date": "2026-09-22T09:00:00.000Z",
"description": "<div>Cover the new export feature.</div>",
"fields": {
"System.State": "New",
"System.Title": "Update the release notes",
"System.WorkItemType": "Task"
},
"id": "131",
"iteration_path": "Fabrikam-Fiber\\Sprint 12",
"priority": 2,
"project": "Fabrikam-Fiber",
"reason": "New",
"rev": 1,
"state": "New",
"tags": [
"docs"
],
"title": "Update the release notes",
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_workitems/edit/131",
"work_item_type": "Task"
}List branches
List a repository's branches.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Repository
repositorytextRequired - Pick a repository after choosing the project, or type its name or id.
- Name contains
containstext - Only branches whose name contains this text.
- Maximum results
max_resultsnumber - Defaults to 100 if left blank.From 1 to 1000.
Outputs
countnumberitemslist
Example output
{
"count": 1,
"items": [
{
"creator": "Jamal Hartnett",
"is_locked": false,
"name": "feature/export",
"object_id": "b60280bc6e62e2f880f1b63c1e24987664d3bda3",
"ref_name": "refs/heads/feature/export"
}
]
}List commits
List a repository's commits, newest first.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Repository
repositorytextRequired - Pick a repository after choosing the project, or type its name or id.
- Branch
branchtext - Defaults to the repository's default branch.
- Author
authortext - Only commits by this author (name or email).
- From
from_datedate and time - Only commits made on or after this moment.
- To
to_datedate and time - Only commits made on or before this moment.
- Path
item_pathtext - Only commits touching this file or folder, e.g. /src/app.py.
- Maximum results
max_resultsnumber - Defaults to 100 if left blank.From 1 to 1000.
- Skip
skipnumber - How many results to skip, to page past ones already fetched.At least 0.
Outputs
countnumberitemslist
Example output
{
"count": 1,
"items": [
{
"author_date": "2026-09-21T16:30:00Z",
"author_email": "jamal@fabrikam.com",
"author_name": "Jamal Hartnett",
"change_counts": {
"Add": 1,
"Edit": 2
},
"comment": "Add CSV export",
"comment_truncated": false,
"commit_id": "b60280bc6e62e2f880f1b63c1e24987664d3bda3",
"committer_date": "2026-09-21T16:30:00Z",
"committer_name": "Jamal Hartnett",
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber/commit/b60280bc6e62e2f880f1b63c1e24987664d3bda3"
}
]
}List pipeline runs
List a pipeline's runs, newest first.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Pipeline
pipeline_idtextRequired - Pick a pipeline after choosing the project, or type its id (the definitionId in the pipeline's address).
- Maximum results
max_resultsnumber - Defaults to 100 if left blank.From 1 to 1000.
Outputs
countnumberitemslist
Example output
{
"count": 1,
"items": [
{
"created_date": "2026-09-22T09:20:00Z",
"finished_date": null,
"id": "345",
"name": "20260922.1",
"pipeline_id": "12",
"pipeline_name": "Fabrikam-Fiber CI",
"result": null,
"state": "inProgress",
"template_parameters": {},
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_build/results?buildId=345"
}
]
}List pipelines
List a project's pipelines.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Maximum results
max_resultsnumber - Defaults to 100 if left blank.From 1 to 1000.
Outputs
countnumberitemslist
Example output
{
"count": 1,
"items": [
{
"folder": "\\",
"id": "12",
"name": "Fabrikam-Fiber CI",
"revision": 3,
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_build/definition?definitionId=12"
}
]
}List projects
List the projects in the organization that the token can see.
Inputs
- State
statetext - Defaults to projects that are ready to use.One of:
wellFormed(Ready to use),all(All, including those being created or deleted). - Maximum results
max_resultsnumber - Defaults to 100 if left blank.From 1 to 1000.
- Skip
skipnumber - How many results to skip, to page past ones already fetched.At least 0.
Outputs
countnumberitemslist
Example output
{
"count": 1,
"items": [
{
"description": "Team project for the Fabrikam Fiber app",
"id": "eb6e4656-77fc-42a1-9181-4c6d8e9da5d1",
"last_update_time": "2026-09-01T10:00:00.000Z",
"name": "Fabrikam-Fiber",
"state": "wellFormed",
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber",
"visibility": "private"
}
]
}List pull requests
List a repository's pull requests.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Repository
repositorytextRequired - Pick a repository after choosing the project, or type its name or id.
- Status
statustext - Defaults to active pull requests.One of:
active,completed,abandoned,all. - Source branch
source_branchtext - Only pull requests from this branch.
- Target branch
target_branchtext - Only pull requests into this branch.
- Maximum results
max_resultsnumber - Defaults to 100 if left blank.From 1 to 1000.
- Skip
skipnumber - How many results to skip, to page past ones already fetched.At least 0.
Outputs
countnumberitemslist
Example output
{
"count": 1,
"items": [
{
"closed_date": null,
"created_by": "Jamal Hartnett",
"created_by_email": "jamal@fabrikam.com",
"creation_date": "2026-09-22T09:10:00Z",
"description": "Adds a CSV export to the reports page.",
"id": "22",
"is_draft": false,
"last_merge_source_commit": "b60280bc6e62e2f880f1b63c1e24987664d3bda3",
"merge_status": "succeeded",
"project": "Fabrikam-Fiber",
"repository_id": "5febef5a-833d-4e14-b9c0-14cb638f91e6",
"repository_name": "Fabrikam-Fiber",
"reviewers": [
{
"display_name": "Normal Paulk",
"id": "d6245f20-2af8-44f4-9451-8107cb2767db",
"is_required": false,
"unique_name": "normal@fabrikam.com",
"vote": 0,
"vote_label": "no vote"
}
],
"source_branch": "feature/export",
"source_ref_name": "refs/heads/feature/export",
"status": "active",
"target_branch": "main",
"target_ref_name": "refs/heads/main",
"title": "Add CSV export",
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber/pullrequest/22",
"work_item_ids": [
"131"
]
}
]
}List repositories
List a project's Git repositories with their default branches.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Name
nametext - Only the repository with exactly this name.
Outputs
countnumberitemslist
Example output
{
"count": 1,
"items": [
{
"default_branch": "main",
"default_branch_ref": "refs/heads/main",
"id": "5febef5a-833d-4e14-b9c0-14cb638f91e6",
"is_disabled": false,
"is_fork": false,
"name": "Fabrikam-Fiber",
"project": "Fabrikam-Fiber",
"remote_url": "https://fabrikam@dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber",
"size": 204800,
"ssh_url": "git@ssh.dev.azure.com:v3/fabrikam/Fabrikam-Fiber/Fabrikam-Fiber",
"web_url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber"
}
]
}List work item types
List a project's work item types with their states and required fields. The types depend on the project's process.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
Outputs
countnumberitemslist
Example output
{
"count": 1,
"items": [
{
"color": "F2CB1D",
"description": "Tracks work that needs to be done.",
"name": "Task",
"reference_name": "Microsoft.VSTS.WorkItemTypes.Task",
"required_fields": [
"System.Title"
],
"states": [
"New",
"Active",
"Closed",
"Removed"
]
}
]
}Query work items
Find work items with a WIQL query and return them with their fields. Flat queries only.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- WIQL query
wiqltextRequired - A Work Item Query Language query. In Azure DevOps, Boards → Queries → Edit WIQL shows the WIQL of any saved query.
- Maximum results
max_resultsnumber - Defaults to 50 if left blank.From 1 to 200.
Outputs
countnumberitemslisttotal_matchednumber
Example output
{
"count": 1,
"items": [
{
"area_path": "Fabrikam-Fiber",
"assigned_to": "Jamal Hartnett",
"assigned_to_email": "jamal@fabrikam.com",
"changed_date": "2026-09-22T09:00:00.000Z",
"created_by": "Jamal Hartnett",
"created_date": "2026-09-22T09:00:00.000Z",
"description": "<div>Cover the new export feature.</div>",
"fields": {
"System.State": "New",
"System.Title": "Update the release notes",
"System.WorkItemType": "Task"
},
"id": "131",
"iteration_path": "Fabrikam-Fiber\\Sprint 12",
"priority": 2,
"project": "Fabrikam-Fiber",
"reason": "New",
"rev": 1,
"state": "New",
"tags": [
"docs"
],
"title": "Update the release notes",
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_workitems/edit/131",
"work_item_type": "Task"
}
],
"total_matched": 1
}Run a pipeline
Start a pipeline run. It returns as soon as the run is queued; use 'Get a pipeline run' to follow it.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Pipeline
pipeline_idtextRequired - Pick a pipeline after choosing the project, or type its id (the definitionId in the pipeline's address).
- Branch
branchtext - Defaults to the pipeline's default branch.
- Parameters
template_parametersobject - Values for the pipeline's runtime parameters.
- Variables
variablesobject - Variable values. Each variable must be marked 'Let users override this value when running this pipeline'.
Outputs
created_datetextfinished_datetextidtextnametextpipeline_idtextpipeline_nametextresulttextstatetexttemplate_parametersobjecturltext
Example output
{
"created_date": "2026-09-22T09:20:00Z",
"finished_date": null,
"id": "345",
"name": "20260922.1",
"pipeline_id": "12",
"pipeline_name": "Fabrikam-Fiber CI",
"result": null,
"state": "inProgress",
"template_parameters": {},
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_build/results?buildId=345"
}Update a pull request
Retitle a pull request, abandon or reactivate it, or complete (merge) it. Branch policies still apply to completing.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Repository
repositorytextRequired - Pick a repository after choosing the project, or type its name or id.
- Pull request ID
pull_request_idtextRequired - The pull request's number, or its Azure DevOps link.
- Title
titletext - A new title.
- Description
descriptiontext - A new description, up to 4,000 characters.
- Status
statustext - Leave blank to keep the current status.One of:
active(Active (reactivate an abandoned pull request)),abandoned(Abandoned (close without merging)),completed(Completed (merge it)). - Merge type
merge_strategytext - How to merge when completing.One of:
noFastForward(Merge (no fast-forward)),squash(Squash commit),rebase(Rebase and fast-forward),rebaseMerge(Semi-linear merge (rebase, then merge commit)). - Delete source branch
delete_source_branchtrue/false - Delete the source branch after completing.
- Merge commit message
merge_commit_messagetext - The message for the merge commit when completing.
- Complete linked work items
transition_work_itemstrue/false - Move linked work items to their next state when completing.
Outputs
closed_datetextcreated_bytextcreated_by_emailtextcreation_datetextdescriptiontextidtextis_drafttrue/falselast_merge_source_committextmerge_statustextprojecttextrepository_idtextrepository_nametextreviewerslistsource_branchtextsource_ref_nametextstatustexttarget_branchtexttarget_ref_nametexttitletexturltextwork_item_idslist
Example output
{
"closed_date": null,
"created_by": "Jamal Hartnett",
"created_by_email": "jamal@fabrikam.com",
"creation_date": "2026-09-22T09:10:00Z",
"description": "Adds a CSV export to the reports page.",
"id": "22",
"is_draft": false,
"last_merge_source_commit": "b60280bc6e62e2f880f1b63c1e24987664d3bda3",
"merge_status": "succeeded",
"project": "Fabrikam-Fiber",
"repository_id": "5febef5a-833d-4e14-b9c0-14cb638f91e6",
"repository_name": "Fabrikam-Fiber",
"reviewers": [
{
"display_name": "Normal Paulk",
"id": "d6245f20-2af8-44f4-9451-8107cb2767db",
"is_required": false,
"unique_name": "normal@fabrikam.com",
"vote": 0,
"vote_label": "no vote"
}
],
"source_branch": "feature/export",
"source_ref_name": "refs/heads/feature/export",
"status": "abandoned",
"target_branch": "main",
"target_ref_name": "refs/heads/main",
"title": "Add CSV export",
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_git/Fabrikam-Fiber/pullrequest/22",
"work_item_ids": [
"131"
]
}Update a work item
Change a work item's fields. Only the fields you fill in are changed.
Inputs
- Project
projecttextRequired - The Azure DevOps project, by name.
- Work item ID
work_item_idtextRequired - The work item's number, or its Azure DevOps link.
- Title
titletext - The work item's title.
- Description
descriptiontext - The description. Basic HTML such as <b> and <ul> is kept.
- Assigned to
assigned_totext - The person's email address as it appears in Azure DevOps.
- State
statetext - e.g. New, Active, Closed. Must be a state of this type and, on an update, a valid next step from the current one.
- Priority
prioritytext - 1 is the highest.One of:
1(1 (highest)),2(2 (high)),3(3 (medium)),4(4 (low)). - Tags
tagslist - Tags to set. On an update this replaces the item's tags.
- Area path
area_pathtext - e.g. MyProject\Web. Defaults to the project's root area.
- Iteration path
iteration_pathtext - e.g. MyProject\Sprint 12. Defaults to the project's root.
- Other fields
additional_fieldsobject - Any other fields, keyed by reference name, e.g. {"Microsoft.VSTS.Scheduling.StoryPoints": 3}.
Outputs
area_pathtextassigned_totextassigned_to_emailtextchanged_datetextcreated_bytextcreated_datetextdescriptiontextfieldsobjectidtextiteration_pathtextprioritynumberprojecttextreasontextrevnumberstatetexttagslisttitletexturltextwork_item_typetext
Example output
{
"area_path": "Fabrikam-Fiber",
"assigned_to": "Jamal Hartnett",
"assigned_to_email": "jamal@fabrikam.com",
"changed_date": "2026-09-22T09:00:00.000Z",
"created_by": "Jamal Hartnett",
"created_date": "2026-09-22T09:00:00.000Z",
"description": "<div>Cover the new export feature.</div>",
"fields": {
"System.State": "New",
"System.Title": "Update the release notes",
"System.WorkItemType": "Task"
},
"id": "131",
"iteration_path": "Fabrikam-Fiber\\Sprint 12",
"priority": 2,
"project": "Fabrikam-Fiber",
"reason": "New",
"rev": 2,
"state": "Active",
"tags": [
"docs"
],
"title": "Update the release notes",
"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber/_workitems/edit/131",
"work_item_type": "Task"
}