not able to add field to a work item type through rest api in azure devops

Madhurya Ramesh 1 Reputation point
2022-05-09T14:51:28.02+00:00

Used this documentation: https://learn.microsoft.com/en-us/rest/api/azure/devops/processes/fields/add?view=azure-devops-rest-6.0

200391-screenshot-58.png

200372-screenshot-59.png

Please refer to the above images. I have tried to add a field to a work item type through REST API and it has been failing.
In image 58, I tried to create a field called "timer". It failed and the error message says the field cannot be found but it's a POST call where we are trying to create/add a field but why is it looking for the field instead?
In image 59, I gave a field name "assignee" in request body which I had created manually through ADO UI. I used that field name in the POST call and it retrieved the details of that field.
My query is, why is it retrieving the details of an already existing field and is not able to create a new field? And why doesn't the request body contain other entries like description or name etc. of the field?

Looking forward to your response
Thanks & Regards,
Madhurya

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,733 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-05-09T14:59:20.82+00:00

    Devops / TFS is not currently supported here on Q&A. The product group for Azure DevOps / TFS actively monitors questions over at
    https://developercommunity.visualstudio.com/report?space=21&entry=problem
    https://developercommunity.visualstudio.com/report?space=22&entry=problem

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments