API Truncating Build lists

Our team uses the Travis API to get builds for a given project repo, and has noted that the API currently returns less builds than same usage in 2020.

For repo “stripe/stripe-java”, we previously got 19569 builds, and currently get 1237. We have builds dated from 2015 stored from running the API in May 2020 (e.g., build_id : 62146952, committed_at : 2015-05-11T21:23:06Z), but currently the oldest build the API returns is dated December 3, 2019.

For repo “crate/crate”, we previously got 35918 builds, and currently the API returns just 9 builds. We have builds dated from 2014 stored from running the API in May 2020 (e.g., build_id : 28293183, committed_at : 2014-06-24T08:15:14Z), but currently the oldest build the API returns is dated March 11, 2019.

These numbers come using the endpoint ending in .org, as the analogue with .com does not exist.
https://api.travis-ci.org/repositories/stripe/stripe-java/builds
https://api.travis-ci.org/repositories/crate/crate/builds

For repo “zkoss/zk”, we previously got 7215 builds, and currently get just 447. We notice that https://api.travis-ci.org/repositories/zkoss/zk/builds and https://api.travis-ci.com/repositories/zkoss/zk/builds both exist, but using the .com endpoint with the API gives a 403 error.

Any clarity as to why the number of builds returned by the API is currently less than what was returned historically would be greatly appreciated!

From what I can see in https://developer.travis-ci.com/explore/builds, the recent version of API includes pagination. They probably stamped it into the historical endpoints in some form, too.

Thank you for your response! I see API Developer Documentation - Travis CI that pagination affects builds, but as far as I can see the responses I get from API do not have a field for pagination, and as the number of builds mentioned in the OP shows, the limit of 100 doesn’t manifest. I will keep looking into whether advancing to other pages is the source of this issue.

It does seem that this is probably related to the migration from .org to .com, in that older builds haven’t been moved over yet? I’ll look to verify this by checking if the number of builds returns changes. It’s interesting, though, that most of the builds returned can have their logs accessed, though some don’t. So it appears the migration for builds and logs is occurring separately.

Indeed, not all info about the builds has been moved from .org to .com. But you reported seeing the behavior exclusively on .org, so that doesn’t seem relevant.

Hey,

Thank you for reporting the issue.

While there was no change with the travis-api itself, I believe this should be related to permission and repository status as well.

Could you please reach us out from support@travis-ci.com and share the request and username that you are trying to fetch the build data?

Thanks

1 Like

Mustafa,

Thank you for writing, that’s very interesting that it could be permissions related or have something to do with repository status. I wrote an email yesterday to support@travis-ci.com linking this post, and got back ticket number 29338. We’ll be looking forward to hearing back from you all soon.

Thanks again,
Ryan

Imprint