all,
I am trying to pull the activities data using bulk api, as a parameter I am supplying few activityTypeIds and expecting API should bring only those id's but what I am seeing it's bringing everything! not sure what I am doing wrong. here the api request. does anyone faced this issue? how to solve this. note : i do not want to use normal api call, must use bulk api.
headers = {'Authorization': 'Bearer ' + token}
params = {
"activityTypeId": [1,2,3,6,7,8,9,10,11,12],
"format": "CSV",
"filter": {
"createdAt": {
"startAt": startAt, # "2022-10-02T23:59:59-00:00",
"endAt": endAt # "2022-10-03T23:59:59-00:00"
}
}
}
resp = requests.post(host + '/bulk/v1/activities/export/create.json', headers=headers, json=params)
Solved! Go to Solution.
Well, it’s only spelled one way: activityTypeIds. and it goes inside the "filter" property, not outside, as shown in the docs.
In general you shouldn’t supply code in any particular language, what matters is the JSON payload.
thank you. after i move the parameter under "filter" , it worked. thank you for responding so quickly,
as a parameter I am supplying few activityTypeIds
I would argue that you’re supplying a few activityTypeId. And that’s the problem. 🙂
i did passed with activityTypeIds also.
Well, it’s only spelled one way: activityTypeIds. and it goes inside the "filter" property, not outside, as shown in the docs.
In general you shouldn’t supply code in any particular language, what matters is the JSON payload.