We have updated our Terms of Service, Code of Conduct, and Addendum.

GitHub RestAPI with Pagination

Hi, I've been struggling with getting pagination to work correctly using the RestAPI Collector as a source. I'm trying to programmatically have Cribl grab software vulnerabilities that are identified in GitHub CodeQL using this API call:

https://api.github.com/repos/myorg/myrepo/code-scanning/alerts

https://docs.github.com/en/rest/code-scanning/code-scanning?apiVersion=2022-11-28#get-a-code-scanning-analysis-for-a-repository

I am able to successfully get the response, but I cannot figure out how to get pagination to work. The closest I've been able to get is adding the "per_page" parameter to my API call and hoping my containers have less than 100 vulnerabilities.

I've tried adding "Link" as the response header attribute with no luck. When I do that, it seems to create an endless loop when I do a full run. Any guidance would be much appreciated.

https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api?apiVersion=2022-11-28