Hey all! Has anyone pulled Sumo Logic User lists a...
# community-help
r
Hey all! Has anyone pulled Sumo Logic User lists and used Event Transformations to Explode the content? Getting:
Value at <X> is not an array or does not exist
As the return output is a huge list which is sub-divided into Arrays containing JSON, kinda like:
Copy code
{
"get_a_list_of_users_in_sumo_logic":
{
"body":
{
"data":
[

{
"firstName":"X",
"lastName":"X",
"email":"X",
"roleIds":
[
],
"createdAt":"X",
"createdBy":"X",
"modifiedAt":"X",
"modifiedBy":"X",
"id":"X",
"isActive":true,
"isLocked":false,
"isMfaEnabled":false,
"lastLoginTimestamp":"X"
},
Followed by the next user etc.. Im not sure if I am using Explode correctly here
m
Hmm! This is working for me:
Copy code
{
  "agents": [
    {
      "disabled": false,
      "name": "get a list of users in sumo logic",
      "options": "{\"mode\":\"message_only\",\"loop\":false,\"payload\":{\"body\":{\"data\":[{\"firstName\":\"X\",\"lastName\":\"X\",\"email\":\"X\",\"roleIds\":[],\"createdAt\":\"X\",\"createdBy\":\"X\",\"modifiedAt\":\"X\",\"modifiedBy\":\"X\",\"id\":\"X\",\"isActive\":true,\"isLocked\":false,\"isMfaEnabled\":false,\"lastLoginTimestamp\":\"X\"},{\"firstName\":\"X\",\"lastName\":\"X\",\"email\":\"X\",\"roleIds\":[],\"createdAt\":\"X\",\"createdBy\":\"X\",\"modifiedAt\":\"X\",\"modifiedBy\":\"X\",\"id\":\"X\",\"isActive\":true,\"isLocked\":false,\"isMfaEnabled\":false,\"lastLoginTimestamp\":\"X\"},{\"firstName\":\"X\",\"lastName\":\"X\",\"email\":\"X\",\"roleIds\":[],\"createdAt\":\"X\",\"createdBy\":\"X\",\"modifiedAt\":\"X\",\"modifiedBy\":\"X\",\"id\":\"X\",\"isActive\":true,\"isLocked\":false,\"isMfaEnabled\":false,\"lastLoginTimestamp\":\"X\"}]}}}",
      "position": {
        "x": 60,
        "y": 195
      },
      "type": "eventTransformation"
    },
    {
      "disabled": false,
      "name": "Explode",
      "options": "{\"mode\":\"explode\",\"path\":\"{{get_a_list_of_users_in_sumo_logic.body.data}}\",\"to\":\"individual_item\"}",
      "position": {
        "x": 60,
        "y": 345
      },
      "type": "eventTransformation"
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    }
  ],
  "diagramNotes": []
}
r
Hey Thomas! Apologies, I am being dumb but I see your Event Transform is not a HTTP request to Sumo?
m
yeah, sorry - i just mocked up the request so that the data would look the same
I took your response and created a few more elements in an array and exploded them
r
OK sorry so how would I apply that to my story?
Ohhh sorry I see in a Payload of the HTTP request
m
the
get a list of users in sumo logic
format should be identical
r
πŸ™‚ Thank you!
m
you're welcome πŸ™‚
r
βœ‹ 5️⃣