Breaking API Change? "ref_name is invalid" /repository/commits API - RESOLVED

Since around 10am UTC today we have noticed a behaviour change in the commits API in our gitlab instance.

We have begun receiving 400 error responses with “ref_name is invalid” when calling the commit API using revision ranges. e.g. https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-foss/repository/commits?ref_name=de74d20b2596c8d27987744d24a7fc09fbe8ff37...74d9798736a89f07e047698e5e32964829bf8859

https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-foss/repository/commits?ref_name=master still works i.e. using branch names is fine.

But given that it worked 24 hours ago and the documentation at Commits API | GitLab

The name of a repository branch, tag or revision range, or if not given the default branch

Clearly says “revision range” can be used this looks like a breaking change has been made to the API.

Has anyone else seen this behaviour? Should the “revision range” be specified in a different format?

Resolved - API get commits using ref_name with revision_range (#352515) · Issues · GitLab.org / GitLab · GitLab - Appears a bug was introduced and the change rolled back

1 Like