Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about list_suppression_entries.py and its limit. if one specific day, there is more than 10k #203

Open
izzatarif opened this issue Nov 7, 2020 · 0 comments

Comments

@izzatarif
Copy link

Hello,

@svisser , @richleland , @aydrian

im using this list_suppression_entries.py to get the suppression list.

https://github.com/SparkPost/python-sparkpost/blob/master/examples/suppression_list/list_suppression_entries.py

ideally wanted it to be the whole list. but at one day, we are getting more than 10k and i dont know how to get the rest of it

supp_list = []
from_date = datetime.datetime(2020,6,1)
to_date = from_date + datetime.timedelta(days = 15)
while(from_date < datetime.datetime.today()):
loop_list = sp.suppression_list.list(
from_date = from_date,
to_date = to_date,
limit = 10000
)
print(from_date, to_date, len(loop_list))
supp_list = supp_list + loop_list
from_date = to_date
to_date = from_date + datetime.timedelta(days = 15)

from postman, i seem to can get like their continuation link if i wanted to go to next page like that. but this one doesnt seem so.

would be great if can get help on this. thank you.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant