Skip to main content
Level 2
Oct 26, 2022 8:42 PM UTC
Solved

Bulk API-Activities: Not filtering ActivityTypeids

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)

  

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
Oct 27, 2022 12:32 AM UTC

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.

4 replies

SanfordWhiteman
User Group Leader
User Group Leader
Oct 26, 2022 11:14 PM UTC
as a parameter I am supplying few activityTypeIds

I would argue that you’re supplying a few activityTypeId. And that’s the problem. 🙂

Translate
kajal_dasAuthor
Level 2
Oct 26, 2022 11:28 PM UTC

i did passed with activityTypeIds also.  

Translate
SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
Oct 27, 2022 12:32 AM UTC

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.

Translate