Antoine_Sauteron_1266

Automic REST API - PUT Calls for updating Environment Dynamic property

Discussion created by Antoine_Sauteron_1266 on Oct 27, 2017
Latest reply on Nov 13, 2017 by martin_polak_automic
We have a requirement to be able to change the Environment Dynamic properties periodically.  Some of the applications use a pool of Databases and their allocation may change every few months. Allocation is maintained in an in-house portal and we would like to utilize that to update the Automic Environment dynamic properties whenever required.

I had a look at the REST calls to be able to automate this , however on the below link I don't see any example or guidance on PUT calls.

https://docs.automic.com/documentation/webhelp/english/ASO/12.0/DOCU/12.0/ARA%20Guides/Content/ARA/REST_API/RESTAPImethods.htm

May I request your assistance to get this requirement sorted.

There is no 'PUT' method, but you may be looking for 'POST' method to update packages - more specifically objects 'dynamic' and 'override':

dynamic: Type: object List of dynamic properties to set on the entity. It can be set with a name/value collection like this: "dynamic": {   "/server/url": "http://myserver.at",   "/server/port": 80 }

overrides: Type: object Map of dynamic properties to override on the entity. Property values to override are to be grouped by entity types and names (for components). The following sample overrides some properties on the related application and the components with name "Tomcat" and "IIS". Note: application is not grouped by name as we always have only one application in our context. "overrides": {   "application": {     "/ns1/prop1": "value1"   },   "components": {     "Tomcat": {       "/server/url": "http://localhost",       "/server/port": 80     },     "IIS": {       "/ns1/prop1": "test1",       "/ns1/prop2": "orig2"     }   } }

Source : https://docs.automic.com/documentation/WEBHELP/English/all/components/DOCU/12.0/ARA%20Guides/Content/raml_docu/ara.html#packages__packageid__post

Best regards,
Antoine

Outcomes