Hi wertzmp
In order to PUT or POST with Restman you will need to tailor the GET response. I've attached an examples for rest man GET, PUT and POST using service as the example resource type.
The Example's I ran below were using the Firefox browser extension "RESTClient". I set the following
Content-Type Header application/xml
Authentication Basic (policy manager admin credentials)
Service GET Example:
1. Perform a get or navigate to the restman url: https://gateway.com:9443/restman/1.0/services?name=EXAMPLESERVICE
For reference: ExampleServiceGET.xml
PUT Example to disable the existing service:
1. Relocate the name space to the Service element and strip the GET response down to the Service element and increment the version of the latest request
2. In the example below I increment the EXAMPLESERVICE to version 2 and change the "Enabled" element to false which disable the service in Policy Manager.
3. Send a PUT request to https://gatewayaddress:9443/restman/1.0/services/d1733a2484c853213614bccbbd779c61
For reference: ExampleServicePUT.xml
POST Example to create a new service named EXAMPLESERVICE1
1. Remove the Version and Service & Folder ID's from the aforementioned PUT request.
2. Change the Name element to 'EXAMPLESERVICE1' and change the UrlPattern element to /exampleservice1
3. Send a POST request to https://gatewayaddress:9443/restman/1.0/services
For reference: ExampleServiceGET.xml
To recap, a GET is returning the ITEM xml in its entirety with the actual resource as an element within the ITEM. To POST or PUT a resource you will need to relocate the name space to the resource element, strip the ITEM down to the resource element and send that to the appropriate restman URL. The restman docs available on your gateway will tell you the appropriate target URL depending on the resource type you are using.
If you have any other questions please feel free to ask.
Regards,
Kevin Russell
Support Engineer, Global Customer Success
Email: CATechnicalSupport@ca.com
Phone: +1 800 225 5224
Outside of North America - ca.com/us/worldwide.aspx
CA API Management Community: ca.com/talkapi