activities/search returning 500 error

I am hitting a 500 error every time I page through activities/search

0
1

1 Comments

  • Hey there,

    We are very sorry about this. For the time being, our activities API has a unique (and something we are working on improving) pagination method that’s prone to timeouts on requests with high offsets. The workaround is to use keyset pagination on activity_date instead of incrementing page_number. Our activity results are sorted by activity date in increasing order.

    Recommendations:

    -Start out by getting page 1 of activities

    -Take the activity date of the last activity in that page

    -On the next request, instead of asking for page 2, set `minimum_activity_date` to the last date you got before

    -Follow the pattern of “keep requesting until nothing comes back”, except increase `minimum_activity_date` for each request, instead of increasing `page_number`

     

    For more information, our developer, Neil, has made a gist here:

    https://gist.github.com/neilpw/0b8491fac3595b539427d6f4a4c8ad59

Please sign in to leave a comment.

Add Comment

Didn’t find what you were looking for?

Ask our community of experts on the Copper forum.

Submit a Post