Getting the following response <Response [422]> {'overall': {}, 'fields': {'pipeline': 'Required'}}

Hello All, I am new using Pendo and I came across the following error: 

<Response [422]> {'overall': {}, 'fields': {'pipeline': 'Required'}}

I am using the following python payload that I convert to json  in the post request. 

This is the snipped of the code. Would you be able to help me to figure out what could be wrong? Thanks in advance

data_payload = {
    "requestId": "lastDaysEventAndMinuteTotals",
    "timeSeries": {
        "period": "dayRange",
        "count": 30,
        "first": 1404745200000
    },
    "source": {
        "events": None
    },
    "pipeline": [
        {
            "group": {
                "group": [
                    "visitorId"
                ],
                "fields": {
                    "visitorMinutes": {
                        "sum": "numMinutes"
                    }
                }
            },
            "reduce": {
                "visitorCount": {
                    "count": "numVisitors"
                },
                "totalMinutes": {
                    "sum": "visitorMinutes"
                }
            }
        }
    ]
}
##data = json.dumps(data_payload)

headers = {
    'x-pendo-integration-key': API_Key,
    'content-type': "application/json"
}
logger.info(f"Getting data from endpoint: {url}")
response = requests.post(url, json=data_payload, headers=headers)
print(response)
response_dictionary = json.loads(response.content)
print(response_dictionary)

 

 

0

Comments

1 comment
  • Did you ever find a solution for this?  I am porting this over to C# and finding the same error now.

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post