Unable to set a remote URL accepted by rundeck into an option

16 views
Skip to first unread message

mezam

unread,
Sep 17, 2024, 6:27:32 AMSep 17
to rundeck-discuss
Hello, I have a job with  three options. Into the first one the user selects an AD domain, then in the second the user types few characters, and in the third the result of the search in the selected domain appears. The result basically shows a list of user names to be selected. Behind there is a python script that performs the search and makes available the results on a web server. The Python part works. If I open the URL in a browser and replace the variable with real values, it returns a list of users matching the search criteria. But in rundeck the option that should show the list of results say:

Exception: java.net.URISyntaxException: Illegal character in query at index 30: http://localhost:8000?domain=${option.domain}&search_term=${option.search_term}

In the option where the results should show up I've set the following remote URL:

and I've also set a command step with the following (I don't know if necessary):
echo "Selected user: ${option.user_names}"

I can't see where I'm wrong. In the domain names that a user can select there are no spaces.

mezam

unread,
Sep 17, 2024, 8:54:14 AMSep 17
to rundeck-discuss
I forgot to mention that the data returned is in json format as requested  by rundeck. Following a sample of how it looks in the browser:


[
{"name": "(adm) user1"},{"name": "user2"},{"name": "user3"},{"name": "user4"}]

mezam

unread,
Sep 17, 2024, 9:13:46 AMSep 17
to rundeck-discuss
found the solution by myself.. I need to modify the python code so that it generates data with the 'value' attribute and modify the remote URL in job option like this:

Reply all
Reply to author
Forward
0 new messages