List all merge trains for a project
GET
/api/v4/projects/{id}/merge_trains
Lists all merge trains for a specified project.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”scope
string
The scope of merge trains
Example
activesort
string
Sort by asc (ascending) or desc (descending)
page
integer
Current page number
Example
1per_page
integer
Number of items per page
Example
20Responses
Section titled “Responses”OK
Media typeapplication/json
object
id
integer format: int64
merge_request
object
id
integer format: int64
iid
integer
project_id
integer format: int64
title
string
description
string
state
string
created_at
string format: date-time
updated_at
string format: date-time
web_url
string
user
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
pipeline
object
id
integer format: int64
iid
integer
project_id
integer format: int64
sha
string
ref
string
status
string
source
string
created_at
string format: date-time
updated_at
string format: date-time
web_url
string
created_at
string format: date-time
updated_at
string format: date-time
target_branch
string
status
string
merged_at
string format: date-time
duration
Time spent in seconds
integer
Example
{ "id": 38, "merge_request": { "id": 84, "iid": 14, "project_id": 4, "title": "Test MR 1580978354", "description": "Repellendus impedit et vel velit dignissimos.", "state": "closed", "created_at": "2022-08-17T12:46:35.053Z", "updated_at": "2022-11-14T17:22:01.470Z", "web_url": "http://local.gitlab.test:8181/root/merge-train-race-condition/-/merge_requests/59" }, "user": { "id": 1, "username": "admin", "public_email": "john@example.com", "name": "Administrator", "state": "active", "avatar_url": "https://gravatar.com/avatar/1", "avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png", "custom_attributes": [ { "key": "foo", "value": "bar" } ], "web_url": "https://gitlab.example.com/root" }, "pipeline": { "id": 1, "iid": 2, "project_id": 3, "sha": "0ec9e58fdfca6cdd6652c083c9edb53abc0bad52", "ref": "feature-branch", "status": "success", "source": "push", "created_at": "2022-10-21T16:49:48.000+02:00", "updated_at": "2022-10-21T16:49:48.000+02:00", "web_url": "https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61" }, "created_at": "2015-12-24T15:51:21.880Z", "updated_at": "2015-12-24T17:54:31.198Z", "target_branch": "develop", "status": "merging", "merged_at": "2015-12-24T17:54:31.198Z", "duration": 127}Bad Request
Unauthorized
Forbidden
Not found