Skip to main content

Enterprise Server 3.20 目前作为发布候选版本提供。

REST API 现已开始进行版本化。 有关详细信息,请参阅“关于 API 版本控制”。

问题字段值的 REST API 端点

使用 REST API 查看和管理问题的问题字段值。

List issue field values for an issue

Lists all issue field values for an issue.

“List issue field values for an issue”的细粒度访问令牌

此端点支持以下精细令牌类型:

细粒度令牌必须具有以下权限集:

  • "Issues" repository permissions (read)

如果仅请求公共资源,则无需身份验证或上述权限即可使用此终结点。

“List issue field values for an issue”的参数

标头
名称, 类型, 说明
accept string

Setting to application/vnd.github+json is recommended.

路径参数
名称, 类型, 说明
owner string 必须

The account owner of the repository. The name is not case sensitive.

repo string 必须

The name of the repository without the .git extension. The name is not case sensitive.

issue_number integer 必须

The number that identifies the issue.

查询参数
名称, 类型, 说明
per_page integer

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

默认: 30

page integer

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

默认: 1

“List issue field values for an issue”的 HTTP 响应状态代码

状态代码说明
200

OK

301

Moved permanently

404

Resource not found

410

Gone

“List issue field values for an issue”的示例代码

请求示例

get/repos/{owner}/{repo}/issues/{issue_number}/issue-field-values
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/issues/ISSUE_NUMBER/issue-field-values

Response

Status: 200
[ { "issue_field_id": 1, "node_id": "IFT_GDKND", "data_type": "text", "value": "DRI" }, { "issue_field_id": 2, "node_id": "IFSS_SADMS", "data_type": "single_select", "value": 1, "single_select_option": { "id": 1, "name": "High", "color": "red" } }, { "issue_field_id": 3, "node_id": "IFN_POINTS", "data_type": "number", "value": 42 }, { "issue_field_id": 4, "node_id": "IFD_DUEDATE", "data_type": "date", "value": "2025-12-25" } ]