Skip to content

Retrieve diverging commit counts between two refs

GET
/api/v4/projects/{id}/repository/diverging_commits
id
required
One of:
string

The ID or URL-encoded path of the project

Example
1
from
required
string
nullable <= 255 characters

The ref to compare from

Example
main
to
required
string
nullable <= 255 characters

The ref to compare to

Example
feature
max_count
integer
0 nullable

Maximum number of commits to count. 0 for unlimited

Example
1000

OK

Media typeapplication/json
object
behind
integer
ahead
integer
Example
{
"behind": 3,
"ahead": 5
}

Bad request

Unauthorized

Forbidden

Not found

Too many requests