Skip to content

Create a pull request

POST /api/v5/repos/{owner}/{repo}/pulls

This endpoint creates a pull request (merge request) in the specified repository. You can set the title, the source and target branches, and the description, and you can also specify reviewers and testers, labels, milestone, and draft state, and choose whether to delete the source branch after merging.

Access token support

  • AtomGit user access tokens (AtomGit user access tokens)

Whether anonymous access is allowed

This endpoint does not allow anonymous access.

Request parameters

Parameter Location Type Required Description
owner path string Yes The namespace address the repository belongs to (the address path of an enterprise, organization, or personal namespace)
repo path string Yes Repository path (path)
access_token query string Yes User authorization code

Request Body:

The request body is application/json and contains the following fields:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "description": "Pull request title",
      "type": "string",
      "maxLength": 200
    },
    "head": {
      "description": "Source branch to which the pull request is submitted. Format: branch; for a cross-repository PR, pass: username:branch",
      "type": "string"
    },
    "base": {
      "description": "Name of the target branch to which the pull request is submitted",
      "type": "string"
    },
    "body": {
      "description": "Pull request body",
      "type": "string",
      "maxLength": 65535
    },
    "milestone_number": {
      "description": "Milestone ordinal number (id)",
      "type": "integer"
    },
    "labels": {
      "description": "Comma-separated labels. The name must be 2-20 characters long and must not contain special characters. For example: bug,performance",
      "type": "string"
    },
    "assignees": {
      "description": "Reviewer usernames, multiple values separated by half-width commas, for example: (username1,username2); note: if [Assign reviewers] is already configured in the repository code review settings, this option has no effect",
      "type": "string"
    },
    "testers": {
      "description": "Tester usernames, multiple values separated by half-width commas, for example: (username1,username2); note: if [Assign testers] is already configured in the repository code review settings, this option has no effect",
      "type": "string"
    },
    "prune_source_branch": {
      "description": "Whether to delete the source branch after the PR is merged",
      "type": "boolean",
      "default": false
    },
    "draft": {
      "description": "Whether to set the pull request as a draft",
      "type": "boolean",
      "default": false
    },
    "squash": {
      "description": "Use a squash merge when accepting the pull request",
      "type": "boolean",
      "default": false
    },
    "squash_commit_message": {
      "description": "Squash commit message",
      "type": "string"
    },
    "fork_path": {
      "description": "Fork project path [owner/repo]; required for a cross-repository PR.",
      "type": "string"
    },
    "close_related_issue": {
      "description": "Whether to close the associated issue after merging; defaults to the repository configuration",
      "type": "boolean"
    },
    "inner_issue_nums": {
      "description": "Semicolon-separated issue_iid, for example 1;2;3 or issue1;issue2;issue3; for cross-repository issues, #group/project#1 or #group/project#issue1",
      "type": "string"
    }
  },
  "required": ["title", "head", "base"]
}

Response parameters

The success response returns a pull request details object (OpenApiPullDetailResp) with the following fields:

Field Type Always returned Nullable Description
id integer Yes No ID of the pull request
url string Yes No API address of the pull request
html_url string Yes No Page address of the pull request
diff_url string Yes No Diff address of the pull request
patch_url string Yes No Patch address of the pull request
issue_url string Yes No Address of the associated issue list
commits_url string Yes No Address of the commit list
review_comments_url string Yes No Review comment address
review_comment_url string Yes No Review comment address
comments_url string Yes No Address of the comment list
number integer Yes No PR ordinal number (iid)
title string Yes No Pull request title
description string Yes No Pull request description
state string Yes No Pull request state
created_at string Yes Yes Creation time
updated_at string Yes Yes Update time
merged_by object No Yes Merged by
merged_at string No Yes Merge time
closed_by object No Yes Closed by
closed_at string No Yes Close time
title_html string No Yes Title HTML
description_html string No Yes Description HTML
target_branch string Yes No Target branch
source_branch string Yes No Source branch
squash_commit_message string No Yes Squash commit message
user_notes_count integer Yes No Number of comments
upvotes integer Yes No Number of upvotes
downvotes integer Yes No Number of downvotes
author object Yes No Author information
source_project_id integer Yes No Source project id
target_project_id integer Yes No Target project id
labels object[] Yes Yes Label list
work_in_progress integer Yes No Whether it is a draft
milestone object No Yes Milestone
merge_when_pipeline_succeeds integer Yes No Automatically merge when the pipeline succeeds
merge_status string Yes No Merge status
sha string Yes No Latest commit sha of the source branch
merge_commit_sha string No Yes Merge commit sha
discussion_locked boolean No Yes Whether discussions are locked
should_remove_source_branch integer Yes No Whether to delete the source branch
force_remove_source_branch integer Yes No Whether to force delete the source branch
allow_collaboration boolean No Yes Whether collaborators are allowed to commit
allow_maintainer_to_push boolean No Yes Whether maintainers are allowed to push
web_url string Yes No Page address
time_stats object Yes No Time statistics
squash integer Yes No Whether to use squash merge
merge_request_type string Yes No Merge request type
has_pre_merge_ref integer Yes No Whether there is a pre-merge ref
review_mode string Yes No Review mode
is_source_branch_exist integer Yes No Whether the source branch exists
approval_merge_request_reviewers object[] Yes Yes Reviewer list
approval_merge_request_approvers object[] Yes Yes Approver list
approval_merge_request_testers object[] Yes Yes Tester list
source_project object Yes No Source project information
target_project object Yes No Target project information
added_lines integer Yes No Number of added lines
removed_lines integer Yes No Number of removed lines
subscribed integer Yes No Whether subscribed
changes_count string Yes No Number of changes
latest_build_started_at string No Yes Start time of the latest build
latest_build_finished_at string No Yes End time of the latest build
first_deployed_to_production_at string No Yes Time first deployed to production
pipeline object No Yes Pipeline information
diff_refs object Yes No Diff reference information
merge_error string No Yes Merge error
json_merge_error object No Yes JSON merge error
rebase_in_progress boolean No Yes Whether a rebase is in progress
diverged_commits_count integer No Yes Number of diverged commits
merge_request_assignee_list object[] Yes Yes Assignee list
merge_request_reviewer_list object[] Yes Yes Reviewer list
user object Yes No Current user information
merge_request_review_count integer Yes No Number of reviews
merge_request_reviewers_count integer Yes No Number of reviewers
notes integer Yes No Number of comments
unresolved_discussions_count integer Yes No Number of unresolved discussions
e2e_issues object[] Yes Yes End-to-end issue list
gate_check integer Yes No Gate check
head_pipeline_id integer No Yes Head pipeline id
pipeline_status string Yes No Pipeline state
codequality_status string Yes No Code quality state
pipeline_status_with_code_quality string Yes No Pipeline state including code quality
from_forked_project boolean Yes No Whether it comes from a forked project
forked_project_name string No Yes Forked project name
can_delete_source_branch integer Yes No Whether the source branch can be deleted
required_reviewers object[] Yes Yes Required reviewers
omega_mode integer Yes No Omega mode
root_mr_locked_detail object No Yes Root merge request lock details
source_git_url string Yes No Source Git URL
auto_merge object No Yes Auto-merge information

author object

Field Type Always returned Nullable Description
author.id integer Yes No User id
author.name string Yes No Username
author.username string Yes No User login name
author.iam_id string Yes No IAM id
author.nick_name string Yes No Nickname
author.state string Yes No State
author.avatar_url string Yes No Avatar URL
author.avatar_path string No Yes Avatar path
author.email string Yes No Email
author.name_cn string Yes No Chinese name
author.web_url string Yes No Home page address
author.tenant_name string No Yes Tenant name
author.is_member boolean No Yes Whether a member

labels object

Field Type Always returned Nullable Description
labels.id integer Yes No Label id
labels.name string Yes No Label name
labels.color string Yes No Label color
labels.created_at string Yes No Time the label was added
labels.updated_at string Yes No Label update time

time_stats object

Field Type Always returned Nullable Description
time_stats.time_estimate integer No Yes Estimated time
time_stats.total_time_spent integer Yes No Total time spent
time_stats.human_time_estimate string No Yes Estimated time (human-readable)
time_stats.human_total_time_spent string No Yes Total time spent (human-readable)

approval_merge_request_reviewers object

Field Type Always returned Nullable Description
approval_merge_request_reviewers.id integer Yes No User id
approval_merge_request_reviewers.username string Yes No User login name
approval_merge_request_reviewers.name string Yes No Username
approval_merge_request_reviewers.nick_name string No Yes Nickname
approval_merge_request_reviewers.name_cn string Yes No Chinese name
approval_merge_request_reviewers.email string No Yes Email
approval_merge_request_reviewers.state string Yes No State
approval_merge_request_reviewers.is_codeowner integer Yes No Whether a code owner
approval_merge_request_reviewers.updated_at string Yes No Update time
approval_merge_request_reviewers.avatar_url string Yes No Avatar URL

approval_merge_request_approvers object

Field Type Always returned Nullable Description
approval_merge_request_approvers.id integer Yes No User id
approval_merge_request_approvers.username string Yes No User login name
approval_merge_request_approvers.name string Yes No Username
approval_merge_request_approvers.nick_name string No Yes Nickname
approval_merge_request_approvers.name_cn string Yes No Chinese name
approval_merge_request_approvers.email string No Yes Email
approval_merge_request_approvers.state string Yes No State
approval_merge_request_approvers.is_codeowner integer Yes No Whether a code owner
approval_merge_request_approvers.updated_at string Yes No Update time
approval_merge_request_approvers.avatar_url string Yes No Avatar URL

approval_merge_request_testers object

Field Type Always returned Nullable Description
approval_merge_request_testers.id integer Yes No User id
approval_merge_request_testers.username string Yes No User login name
approval_merge_request_testers.name string Yes No Username
approval_merge_request_testers.nick_name string No Yes Nickname
approval_merge_request_testers.name_cn string Yes No Chinese name
approval_merge_request_testers.email string No Yes Email
approval_merge_request_testers.state string Yes No State
approval_merge_request_testers.is_codeowner integer Yes No Whether a code owner
approval_merge_request_testers.updated_at string Yes No Update time
approval_merge_request_testers.avatar_url string Yes No Avatar URL

diff_refs object

Field Type Always returned Nullable Description
diff_refs.base_sha string Yes No Base commit sha
diff_refs.head_sha string Yes No Latest commit sha of the source branch
diff_refs.start_sha string Yes No Start commit sha

e2e_issues object

Field Type Always returned Nullable Description
e2e_issues.id integer Yes No Issue id
e2e_issues.issue_type integer Yes No Issue type
e2e_issues.linked_issue_type integer No Yes Linked issue type
e2e_issues.issue_num string Yes No Issue number
e2e_issues.commit_id string No Yes Commit id
e2e_issues.merge_request_id integer Yes No Merge request id
e2e_issues.check_fail_reason string Yes No Reason the check failed
e2e_issues.check_result integer Yes No Check result
e2e_issues.issue_link string Yes No Issue link
e2e_issues.created_at string Yes No Creation time
e2e_issues.mks_id string No Yes mks id
e2e_issues.pbi_id string No Yes pbi id
e2e_issues.pbi_name string No Yes pbi name
e2e_issues.source string No Yes Source
e2e_issues.issue_project_id integer Yes No ID of the project the issue belongs to
e2e_issues.title string Yes No Title
e2e_issues.issue_project object No Yes Project the issue belongs to
e2e_issues.auto_c_when_mr_merged integer Yes No Whether to close automatically when merged

source_project object

Field Type Always returned Nullable Description
source_project.id integer Yes No Project id
source_project.description string Yes No Project description
source_project.name string Yes No Project name
source_project.name_with_namespace string Yes No Project name with namespace
source_project.path string Yes No Project path
source_project.path_with_namespace string Yes No Project path with namespace
source_project.develop_mode string Yes No Development mode
source_project.created_at string Yes No Creation time
source_project.updated_at string Yes No Update time
source_project.archived integer Yes No Whether archived
source_project.is_kia integer Yes No Whether KIA
source_project.ssh_url_to_repo string Yes No SSH address
source_project.http_url_to_repo string Yes No HTTP address
source_project.web_url string Yes No Page address
source_project.readme_url string Yes No README address
source_project.product_id string Yes No Product id
source_project.product_name string No Yes Product name
source_project.member_mgnt_mode integer Yes No Member management mode
source_project.default_branch string Yes No Default branch
source_project.tag_list object[] Yes Yes Tag list
source_project.license_url string No Yes License address
source_project.license object Yes No License information
source_project.star_count integer Yes No Star count
source_project.forks_count integer Yes No Fork count
source_project.open_issues_count integer Yes No Number of open issues
source_project.open_merge_requests_count integer Yes No Number of open merge requests
source_project.open_change_requests_count integer No Yes Number of open change requests
source_project.watch_count integer Yes No Watch count
source_project.last_activity_at string Yes No Last activity time
source_project.namespace object Yes No Namespace information
source_project.empty_repo integer Yes No Whether the repository is empty
source_project.starred integer Yes No Whether starred
source_project.visibility string Yes No Visibility
source_project.security string Yes No Security level
source_project.has_updated_kia integer Yes No Whether KIA was updated
source_project.network_type string Yes No Network type
source_project.owner object No Yes Owner
source_project.creator object Yes No Creator
source_project.creator_id integer Yes No Creator id
source_project.forked_from_project object No Yes Source forked project
source_project.item_type string Yes No Item type
source_project.main_repository_language string[] Yes No Main programming languages
source_project.mirror_project_data object No Yes Mirror project data
source_project.statistics object No Yes Statistics
source_project.branch_count integer No Yes Branch count
source_project.tag_count integer No Yes Tag count
source_project.member_count integer No Yes Member count
source_project.repo_replica_urls string No Yes Repository replica address
source_project.open_external_wiki integer Yes No Whether the external wiki is enabled
source_project.release_count integer No Yes Release count

target_project object

Field Type Always returned Nullable Description
target_project.id integer Yes No Project id
target_project.description string Yes No Project description
target_project.name string Yes No Project name
target_project.name_with_namespace string Yes No Project name with namespace
target_project.path string Yes No Project path
target_project.path_with_namespace string Yes No Project path with namespace
target_project.develop_mode string Yes No Development mode
target_project.created_at string Yes No Creation time
target_project.updated_at string Yes No Update time
target_project.archived integer Yes No Whether archived
target_project.is_kia integer Yes No Whether KIA
target_project.ssh_url_to_repo string Yes No SSH address
target_project.http_url_to_repo string Yes No HTTP address
target_project.web_url string Yes No Page address
target_project.readme_url string Yes No README address
target_project.product_id string Yes No Product id
target_project.product_name string No Yes Product name
target_project.member_mgnt_mode integer Yes No Member management mode
target_project.default_branch string Yes No Default branch
target_project.tag_list object[] Yes Yes Tag list
target_project.license_url string No Yes License address
target_project.license object Yes No License information
target_project.star_count integer Yes No Star count
target_project.forks_count integer Yes No Fork count
target_project.open_issues_count integer Yes No Number of open issues
target_project.open_merge_requests_count integer Yes No Number of open merge requests
target_project.open_change_requests_count integer No Yes Number of open change requests
target_project.watch_count integer Yes No Watch count
target_project.last_activity_at string Yes No Last activity time
target_project.namespace object Yes No Namespace information
target_project.empty_repo integer Yes No Whether the repository is empty
target_project.starred integer Yes No Whether starred
target_project.visibility string Yes No Visibility
target_project.security string Yes No Security level
target_project.has_updated_kia integer Yes No Whether KIA was updated
target_project.network_type string Yes No Network type
target_project.owner object No Yes Owner
target_project.creator object Yes No Creator
target_project.creator_id integer Yes No Creator id
target_project.forked_from_project object No Yes Source forked project
target_project.item_type string Yes No Item type
target_project.main_repository_language string[] Yes No Main programming languages
target_project.mirror_project_data object No Yes Mirror project data
target_project.statistics object No Yes Statistics
target_project.branch_count integer No Yes Branch count
target_project.tag_count integer No Yes Tag count
target_project.member_count integer No Yes Member count
target_project.repo_replica_urls string No Yes Repository replica address
target_project.open_external_wiki integer Yes No Whether the external wiki is enabled
target_project.release_count integer No Yes Release count

namespace object

Field Type Always returned Nullable Description
namespace.id integer Yes No Namespace id
namespace.name string Yes No Namespace name
namespace.path string Yes No Namespace path
namespace.develop_mode string Yes No Development mode
namespace.region string No Yes Region
namespace.cell string Yes No Cell
namespace.kind string Yes No Type
namespace.full_path string Yes No Full path
namespace.full_name string Yes No Full name
namespace.parent_id integer No Yes Parent namespace id
namespace.visibility_level integer Yes No Visibility level
namespace.enable_file_control boolean No Yes Whether file control is enabled
namespace.owner_id integer No Yes Owner id

license object

Field Type Always returned Nullable Description
license.key string Yes No License key
license.name string No Yes License name
license.nickname string No Yes License nickname
license.html_url string No Yes License HTML address
license.source_url string No Yes License source address
license.avatar_url string No Yes License avatar address

creator object

Field Type Always returned Nullable Description
creator.id integer Yes No User id
creator.name string Yes No Username
creator.username string Yes No User login name
creator.iam_id string Yes No IAM id
creator.nick_name string Yes No Nickname
creator.state string Yes No State
creator.avatar_url string Yes No Avatar URL
creator.avatar_path string No Yes Avatar path
creator.email string Yes No Email
creator.name_cn string Yes No Chinese name
creator.web_url string Yes No Home page address
creator.tenant_name string No Yes Tenant name
creator.is_member boolean No Yes Whether a member

Error responses

400 Bad request

{
  "error": "invalid_request",
  "message": "head or base cannot be empty"
}

401 Unauthenticated

{
  "error": "unauthorized",
  "message": "Missing or invalid access token"
}

HTTP response status codes

Status code Description
200 Success (OK)
400 Parameter error or the request cannot be parsed
401 Authentication required (Requires authentication)
404 Request path does not exist
405 Request method not supported
429 Too many requests; rate limit triggered
500 Internal system error

Request example

Parameter descriptions

  • <owner> — replaced with the namespace address the repository belongs to (the address path of an enterprise, organization, or personal namespace);
  • <repo> — replaced with the repository path (path);
  • <token> — replaced with your AtomGit user access token.

cURL

curl -X POST 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/pulls?access_token=<token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Test creating a PR",
    "head": "dev",
    "base": "main",
    "body": "update: update file dev_001.txt"
  }'

JavaScript

// Native fetch (Node.js 18+ / browser)
const token = "<YOUR-TOKEN>";
const owner = "<owner>";
const repo = "<repo>";

const response = await fetch(
  `https://api.atomgit.com/api/v5/repos/${owner}/${repo}/pulls?access_token=${token}`,
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "Accept": "application/json",
    },
    body: JSON.stringify({
      title: "Test creating a PR",
      head: "dev",
      base: "main",
      body: "update: update file dev_001.txt",
    }),
  }
);

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);

Python

import requests

resp = requests.post(
    "https://api.atomgit.com/api/v5/repos/<owner>/<repo>/pulls",
    params={"access_token": "<token>"},
    json={
        "title": "Test creating a PR",
        "head": "dev",
        "base": "main",
        "body": "update: update file dev_001.txt",
    },
    headers={"Accept": "application/json"},
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

{
  "id": 11264998,
  "url": "https://api.atomgit.com/api/v5/repos/zzero/demo/pulls/6",
  "html_url": "https://api.atomgit.com/zzero/demo/pulls/6",
  "diff_url": "https://api.atomgit.com/zzero/demo/pulls/6.diff",
  "patch_url": "https://api.atomgit.com/zzero/demo/pulls/6.patch",
  "issue_url": "https://api.atomgit.com/api/v5/repos/zzero/demo/pulls/6/issues",
  "commits_url": "https://api.atomgit.com/api/v5/repos/zzero/demo/pulls/6/commits",
  "review_comments_url": "https://api.atomgit.com/api/v5/repos/zzero/demo/pulls/comments/{/number}",
  "review_comment_url": "https://api.atomgit.com/api/v5/repos/zzero/demo/pulls/comments",
  "comments_url": "https://api.atomgit.com/api/v5/repos/zzero/demo/pulls/6/comments",
  "number": 6,
  "title": "Test creating a PR",
  "description": "update: update file dev_001.txt \nupdate: update file dev_001.txt ",
  "state": "opened",
  "created_at": "2024-04-14T20:53:13.185+08:00",
  "updated_at": "2024-04-14T20:53:22.634+08:00",
  "merged_by": null,
  "merged_at": null,
  "closed_by": null,
  "closed_at": null,
  "title_html": null,
  "description_html": null,
  "target_branch": "test_b5",
  "source_branch": "dev",
  "squash_commit_message": null,
  "user_notes_count": 0,
  "upvotes": 0,
  "downvotes": 0,
  "author": {
    "id": 494,
    "name": "csdntest13",
    "username": "csdntest13",
    "iam_id": "d8b3e018b2364546b946886a669d50fc",
    "nick_name": "csdntest13_gitcode",
    "state": "active",
    "avatar_url": "https://api.atomgit.com/avatar.png",
    "avatar_path": null,
    "email": "csdntest13@noreply.atomgit.com",
    "name_cn": "csdntest13",
    "web_url": "https://api.atomgit.com/csdntest13",
    "tenant_name": null,
    "is_member": null
  },
  "assignee": null,
  "source_project_id": 243377,
  "target_project_id": 243377,
  "labels": [
    {
      "id": 381445,
      "name": "help wanted",
      "color": "#008672",
      "created_at": "2024-04-14T20:53:23.021+08:00",
      "updated_at": "2024-04-14T20:53:23.021+08:00"
    }
  ],
  "work_in_progress": false,
  "milestone": null,
  "merge_when_pipeline_succeeds": false,
  "merge_status": "unchecked",
  "sha": "8da7a5c35e71deeb0bf1d9ecae70449c574749f2",
  "merge_commit_sha": null,
  "discussion_locked": null,
  "should_remove_source_branch": false,
  "force_remove_source_branch": false,
  "allow_collaboration": null,
  "allow_maintainer_to_push": null,
  "web_url": "https://api.atomgit.com/One/One/pulls/53",
  "time_stats": {
    "time_estimate": null,
    "total_time_spent": 0,
    "human_time_estimate": null,
    "human_total_time_spent": null
  },
  "squash": false,
  "merge_request_type": "MergeRequest",
  "has_pre_merge_ref": false,
  "review_mode": "approval",
  "is_source_branch_exist": true,
  "approval_merge_request_reviewers": [
    {
      "id": 43,
      "username": "green",
      "name": "green",
      "nick_name": null,
      "name_cn": "green",
      "email": null,
      "state": "optional",
      "is_codeowner": false,
      "updated_at": "2024-04-14T20:53:23.021+08:00",
      "avatar_url": "https://api.atomgit.com/avatar.png"
    }
  ],
  "approval_merge_request_approvers": [
    {
      "id": 277,
      "username": "renww",
      "name": "renww",
      "nick_name": null,
      "name_cn": "renww",
      "email": null,
      "state": "optional",
      "is_codeowner": false,
      "updated_at": "2024-04-14T20:53:23.751+08:00",
      "avatar_url": "https://api.atomgit.com/avatar.png"
    }
  ],
  "approval_merge_request_testers": [
    {
      "id": 43,
      "username": "green",
      "name": "green",
      "nick_name": null,
      "name_cn": "green",
      "email": null,
      "state": "optional",
      "is_codeowner": false,
      "updated_at": "2024-04-14T20:53:23.755+08:00",
      "avatar_url": "https://api.atomgit.com/avatar.png"
    }
  ],
  "source_project": {
    "id": 243377,
    "description": "csdntest13's first project (public)",
    "name": "One",
    "name_with_namespace": "One / One",
    "path": "One",
    "path_with_namespace": "One/One",
    "develop_mode": "normal",
    "created_at": "2024-03-19T16:24:01.197+08:00",
    "updated_at": "2024-03-19T16:42:34.834+08:00",
    "archived": false,
    "is_kia": false,
    "ssh_url_to_repo": "ssh://git@atomgit.com:2222/One/One.git",
    "http_url_to_repo": "https://api.atomgit.com/One/One.git",
    "web_url": "https://api.atomgit.com/One/One",
    "readme_url": "https://api.atomgit.com/One/One/blob/main/README.md",
    "product_id": "28f96caf52004e81ab0bc38d60d11940",
    "product_name": null,
    "member_mgnt_mode": 3,
    "default_branch": "main",
    "tag_list": [],
    "license_url": null,
    "license": {
      "key": "Apache_License_v2.0",
      "name": null,
      "nickname": null,
      "html_url": null,
      "source_url": null
    },
    "avatar_url": null,
    "star_count": 1,
    "forks_count": 0,
    "open_issues_count": 108,
    "open_merge_requests_count": 32,
    "open_change_requests_count": null,
    "watch_count": 1,
    "last_activity_at": "2024-04-14T20:43:58.602+08:00",
    "namespace": {
      "id": 136909,
      "name": "One",
      "path": "One",
      "develop_mode": "normal",
      "region": null,
      "cell": "default",
      "kind": "group",
      "full_path": "One",
      "full_name": "One ",
      "parent_id": null,
      "visibility_level": 20,
      "enable_file_control": null,
      "owner_id": null
    },
    "empty_repo": false,
    "starred": false,
    "visibility": "public",
    "security": "internal",
    "has_updated_kia": false,
    "network_type": "green",
    "owner": null,
    "creator": {
      "id": 494,
      "name": "csdntest13",
      "username": "csdntest13",
      "iam_id": "d8b3e018b2364546b946886a669d50fc",
      "nick_name": "csdntest13_gitcode",
      "state": "active",
      "avatar_url": "https://api.atomgit.com/avatar.png",
      "avatar_path": null,
      "email": "csdntest13@noreply.atomgit.com",
      "name_cn": "csdntest13",
      "web_url": "https://api.atomgit.com/csdntest13",
      "tenant_name": null,
      "is_member": null
    },
    "creator_id": 494,
    "forked_from_project": null,
    "item_type": "Project",
    "main_repository_language": ["Text", "#cccccc"],
    "mirror_project_data": null,
    "statistics": null,
    "branch_count": null,
    "tag_count": null,
    "member_count": null,
    "repo_replica_urls": null,
    "open_external_wiki": true,
    "release_count": null
  },
  "target_project": {
    "id": 243377,
    "description": "csdntest13's first project (public)",
    "name": "One",
    "name_with_namespace": "One / One",
    "path": "One",
    "path_with_namespace": "One/One",
    "develop_mode": "normal",
    "created_at": "2024-03-19T16:24:01.197+08:00",
    "updated_at": "2024-03-19T16:42:34.834+08:00",
    "archived": false,
    "is_kia": false,
    "ssh_url_to_repo": "ssh://git@atomgit.com:2222/One/One.git",
    "http_url_to_repo": "https://api.atomgit.com/One/One.git",
    "web_url": "https://api.atomgit.com/One/One",
    "readme_url": "https://api.atomgit.com/One/One/blob/main/README.md",
    "product_id": "28f96caf52004e81ab0bc38d60d11940",
    "product_name": null,
    "member_mgnt_mode": 3,
    "default_branch": "main",
    "tag_list": [],
    "license_url": null,
    "license": {
      "key": "Apache_License_v2.0",
      "name": null,
      "nickname": null,
      "html_url": null,
      "source_url": null
    },
    "avatar_url": null,
    "star_count": 1,
    "forks_count": 0,
    "open_issues_count": 108,
    "open_merge_requests_count": 32,
    "open_change_requests_count": null,
    "watch_count": 1,
    "last_activity_at": "2024-04-14T20:43:58.602+08:00",
    "namespace": {
      "id": 136909,
      "name": "One",
      "path": "One",
      "develop_mode": "normal",
      "region": null,
      "cell": "default",
      "kind": "group",
      "full_path": "One",
      "full_name": "One ",
      "parent_id": null,
      "visibility_level": 20,
      "enable_file_control": null,
      "owner_id": null
    },
    "empty_repo": false,
    "starred": false,
    "visibility": "public",
    "security": "internal",
    "has_updated_kia": false,
    "network_type": "green",
    "owner": null,
    "creator": {
      "id": 494,
      "name": "csdntest13",
      "username": "csdntest13",
      "iam_id": "d8b3e018b2364546b946886a669d50fc",
      "nick_name": "csdntest13_gitcode",
      "state": "active",
      "avatar_url": "https://api.atomgit.com/avatar.png",
      "avatar_path": null,
      "email": "csdntest13@noreply.atomgit.com",
      "name_cn": "csdntest13",
      "web_url": "https://api.atomgit.com/csdntest13",
      "tenant_name": null,
      "is_member": null
    },
    "creator_id": 494,
    "forked_from_project": null,
    "item_type": "Project",
    "main_repository_language": ["Text", "#cccccc"],
    "mirror_project_data": null,
    "statistics": null,
    "branch_count": null,
    "tag_count": null,
    "member_count": null,
    "repo_replica_urls": null,
    "open_external_wiki": true,
    "release_count": null
  },
  "added_lines": 19860,
  "removed_lines": 1,
  "subscribed": true,
  "changes_count": "6",
  "latest_build_started_at": null,
  "latest_build_finished_at": null,
  "first_deployed_to_production_at": null,
  "pipeline": null,
  "diff_refs": {
    "base_sha": "0c02dd57f8945791460a141f155dd2f4bd5dea86",
    "head_sha": "8da7a5c35e71deeb0bf1d9ecae70449c574749f2",
    "start_sha": "fb6495834d1bf7a39dfdb44ad25e6f83c7136310"
  },
  "merge_error": null,
  "json_merge_error": null,
  "rebase_in_progress": null,
  "diverged_commits_count": null,
  "merge_request_assignee_list": [],
  "merge_request_reviewer_list": [],
  "user": {
    "can_merge": true
  },
  "merge_request_review_count": 0,
  "merge_request_reviewers_count": 0,
  "notes": 0,
  "unresolved_discussions_count": 0,
  "e2e_issues": [
    {
      "id": 13588,
      "issue_type": 7,
      "linked_issue_type": null,
      "issue_num": "issue100",
      "commit_id": null,
      "merge_request_id": 68253,
      "check_fail_reason": "",
      "check_result": true,
      "issue_link": "https://api.atomgit.com/One/One/issues/100",
      "created_at": "2024-04-14T20:53:23.772+08:00",
      "mks_id": null,
      "pbi_id": null,
      "pbi_name": null,
      "source": null,
      "issue_project_id": 243377,
      "title": "Issue 45",
      "issue_project": null,
      "auto_c_when_mr_merged": false
    }
  ],
  "gate_check": true,
  "head_pipeline_id": null,
  "pipeline_status": "",
  "codequality_status": "success",
  "pipeline_status_with_code_quality": "",
  "from_forked_project": false,
  "forked_project_name": null,
  "can_delete_source_branch": true,
  "required_reviewers": [],
  "omega_mode": false,
  "root_mr_locked_detail": null,
  "source_git_url": "ssh://git@atomgit.com:2222/One/One.git",
  "auto_merge": null
}

Error codes

Error code Description
401 Unauthenticated or invalid credentials (missing/invalid access credentials)
400 Parameter error or the request cannot be parsed
404 Request path does not exist
405 Request method not supported
429 Too many requests; rate limit triggered
500 Internal system error

Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc