NEW RELEASE - Universal Cloud REST API Schema v2.1 - Cookie Support #263
ChrisCollinsIBM
announced in
Announcements
Replies: 2 comments 2 replies
-
|
Getting Error when I'm trying to configure workflow xml v2.1 to use requestCoockies sub-element as part of callEndpoint action. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
I'm trying below xml syntax. But when I'm trying to save the log source it's giving below error. The 'workflowParameterValues' parameter is not valid. FYI, Protocol version is latest "PROTOCOL-UniversalCloudRESTAPI-7.5-20250423073031.noarch" |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Universal Cloud REST API Schema v2.1 - Cookie Support
New Schema Namespace Value
To use any of the new tags please update your namespace to the v2.1 namespace URL of
http://qradar.ibm.com/UniversalCloudRESTAPI/Workflow/V2_1You will also need to install
PROTOCOL-UniversalCloudRESTAPI-7.5-20240812075740.noarch.rpmor later from Autoupdate or FixCentral to use the new v2.1 features.Cookie Support - Overview
Cookies can be utilized in API interactions in two ways, Response Cookies and Request Cookies.
A common use case is to get some type of auth token or sessionID returned in an API response in a cookie after hitting an authentication endpoint of some type (a response cookie). This value must be read from the response cookie and often attached in a request cookie in subsequent
<CallEndpoint>actions (a request cookie).Cookie Support - Response Cookies
This CURL debug example below shows an HTTP response with a response cookie for a cookie named JSESSIONID
Cookies are handled different than HTTP headers and thus wouldn't have previously appeared in the
/savePath/headersof the<CallEndpoint>response header map. A new path ofsavePath/cookieswill now contain a map of the response cookies indexed by name.Cookie values are encrypted when logged, but here's an example
<CallEndpoint>JSON response with the cookies and headers.So to access the value of
JSESSIONIDabove you would use${savePath/cookies/JSESSIONID/value}and the return value would be the unencrypted value which you could log to debug during development.Cookie Support - Request Cookies
Referring back to the response cookie example above, any further requests to this API above will need the JSESSIONID cookie attached to the request to carry the authenticated session through.
The v2.1 schema brings a new attribute to
<CallEndpoint>called<RequestCookie>and is outlined [here]Example usage:
In this example we pulled the JSESSIONID cookie from the previous response, but it could come from anywhere in the JSON state. We're also flagging it as secret here to ensure it isn't logged anywhere unencrypted since we know it's auth related but this flag is optional.
There are
domainandpathvalues you can manually set on the<RequestCookie>as well if needed, but those are set to the hostname and path of the<CallEndpont>fields by default to ensure they are attached to the request and do not usually need to be set explicitly.Beta Was this translation helpful? Give feedback.
All reactions