Detach vcs root from build config with REST API

Answered

Hi,

Is this doable now? I see attaching can be done with REST.

 

Thanks,

Munawar

0
2 comments

Hello Munawar,

Yes, I have just tested the below endpoint:

[DELETE] /app/rest/buildTypes/id:<buildTypeID>/vcs-root-entries/id:<vcsRootID>

In this request, "id:<buildTypeID>" is a build type locator and "id:<vcsRootID>" is a VCS root locator, so you could make the request more complex if a condition for a removal requires that. For a simple case, though, you could get the build type ID from UI or via REST API call, run

[GET] /app/rest/buildTypes/id:<buildTypeID>

and retrieve a list of VCS roots from vcs-root-entries node. 

I hope this helps; please let me know in case of any questions or concerns.

1

Hi Fedor,

 

Thanks a lot! Works perfectly.

 

Thanks,

Munawar

 

 

0

Please sign in to leave a comment.