javayoutrackyoutrack-api

Hot to add version to your youtrack project using one request


Some context

I am currently working on renewing legacy youtrack api on new one. Thing that bothers me is how to add a new version to your project. To do so you have to send https://youtrack/api/admin/customFieldSettings/bundles/version POST request with VersionBundleElements in the body, which is quite logical, but it seems like you have to send ALL of the versions that project already has, it would mean that you have to send 2 requests to add new version to the project: one to get all versions and one to send the same versions with a new one, which is not so pleasant

The question

The question is: is there a way to add new version to the project sending only one request?


Solution

  • No, you should get all the current values in the first request, and then send a second request with all the current values together with your new data.