VMware Cloud Community
BernhardSie
Contributor
Contributor

Using cookies in vCenter Orchestrator HTTP-REST plugin possible ?

I want to use the HTTP-REST plugin contained in vCenter Orchestrator.

I have to invoke a service by REST api, but a value has to be set as cookie in it's api (not as input parameter).

Is it possible to use cookies in the HTTP-REST plugin ?

If I execute the workflows "Add a REST operation" or "Invoke a REST operation" I can't find any input fields ?

I'm using vCenter Orchestrator Version 5.5.2 (and 5.5.1).

Thank you for any help!

More by chance I found out to set cookie value by method

    setHeader(String header, String value)

see 'Orchestrator Client'->'Tools'->'API Explorer'->'REST'->'RESTRequest'

In my case I have to set a 'SESSIONID' in a cookie and so I added 'setHeader' method to my workflow:

            :

     var request = myrestOperation.createRequest(inParamtersValues, content);

            :

->  request.setHeader("Cookie", "SESSIONID=" + sessionId);

            :

     var response = request.execute();

            :

Reply
0 Kudos
0 Replies