Release Automation

 View Only
  • 1.  Get properties of a different deployment plan?

    Posted Jul 28, 2016 05:33 AM

    Hi,

     

    I have the following scenario, where I have something I like to call a master deployment, which is simply said a management deployment for several subdeployments.

     

    at the moment I always create new deployment plans for each subdeployment when a master deploymen is started. I would like to change that, so that the master uses an already exisiting plan.

     

    for that to happen, normally the plan ID should be sufficient, but I need some properties as well, which are saved in the plan. so, my question is, can I get the values of deployment properties from any deployment plan just by having the plan id?

     

    I have seen the following rest call: /applications/{appId}/projects/{projectId}/deployment-plans/{deploymentPlanId} - CA Release Automation - 5.5.2 - CA Tech…  but there I also need the project and app id (which I would need to grab from the database) and also the properties are not listed in the response

     

    is there a build in way to get all properties or specific ones by entering the plan id and the needed property?

     

    thanks

    michael



  • 2.  Re: Get properties of a different deployment plan?
    Best Answer

    Posted Jul 28, 2016 07:21 AM

    Try this restAPI

    http://[RASERVER:[RAPORT]/datamanagement/a/releasecandidates/[PlanID]/properties

    This will generate the list of the deployment plan  properties



  • 3.  Re: Get properties of a different deployment plan?

    Posted Jul 28, 2016 07:50 AM

    Hi jacky,

     

    wow, thanks, that works.

     

    is there a reason why this isn't documented in the REST API Reference in the Wiki?

     

    best regards

    michael



  • 4.  Re: Get properties of a different deployment plan?

    Posted Jul 28, 2016 08:16 AM

    is there also a REST call to update a property with just the plan id?



  • 5.  Re: Get properties of a different deployment plan?

    Posted Jul 28, 2016 08:29 AM

    I think its possible but since its not documented it might be change in the future...

    using the previous call you will get the properties details including the properties id

    next use PUT method and update the value.

    e.g

    using GET method I retrieve my property details:

    {"list":[{"name":"HotDeploy?","value":{"id":"4180","type":"STRING","original":false,"arrayValue":[],"simpleValue":"True"},"id":"465","defaultProperty":false}]}

     

    In order to update  use PUT method with the following payload (note that now URL will include the property id)

    ...datamanagement/a/releasecandidates/18/properties/465

    Payload

    1. {"name":"HotDeploy?","value":{"id":"4180","type":"STRING","original":false,"arrayValue":[],"simpleValue":"NEW_VALUE"},"id":"465","defaultProperty":false}


  • 6.  Re: Get properties of a different deployment plan?

    Posted Jul 28, 2016 08:34 AM

    Ok, thanks.

     

    so would you recommand using the GET you posted first or should I better not use it, as it is not documented?



  • 7.  Re: Get properties of a different deployment plan?

    Posted Jul 28, 2016 08:48 AM

    Since both are not documented there is small risk the API will be replaced in the future.

    I suggest to open request/idea to make them official



  • 8.  Re: Get properties of a different deployment plan?

    Posted Jul 28, 2016 08:49 AM

    ok, will do



  • 9.  Re: Get properties of a different deployment plan?

    Posted Jul 28, 2016 08:49 AM

    yeah, nevermind about the setting/PUT, i can handle it differently, when I'm setting the property when starting a deployment with the "run-deployments" REST call



  • 10.  Re: Get properties of a different deployment plan?

    Posted Jul 28, 2016 08:54 AM

    here is the "idea" to make the GET an official REST call: REST Call - Get Deployment Plan Properties