I need to extract some values from the headers returned via API call
The text is like so
HTTP/1.1 204
Date: Mon, 30 Jun 2025 19:31:03 GMT
Connection: keep-alive
Set-Cookie: JSESSIONID=VERYLONGSESSIONIDSTRING; Path=/; Secure; HttpOnly; SameSite=lax
Set-Cookie: clientId=VERYLONGCLIENTIDSTRING; Path=/;
I'm trying to figure out how to extract "VERYLONGSESSIONIDSTRING" as "Session ID" and "VERYLONGCLIENTIDSTRING" as "ClientID" so I can then feed those values into the URL for the GET API call.
Thanks for an help!
@csh8428 one way of doing this
@csh8428 While the above does work fantastically, I personally like to parse and formula my way to the solution. Here is the approach that I used:
1. Parse the data into rows using Text To Column
2. Filter to specific rows in question (The common string in both is "Set-Cookie: ")
3. Categorize each by using the Contains() formula based on finding SESSIONID and clientid
4. Parse the Value fields out looking for common identifiers (they both start with the equal sign and end with "; Path=/;")
5. Transpose the data such that you have the column names that you want.
If it is helpful, I've created this video as an assist where I take some time to walk through the various steps: https://youtu.be/kzNXS0qu_Dc
I like both methods, but the method by @AlteryxTrev is better.
User | Count |
---|---|
52 | |
27 | |
25 | |
24 | |
21 |