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)
Please sign in to leave a comment.
Comments
0 comments