Эта версия GitHub Enterprise Server была прекращена 2024-03-26. Исправления выпускаться не будут даже при критических проблемах безопасности. Для повышения производительности, повышения безопасности и новых функций выполните обновление до последней версии GitHub Enterprise Server. Чтобы получить справку по обновлению, обратитесь в службу поддержки GitHub Enterprise.
Конечные точки REST API для столбцов Project (classic)
Use the REST API to create and manage columns on a project (classic).
Get a project column
Gets information about a project column.
Параметры для "Get a project column"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
column_id integer Обязательное полеThe unique identifier of the column. |
Коды состояния http-ответа для "Get a project column"
Код состояния | Описание |
---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
404 | Resource not found |
Примеры кода для "Get a project column"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/projects/columns/COLUMN_ID
Response
Status: 200
{
"url": "https://HOSTNAME/projects/columns/367",
"project_url": "https://HOSTNAME/projects/120",
"cards_url": "https://HOSTNAME/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
Параметры для "Update an existing project column"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
column_id integer Обязательное полеThe unique identifier of the column. |
Имя., Тип, Description |
---|
name string Обязательное полеName of the project column |
Коды состояния http-ответа для "Update an existing project column"
Код состояния | Описание |
---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
Примеры кода для "Update an existing project column"
Пример запроса
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/projects/columns/COLUMN_ID \
-d '{"name":"To Do"}'
Response
Status: 200
{
"url": "https://HOSTNAME/projects/columns/367",
"project_url": "https://HOSTNAME/projects/120",
"cards_url": "https://HOSTNAME/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
Deletes a project column.
Параметры для "Delete a project column"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
column_id integer Обязательное полеThe unique identifier of the column. |
Коды состояния http-ответа для "Delete a project column"
Код состояния | Описание |
---|---|
204 | No Content |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
Примеры кода для "Delete a project column"
Пример запроса
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/projects/columns/COLUMN_ID
Response
Status: 204
Move a project column
Параметры для "Move a project column"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
column_id integer Обязательное полеThe unique identifier of the column. |
Имя., Тип, Description |
---|
position string Обязательное полеThe position of the column in a project. Can be one of: |
Коды состояния http-ответа для "Move a project column"
Код состояния | Описание |
---|---|
201 | Created |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Move a project column"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/projects/columns/COLUMN_ID/moves \
-d '{"position":"last"}'
Response
Status: 201
List project columns
Lists the project columns in a project.
Параметры для "List project columns"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
project_id integer Обязательное полеThe unique identifier of the project. |
Имя., Тип, Description |
---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." По умолчанию.: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." По умолчанию.: |
Коды состояния http-ответа для "List project columns"
Код состояния | Описание |
---|---|
200 | OK |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
Примеры кода для "List project columns"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/projects/PROJECT_ID/columns
Response
Status: 200
[
{
"url": "https://HOSTNAME/projects/columns/367",
"project_url": "https://HOSTNAME/projects/120",
"cards_url": "https://HOSTNAME/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"
}
]
Create a project column
Creates a new project column.
Параметры для "Create a project column"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
project_id integer Обязательное полеThe unique identifier of the project. |
Имя., Тип, Description |
---|
name string Обязательное полеName of the project column |
Коды состояния http-ответа для "Create a project column"
Код состояния | Описание |
---|---|
201 | Created |
304 | Not modified |
401 | Requires authentication |
403 | Forbidden |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Create a project column"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/projects/PROJECT_ID/columns \
-d '{"name":"Remaining tasks"}'
Response
Status: 201
{
"url": "https://HOSTNAME/projects/columns/367",
"project_url": "https://HOSTNAME/projects/120",
"cards_url": "https://HOSTNAME/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"
}