Skip to content

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

Open
@izzatarif

Description

@izzatarif

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions