It's all about the answers!

Ask a question

Is it possible to create a release with the REST API?


Lior B.A. (111) | asked Nov 10 '22, 1:45 a.m.

 Hi,


This is an old question that I didn't find an answer if it can be done and how.
Original question by Falk Bachmann:

"I want to create/add a new release to the project area through the REST API. How can i do this with the REST API or is it even possible? Right now this creation has to be done manually but i want to automate the release creation with Jenkins"

Thank you

2 answers



permanent link
Ralph Schoon (63.1k33646) | answered Nov 10 '22, 2:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 I am pretty sure, you can create releases using the Plain Java Client Library. As far as I  am aware it is an IDeliverable.


I have not tried to create a release using any REST APIs. The API that is used underneath the plain java client libraries is an internal API.


permanent link
David Honey (1.8k17) | answered Nov 10 '22, 5:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Nov 10 '22, 5:33 a.m.

Looking at a typical oslc:Service for an EWM project area, I only see an oslc:SelectionDialog and oslc:QueryCapability but no oslc:CreationFactory for releases (http://open-services.net/ns/cm#Deliverable).Which means there is no OSLC based REST API for creating releases.


Comments
Lior B.A. commented Nov 13 '22, 2:26 a.m.

Thank you for your response. 

I tried to perform REST calls with different parameters and after passing the security restrictions (SSL) I managed to get a success response, meaning  status 200, but the new release wasn't added to the Releases. So maybe this service is not open for calls from outside the system.


Ralph Schoon commented Nov 14 '22, 3:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Here the supported APIs: https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding


The REST APIs are the Jazz Foundation and the reportable REST APIs, that do not mention releases. Another REST API is the OSLC API, but, as David mentions there is no factory URL for releases, so you can not create them. 
 
I know that the Plain Java Client Libraries supports creating releases. It is a Java API, and you could create a small application that can be called in a build process to create a release using this API.


David Honey commented Nov 14 '22, 6:30 a.m. | edited Nov 14 '22, 6:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

On a related topic, if you are using configuration management, you should also read Work item linking in a global configuration context: Overview. When you create a release, you might want to associate it with a global configuration, and on that global cofiguration (and possible others related to it) create a link to that release.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.