accessing url returned 406

Document ID : KB000103851
Last Modified Date : 29/06/2018
Show Technical Document Details
Issue:
Running the REST Operation CA Release Automation action generates the following errors:
Accessing URL [http://localhost:8080/datamanagement/a/api/v3/applications] returned [406]

Response File Output: 
The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.
 
Environment:
CA Release Automation 5.5.2.511 and above.
Cause:
The above error was seen while using "Accept: text/xml" in the Http Headers field of the action. This had worked in some versions (for ex: 5.5.2.191) but fixed in subsequent releases (for ex: 5.5.2.511 and above) since the Accept header with text/xml might give the impression that the output returned will be in text/xml format. CA Release Automations REST calls have always returned its data in json formatted response even in version 5.5.2.191 when it would return an http 200 response code. Example response from 5.5.2.191 which returns 200 response code even with Accept: text/xml header:
[{"id":"2721","name":"Application1"}]

 
Resolution:
Since the http header "Accept: text/xml" never actually returned xml data there should not be any need to handle the response data any differently. This means that you simply need to either remove the http headers and let it use default options or if you must have something there then you can define: Accept: application/json