Search code examples
azure-devopspostmanazure-devops-rest-api

Creating Issues on Board in Azure DevOps from API


My goal is to create issues on an Azure DevOps board using an API call as shown in this pictureenter image description here

. So each API call would do the same thing as pressing the New Item button in that picture.

This is the most relevant search result so far which doesn't have an examples to reference

https://learn.microsoft.com/en-us/rest/api/azure/devops/work/boards/list?view=azure-devops-rest-6.0

I haven't yet found any examples to reference in a Google web search, a video search, or in the existing code base.

I first want to create board issues through Postman, then build the code.

Do you have any examples of creating Azure DevOps board issues in Postman which I can reference?


Solution

  • Refer to the official doc: https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/create?view=azure-devops-rest-6.0&tabs=HTTP

    API using to create work item:

    POST https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/${type}?api-version=6.0
    

    Content-Type: application/json-patch+json

    enter image description here

    Body:

    enter image description here

    I am Using Basic Auth with DevOps PAT

    enter image description here

    In Azure DevOps UI

    enter image description here