Rundeck 5.0.1 API version mismatch and XML

Skip to first unread message

William Brundu

Jan 30, 2024, 6:54:08 AMJan 30
to rundeck-discuss

I have 2 major problems since my upgrade from 4.8 to 5.0.1.
I use the API version 41 in my calls.

1) Despite using undeck.feature.legacyXml.enabled=true in /etc/rundeck/, I can't get an XML response on some routes. For example:

$ curl -X GET -H "Accept: application/xml" http://localhost:4440/api/41/execution/34771?authtoken=XXXXXXXXXX
<error>An internal server error occurred</error>

The error is:

==> /var/log/rundeck/service.log <==
[2024-01-30T12:30:12,268] WARN  server.HttpChannel - /api/41/execution/34771
javax.servlet.ServletException: Could not resolve view with name 'apiExecution' in servlet with name 'grailsDispatcherServlet'
        at org.springframework.web.servlet.DispatcherServlet.render( ~[spring-webmvc-5.3.27.jar!/:5.3.27]

It works with json:

$ curl -X GET -H "Accept: application/json" http://localhost:4440/api/41/execution/34771?authtoken=XXXXXXXXXXXX
{"id":34771, ...............

2) This problem can be the cause of my problem 1. It seems that the API version in the request is ignored (/api/41/)
If I make an incorrect call the the API, I can see the response coming from API version 46:

$ curl -X POST http://localhost:4440/api/41/tokens?authtoken=XXXXXXXXXXXX
{"errorCode":"api.error.invalid.request","apiversion":46,"error":true,"message":"Invalid API Request: Expected request content to be one of allowed formats: [xml, json], but was: null"}

is this a bug, or did I forget something during the upgrade?

Jan 30, 2024, 8:01:26 AMJan 30
to rundeck-discuss

Hi William,

I reproduced your scenario (including the rundeck.feature.legacyXml.enabled=true property). Please open a new issue here.


William Brundu

Jan 30, 2024, 8:29:25 AMJan 30
to rundeck-discuss

Roger McCarrick

Jan 30, 2024, 12:00:44 PMJan 30
to rundeck-discuss
I thought the upgrade to 5.0 said to use API v46 and that XML output is no longer. The output is JSON. I have 5.0 on a test server and was able to parse the JSON output from an API (46) call.
Reply all
Reply to author
0 new messages