REST API seems to only return the first 20 Resource Label Events for the issue

I’m using the REST API call https://gitlab.sweetwater.com/api/v4/projects/PROJECT_ID/issues/ISSUE_ID/resource_label_events. It seems that only a maximum of 20 label events are returned (both adds and removes together). I have checked several issues and the same thing happens on all of them. Not only that, but only the first 20 are returned. We use labels extensively for reporting and need more history than that.
Is there a parameter I need to be passing to get all the resource label events for an issue? If so, please update the documentation as well, as I didn’t see it there. If not, please remove the limit! Thanks!

Hi,

Use the per_page parameter, but your limit is 100. Default is 20.

If you have more than 100, then you will need to script it appropriately. You can use the API to get the other pagination parameters such as x-total-pages, which you can then use to determine how many pages of 20, 50, 100 or whatever you have.

Thanks, that worked!