I want to create a custom Extension for AzureDevops. I'm using TypeScript SDK from Microsoft, unfortunately there is no method for creating a field, only for updating existing fields.
In Docs I found there's this endpoint: https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/get-work-item?view=azure-devops-rest-7.1&tabs=HTTP for fetching given WorkItem along with its fields and their values.
There are also other endpoints nearby, but they only allow me to manipulate on fields that already exist, how can I create a brand new field for a WorkItem ?
To meet your requirement, you can use the following two Rest APIs to create and add the new field to work item type.
Step1: Create New work item field: Fields - Create
Request Body:
Step2: Add the new Work item field to work item type: Fields - Add
Request Body:
You can use the following two Rest API to get the ProcessID and Workitemref.
Processid: Processes - List Workitemref:Work Item Types - Get Work Item Types