The question is answered, right answer was accepted
We are using the REST API to automate the onboarding of applications to UCD 6.1.0.1.
It doesn't appear that the documented /cli
API can create generic processes nor add/remove them from teams. I could see that capability being similar to creating an application process or component process, where you send a PUT request with a JSON representation of the process as the request payload.
I have two questions: does this sound doable from the undocumented REST API(s), and does this sound like a reasonable RFE?
Thank you,
Matt
Answer by Tim McMackin (1697) | Oct 27, 2014 at 02:15 PM
You could do this with the API, though it would take some work. You can get a WADL file of the undocumented REST API methods by going to the following URL:
http://hostname:port/rest/application.wadl
These APIs are not documented because they're intended to be used by the product UI, not by you and me. Still, you can use them to automate the server.
In that API, there is a "process" resource that has methods that can be used to create and update generic processes. For example, to create a generic process, use a command like this example:
curl -k -u admin:admin "http://hostname:port/rest/process" -X PUT -H 'Content-Type: application/json' -d @newProcess.json
where newProcess.json looks something like this:
{"name":"newprocess","description":"","workingDir":"${p:resource/work.dir}/${p:process.name}","notificationSchemeId":"","properties":{"workingDir":"${p:resource/work.dir}/${p:process.name}"},"teamMappings":[]}
Tip: A simple way to see how the API is being used is to enable a browser extension that tracks requests, such as Firebug. Then you can create and edit a process in the UI and see what REST requests are being sent. With that info, you can create your own REST requests to be used outside of the UI. So to learn how to edit existing processes, open a process in the editor and have a look at the requests that are sent.
Hopefully that helps. Let us know if you have other questions.
Pass Property Values to Application Process from Generic Process. 3 Answers
Authentication UrbanCode Deploy via REST API with XMLHttpRequest() in javascript 0 Answers
How can I call other component's process 1 Answer
How do I use a token with the uDeploy REST API? 5 Answers
uDeploy - Approval Execution Process 1 Answer