GitLab Merge trains API
Use this API to retrieve the [merge trains](https://docs.gitlab.com/ci/pipelines/merge_trains/) of a project. These endpoints require the Developer, Maintainer, or Owner role, and support [offset-based pagination](https://docs.gitlab.com/api/rest/#offset-based-pagination). Each object in a response represents one merge request in a train, not an entire train. Requesting merge trains without a target branch can return entries from more than one train in the project. Responses do not include an explicit queue position, and return merge requests as a flat list rather than grouped by train: - For an exact queue position, sort by `id` in ascending order, or use the GraphQL API [`MergeTrainCar.index`](https://docs.gitlab.com/api/graphql/reference/objects/#mergetraincar) field. - To group merge requests by train, use the `target_branch` attribute, or query the GraphQL API [`Project.mergeTrains`](https://docs.gitlab.com/api/graphql/reference/objects/#project) and [`MergeTrain.cars`](https://docs.gitlab.com/api/graphql/reference/objects/#mergetrain) fields.