1. GitLab Api
Common Api
  • GitLab Api
    • 获取项目ID
      GET
    • 获取项目内所有提交记录
      GET
    • 获取项目列表
      GET
    • 获取单个项目
      GET
    • 获取项目所有分支
      GET
    • 获取项目指定单个分支
      GET
    • 获取所有用户
      GET
    • 获取单个用户
      GET
    • 获取所有组
      GET
    • 获取项目的统计信息
      GET
    • 创建Webhook
      POST
  1. GitLab Api

获取项目内所有提交记录

开发中
GET
/api/v4/projects/{项目ID}/repository/commits

请求参数

Path 参数

Query 参数

Header 参数

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location '/api/v4/projects/111/repository/commits?per_page=100&page=' \
--header 'PRIVATE-TOKEN: glpat-q1csJCWcYYGum_xZxHhg'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
[
    {
        "id": "40f224bce46aa28fb9bca73c4ee7274ad47b3e11",
        "short_id": "40f224bc",
        "created_at": "2024-11-18T10:17:00.000+08:00",
        "parent_ids": [
            "1c26606eaa80fcf28554a64df55d4af47907fe6a"
        ],
        "title": "Commit Test",
        "message": "Commit Test\n",
        "author_name": "zhf",
        "author_email": "1055412539@qq.com",
        "authored_date": "2024-11-18T10:17:00.000+08:00",
        "committer_name": "zhf",
        "committer_email": "1055412539@qq.com",
        "committed_date": "2024-11-18T10:17:00.000+08:00",
        "trailers": {},
        "web_url": "https://git.csntcorp.com/mmp/edi/-/commit/40f224bce46aa28fb9bca73c4ee7274ad47b3e11"
    },
    {
        "id": "1c26606eaa80fcf28554a64df55d4af47907fe6a",
        "short_id": "1c26606e",
        "created_at": "2024-11-15T17:28:13.000+08:00",
        "parent_ids": [
            "1eafb8adb4df339f4d98d6fb87b4927fd8316683",
            "1b55b086effec9aff3117a8b866fa48372792fb5"
        ],
        "title": "Merge branch 'dev' of https://git.csntcorp.com/mmp/edi into dev",
        "message": "Merge branch 'dev' of https://git.csntcorp.com/mmp/edi into dev\n",
        "author_name": "zhf",
        "author_email": "1055412539@qq.com",
        "authored_date": "2024-11-15T17:28:13.000+08:00",
        "committer_name": "zhf",
        "committer_email": "1055412539@qq.com",
        "committed_date": "2024-11-15T17:28:13.000+08:00",
        "trailers": {},
        "web_url": "https://git.csntcorp.com/mmp/edi/-/commit/1c26606eaa80fcf28554a64df55d4af47907fe6a"
    },
    ...
]
修改于 2025-01-21 08:44:50
上一页
获取项目ID
下一页
获取项目列表
Built with