Skip to content

[API_13] RundeckClient builder not working with sessionId #5

Description

@rmartev

After I have obtained the value of the JSESSIONID cookie (I've logged in using the plain API, not the java client), I'm trying to create a RundeckClienti with which I could run the other requests to the Rundeck server. Here is a snippet of my code:

RundeckClientBuilder clientBuilder = RundeckClient.builder();
clientBuilder.url(rundeckServerUrl);
clientBuilder.sessionId(jsessionid);
rundeckClient = clientBuilder.build();

where "jsessionid" is the value of the cookie, that I took from the password authentication (it is NOT null). The execution of this snippet throws the following exception:

java.lang.IllegalArgumentException: sessionId cannot be blank
at org.rundeck.api.util.AssertUtil.notBlank(AssertUtil.java:49)
at org.rundeck.api.RundeckClientBuilder.build(RundeckClientBuilder.java:94)

Am I missusing the API? Please, help.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions