Create Issue
POST/api/v5/repos/:owner/issues
Request
Path Parameters
Repository space address (organization or individual's address path)
Query Parameters
User authorization code
- application/json
Body
- Array [
- ]
Repository path
Issue Title
Issue Description
Issue Owner's username, separated by English commas for multiple ones
Milestone Sequence Number
A comma-separated list of labels, where the name must be between 2-20 characters long and cannot contain special characters. For example: bug,performance
Whether it is a private issue (default is false)
issue template path, project templates support files under the .gitcode, .github, .gitee directories, and organization templates only support files under the .gitcode directory of the .gitcode project.
Issue Type (Enterprise version supported), the set value needs to be consistent with the settings in the advanced features of enterprise issue
Issue Priority (Enterprise Edition supported), the setting value should be consistent with the settings in the advanced issue features of the enterprise.
custom_fields object[]
Custom field information (Enterprise edition supported)
Field Name
Field value array
Responses
- 200
Successful Response
Response Headers
- application/json
- Schema
- Example (auto)
- Example
Schema
- Array [
- ]
- Array [
- ]
user object
repository object
labels object[]
label added time
custom_fields object[]
Custom field information
Custom Field Name
Field type. text_single: single line text, text_multi: multi-line text, integer: integer, decimal: decimal, date: date, select_single: single select dropdown, select_multi: multi-select dropdown, member_single: single select member, member_multi: multi-select member
Visibility. 0: Visible to administrators only, 1: Visible to everyone
Custom field value
{
"id": 0,
"html_url": "string",
"number": 0,
"state": "string",
"title": "string",
"body": "string",
"user": {
"avatar_url": "string",
"html_url": "string",
"id": "string",
"login": "string",
"name": "string"
},
"repository": {
"id": 0,
"full_name": "string",
"path": "string",
"name": "string",
"description": "string",
"created_at": "string",
"updated_at": "string"
},
"created_at": "string",
"updated_at": "string",
"labels": [
{
"id": 0,
"name": "string",
"color": "string",
"created_at": "string",
"updated_at": "string"
}
],
"stage": "string",
"severity": "string",
"custom_fields": [
{
"field_name": "string",
"field_type": "string",
"field_visibility": "string",
"field_values": [
"string"
]
}
]
}
{
"id": 152642,
"html_url": "https://test.gitcode.net/dengmengmian/test01/issues/15",
"number": 15,
"state": "opened",
"title": "half month data",
"body": "abcabcabc",
"user": {
"avatar_url": "https://gitcode-img.obs.cn-south-1.myhuaweicloud.com:443/fa/fe/f32a9fecc53e890afbd48fd098b0f6c5f20f062581400c76c85e5baab3f0d5b2.png",
"events_url": null,
"followers_url": null,
"following_url": null,
"gists_url": null,
"html_url": "https://test.gitcode.net/dengmengmian",
"id": "661ce4eab470b1430d456154",
"login": "dengmengmian",
"member_role": null,
"name": "MaFan_",
"organizations_url": null,
"received_events_url": null,
"remark": null,
"repos_url": null,
"starred_url": null,
"subscriptions_url": null,
"type": null,
"url": null
},
"assignee": null,
"repository": {
"id": 152642,
"full_name": "dengmengmian/test01",
"path": "test01",
"name": "test01",
"description": "",
"created_at": "2024-04-18T14:35:15.479+08:00",
"updated_at": "2024-04-18T14:35:15.479+08:00"
},
"created_at": "2024-04-18T14:35:15.479+08:00",
"updated_at": "2024-04-18T14:35:15.479+08:00",
"finished_at": null,
"labels": [
{
"id": 382379,
"name": "enim",
"color": "#428BCA"
},
{
"id": 382378,
"name": "proident",
"color": "#428BCA"
},
{
"id": 382377,
"name": "qui",
"color": "#428BCA"
}
],
"stage": "New",
"severity": "Major"
}