Skip to content

Use "RequestCookie" in workflow inside "CallEndpoint" action #292

@ashishkumarc4u

Description

@ashishkumarc4u

I need to use "RequestCookie" in my workflow to pull the logs from ZPE Nodegrid API received in response to AUTHENTICATION.
But I'm a bit confused how to put correct information in below format and there is no example to refer from.
Please if someone can help.

IBM suggested SYNTAX:

<RequestCookie name=” ${//cookies/<cookie_name>/name}” value=”${/< savePath>/cookies/ <cookie_name> /value}”>

What I'm using:

	<CallEndpoint url="${/host}" method="GET" savePath="/NodeGridLog" >
		<RequestCookie name=” ${/Nodegrid_auth/cookies/set-cookie/name}” value=”${/Nodegrid_auth/cookies/set-cookie/value}”>
		<RequestHeader name="Content-Type" value="application/json" />
		<RequestHeader name="Accept" value="application/json" />			
    </CallEndpoint>

Auth response (coockie) for reference:

{"cookies":{"status_code":200,"status_message":"OK","headers":{"server":"gunicorn","date":"Thu, 26 Jun 2025 11:29:43 GMT","content-type":"application/json","allow":"POST, OPTIONS","x-frame-options":"DENY","content-length":"601","x-content-type-options":"nosniff","referrer-policy":"same-origin","cross-origin-opener-policy":"same-origin","set-cookie":"session=xeovgi9sh19abcdefghijtyytborcdfghf5bz; expires=Thu, 26 Jun 2025 11:34:43 GMT; HttpOnly; Max-Age=300; Path=/; SameSite=Strict; Secure","strict-transport-security":"max-age=180; includeSubDomains; preload","access-control-allow-origin":"https://www.zpecloud.com","access-control-allow-methods":"GET, PUT, POST, DELETE, PATCH, OPTIONS","access-control-allow-headers":"Accept,Accept-Encoding,Authorization,Content-Type,DNT,Origin,User-Agent,X-Ijt,X-Requested-With,X-Xsrf-Token,Keep-Alive","access-control-allow-credentials":"true","vary":"Cookie, origin,Origin","via":"1.1 google","alt-svc":"h3=":443"; ma=2592000,h3-29=":443"; ma=2592000"},"body":{"id":3008,"username":"abcd@xyz.com","email":"abcd@xyz.com","first_name":"AB","last_name":"CD","type":"CA","first_access":false,"creation_type":"LOCAL","company":{"id":516,"access":true,"address":"730 7th Ave, 28th Floor, LA, LA 10175","business_name":"XYZ","contact_info":"mnop@xyz.com","company_icon":null,"enabled_on_premise":false,"monitoring":true,"sub_domain":null,"upgrade_configuration":true,"has_pending_devices":false},"companies_count":1,"setup_pwd":false,"session_timeout":300,"access_level":3}}}

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions