Project (classic) 列的 REST API 终结点
使用 REST API 创建和管理 项目(经典) 上的列。
Get a project column
Warning
Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.
“Get a project column”的细粒度访问令牌
此端点支持以下精细令牌类型:
精细令牌必须至少具有以下权限集之一:
- "Projects" repository permissions (read)
 - "Projects" organization permissions (read)
 
如果仅请求公共资源,则无需身份验证或上述权限即可使用此终结点。
“Get a project column”的参数
| 名称, 类型, 说明 | 
|---|
accept string Setting to   | 
| 名称, 类型, 说明 | 
|---|
column_id integer 必须The unique identifier of the column.  | 
“Get a project column”的 HTTP 响应状态代码
| 状态代码 | 说明 | 
|---|---|
200 | OK  | 
304 | Not modified  | 
401 | Requires authentication  | 
403 | Forbidden  | 
404 | Resource not found  | 
“Get a project column”的示例代码
如果你通过 GHE.com 访问 GitHub,请将 api.github.com 替换为你的企业在 api.SUBDOMAIN.ghe.com 上的专用子域。
请求示例
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/projects/columns/COLUMN_IDResponse
Status: 200{
  "url": "https://api.github.com/projects/columns/367",
  "project_url": "https://api.github.com/projects/120",
  "cards_url": "https://api.github.com/projects/columns/367/cards",
  "id": 367,
  "node_id": "MDEzOlByb2plY3RDb2x1bW4zNjc=",
  "name": "To Do",
  "created_at": "2016-09-05T14:18:44Z",
  "updated_at": "2016-09-05T14:22:28Z"
}Update an existing project column
Warning
Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.
“Update an existing project column”的细粒度访问令牌
此端点支持以下精细令牌类型:
精细令牌必须至少具有以下权限集之一:
- "Projects" repository permissions (write)
 - "Projects" organization permissions (write)
 
“Update an existing project column”的参数
| 名称, 类型, 说明 | 
|---|
accept string Setting to   | 
| 名称, 类型, 说明 | 
|---|
column_id integer 必须The unique identifier of the column.  | 
| 名称, 类型, 说明 | 
|---|
name string 必须Name of the project column  | 
“Update an existing project column”的 HTTP 响应状态代码
| 状态代码 | 说明 | 
|---|---|
200 | OK  | 
304 | Not modified  | 
401 | Requires authentication  | 
403 | Forbidden  | 
“Update an existing project column”的示例代码
如果你通过 GHE.com 访问 GitHub,请将 api.github.com 替换为你的企业在 api.SUBDOMAIN.ghe.com 上的专用子域。
请求示例
curl -L \
  -X PATCH \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/projects/columns/COLUMN_ID \
  -d '{"name":"To Do"}'Response
Status: 200{
  "url": "https://api.github.com/projects/columns/367",
  "project_url": "https://api.github.com/projects/120",
  "cards_url": "https://api.github.com/projects/columns/367/cards",
  "id": 367,
  "node_id": "MDEzOlByb2plY3RDb2x1bW4zNjc=",
  "name": "To Do",
  "created_at": "2016-09-05T14:18:44Z",
  "updated_at": "2016-09-05T14:22:28Z"
}Delete a project column
Warning
Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.
“Delete a project column”的细粒度访问令牌
此端点支持以下精细令牌类型:
精细令牌必须至少具有以下权限集之一:
- "Projects" repository permissions (write)
 - "Projects" organization permissions (write)
 
“Delete a project column”的参数
| 名称, 类型, 说明 | 
|---|
accept string Setting to   | 
| 名称, 类型, 说明 | 
|---|
column_id integer 必须The unique identifier of the column.  | 
“Delete a project column”的 HTTP 响应状态代码
| 状态代码 | 说明 | 
|---|---|
204 | No Content  | 
304 | Not modified  | 
401 | Requires authentication  | 
403 | Forbidden  | 
“Delete a project column”的示例代码
如果你通过 GHE.com 访问 GitHub,请将 api.github.com 替换为你的企业在 api.SUBDOMAIN.ghe.com 上的专用子域。
请求示例
curl -L \
  -X DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/projects/columns/COLUMN_IDResponse
Status: 204Move a project column
Warning
Closing down notice: Projects (classic) is being deprecated in favor of the new Projects experience. See the changelog for more information.
“Move a project column”的细粒度访问令牌
此端点支持以下精细令牌类型:
精细令牌必须至少具有以下权限集之一:
- "Projects" repository permissions (write)
 - "Projects" organization permissions (write)
 
“Move a project column”的参数
| 名称, 类型, 说明 | 
|---|
accept string Setting to   | 
| 名称, 类型, 说明 | 
|---|
column_id integer 必须The unique identifier of the column.  | 
| 名称, 类型, 说明 | 
|---|
position string 必须The position of the column in a project. Can be one of:   | 
“Move a project column”的 HTTP 响应状态代码
| 状态代码 | 说明 | 
|---|---|
201 | Created  | 
304 | Not modified  | 
401 | Requires authentication  | 
403 | Forbidden  | 
422 | Validation failed, or the endpoint has been spammed.  | 
“Move a project column”的示例代码
如果你通过 GHE.com 访问 GitHub,请将 api.github.com 替换为你的企业在 api.SUBDOMAIN.ghe.com 上的专用子域。
请求示例
curl -L \
  -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/projects/columns/COLUMN_ID/moves \
  -d '{"position":"last"}'Response
Status: 201