How can I edit and publish draft via API ? Dmitriy Created November 09, 2022 17:13 Could you describe Draft fields and how can I edit them and also publish it ?
Hello,
Here is an example of publishing a draft:
where 2-5333 is the id of your draft.
As for updating the fields, please refer to this example: https://www.jetbrains.com/help/youtrack/devportal/api-how-to-update-custom-fields-values.html#step-by-step. However, you should send the request to https://<YouTrack address>/api/admin/users/me/drafts/<draft id> instead.
Generally, you can just open the browser console and check the requests YouTrack executes itself. This is the very same REST API.
Hope it helps.