Эта версия GitHub Enterprise Server была прекращена 2024-09-25. Исправления выпускаться не будут даже при критических проблемах безопасности. Для повышения производительности, повышения безопасности и новых функций выполните обновление до последней версии GitHub Enterprise Server. Чтобы получить справку по обновлению, обратитесь в службу поддержки GitHub Enterprise.
REST API endpoints for Project (classic) cards
Используйте REST API для создания карта и управления ими в project (классическая модель).
Note
REST API для управления projects (classic) поддерживает проверку подлинности только с помощью personal access token (classic). Дополнительные сведения см. в разделе Управление личными маркерами доступа.
Get a project card
Gets information about a project card.
Подробные маркеры доступа для "Get a project card
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
 - Маркеры доступа к установке приложений GitHub
 - Точные личные маркеры доступа
 
Маркер с точной детализацией должен иметь по крайней мере один из следующих наборов разрешений.:
- "Projects" repository permissions (read)
 - "Projects" organization permissions (read)
 
Эту конечную точку можно использовать без проверки подлинности или указанных выше разрешений, если запрашиваются только общедоступные ресурсы.
Параметры для "Get a project card"
| Имя., Тип, Description | 
|---|
accept string Setting to   | 
| Имя., Тип, Description | 
|---|
card_id integer Обязательное полеThe unique identifier of the card.  | 
Коды состояния http-ответа для "Get a project card"
| Код состояния | Описание | 
|---|---|
200 | OK  | 
304 | Not modified  | 
401 | Requires authentication  | 
403 | Forbidden  | 
404 | Resource not found  | 
Примеры кода для "Get a project card"
Пример запроса
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/projects/columns/cards/CARD_IDResponse
Status: 200{
  "url": "https://HOSTNAME/projects/columns/cards/1478",
  "id": 1478,
  "node_id": "MDExOlByb2plY3RDYXJkMTQ3OA==",
  "note": "Add payload for delete Project column",
  "creator": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://HOSTNAME/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://HOSTNAME/users/octocat/followers",
    "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
    "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
    "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
    "organizations_url": "https://HOSTNAME/users/octocat/orgs",
    "repos_url": "https://HOSTNAME/users/octocat/repos",
    "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
    "received_events_url": "https://HOSTNAME/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "created_at": "2016-09-05T14:21:06Z",
  "updated_at": "2016-09-05T14:20:22Z",
  "archived": false,
  "column_url": "https://HOSTNAME/projects/columns/367",
  "content_url": "https://HOSTNAME/repos/api-playground/projects-test/issues/3",
  "project_url": "https://HOSTNAME/projects/120"
}Update an existing project card
Подробные маркеры доступа для "Update an existing project card
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
 - Маркеры доступа к установке приложений GitHub
 - Точные личные маркеры доступа
 
Маркер с точной детализацией должен иметь по крайней мере один из следующих наборов разрешений.:
- "Projects" repository permissions (write)
 - "Projects" organization permissions (write)
 
Параметры для "Update an existing project card"
| Имя., Тип, Description | 
|---|
accept string Setting to   | 
| Имя., Тип, Description | 
|---|
card_id integer Обязательное полеThe unique identifier of the card.  | 
| Имя., Тип, Description | 
|---|
note string or null The project card's note  | 
archived boolean Whether or not the card is archived  | 
Коды состояния http-ответа для "Update an existing project card"
| Код состояния | Описание | 
|---|---|
200 | OK  | 
304 | Not modified  | 
401 | Requires authentication  | 
403 | Forbidden  | 
404 | Resource not found  | 
422 | Validation failed, or the endpoint has been spammed.  | 
Примеры кода для "Update an existing project card"
Пример запроса
curl -L \
  -X PATCH \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/projects/columns/cards/CARD_ID \
  -d '{"note":"Add payload for delete Project column"}'Response
Status: 200{
  "url": "https://HOSTNAME/projects/columns/cards/1478",
  "id": 1478,
  "node_id": "MDExOlByb2plY3RDYXJkMTQ3OA==",
  "note": "Add payload for delete Project column",
  "creator": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://HOSTNAME/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://HOSTNAME/users/octocat/followers",
    "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
    "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
    "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
    "organizations_url": "https://HOSTNAME/users/octocat/orgs",
    "repos_url": "https://HOSTNAME/users/octocat/repos",
    "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
    "received_events_url": "https://HOSTNAME/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "created_at": "2016-09-05T14:21:06Z",
  "updated_at": "2016-09-05T14:20:22Z",
  "archived": false,
  "column_url": "https://HOSTNAME/projects/columns/367",
  "content_url": "https://HOSTNAME/repos/api-playground/projects-test/issues/3",
  "project_url": "https://HOSTNAME/projects/120"
}Delete a project card
Deletes a project card
Подробные маркеры доступа для "Delete a project card
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
 - Маркеры доступа к установке приложений GitHub
 - Точные личные маркеры доступа
 
Маркер с точной детализацией должен иметь по крайней мере один из следующих наборов разрешений.:
- "Projects" repository permissions (write)
 - "Projects" organization permissions (write)
 
Параметры для "Delete a project card"
| Имя., Тип, Description | 
|---|
accept string Setting to   | 
| Имя., Тип, Description | 
|---|
card_id integer Обязательное полеThe unique identifier of the card.  | 
Коды состояния http-ответа для "Delete a project card"
| Код состояния | Описание | 
|---|---|
204 | No Content  | 
304 | Not modified  | 
401 | Requires authentication  | 
403 | Forbidden  | 
404 | Resource not found  | 
Примеры кода для "Delete a project card"
Пример запроса
curl -L \
  -X DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/projects/columns/cards/CARD_IDResponse
Status: 204Move a project card
Подробные маркеры доступа для "Move a project card
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
 - Маркеры доступа к установке приложений GitHub
 - Точные личные маркеры доступа
 
Маркер с точной детализацией должен иметь по крайней мере один из следующих наборов разрешений.:
- "Projects" repository permissions (write)
 - "Projects" organization permissions (write)
 
Параметры для "Move a project card"
| Имя., Тип, Description | 
|---|
accept string Setting to   | 
| Имя., Тип, Description | 
|---|
card_id integer Обязательное полеThe unique identifier of the card.  | 
| Имя., Тип, Description | 
|---|
position string Обязательное полеThe position of the card in a column. Can be one of:   | 
column_id integer The unique identifier of the column the card should be moved to  | 
Коды состояния http-ответа для "Move a project card"
| Код состояния | Описание | 
|---|---|
201 | Created  | 
304 | Not modified  | 
401 | Requires authentication  | 
403 | Forbidden  | 
422 | Validation failed, or the endpoint has been spammed.  | 
503 | Service Unavailable  | 
Примеры кода для "Move a project card"
Пример запроса
curl -L \
  -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/projects/columns/cards/CARD_ID/moves \
  -d '{"column_id":42,"position":"bottom"}'Response
Status: 201List project cards
Lists the project cards in a project.
Подробные маркеры доступа для "List project cards
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
 - Маркеры доступа к установке приложений GitHub
 - Точные личные маркеры доступа
 
Маркер с точной детализацией должен иметь по крайней мере один из следующих наборов разрешений.:
- "Projects" repository permissions (read)
 - "Projects" organization permissions (read)
 
Эту конечную точку можно использовать без проверки подлинности или указанных выше разрешений, если запрашиваются только общедоступные ресурсы.
Параметры для "List project cards"
| Имя., Тип, Description | 
|---|
accept string Setting to   | 
| Имя., Тип, Description | 
|---|
column_id integer Обязательное полеThe unique identifier of the column.  | 
| Имя., Тип, Description | 
|---|
archived_state string Filters the project cards that are returned by the card's state. По умолчанию.:  Возможные значения:   | 
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 cards"
| Код состояния | Описание | 
|---|---|
200 | OK  | 
304 | Not modified  | 
401 | Requires authentication  | 
403 | Forbidden  | 
Примеры кода для "List project cards"
Пример запроса
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/projects/columns/COLUMN_ID/cardsResponse
Status: 200[
  {
    "url": "https://HOSTNAME/projects/columns/cards/1478",
    "id": 1478,
    "node_id": "MDExOlByb2plY3RDYXJkMTQ3OA==",
    "note": "Add payload for delete Project column",
    "creator": {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://HOSTNAME/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://HOSTNAME/users/octocat/followers",
      "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
      "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
      "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
      "organizations_url": "https://HOSTNAME/users/octocat/orgs",
      "repos_url": "https://HOSTNAME/users/octocat/repos",
      "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
      "received_events_url": "https://HOSTNAME/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    },
    "created_at": "2016-09-05T14:21:06Z",
    "updated_at": "2016-09-05T14:20:22Z",
    "archived": false,
    "column_url": "https://HOSTNAME/projects/columns/367",
    "content_url": "https://HOSTNAME/repos/api-playground/projects-test/issues/3",
    "project_url": "https://HOSTNAME/projects/120"
  }
]Create a project card
Подробные маркеры доступа для "Create a project card
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
 - Маркеры доступа к установке приложений GitHub
 - Точные личные маркеры доступа
 
Маркер с точной детализацией должен иметь по крайней мере один из следующих наборов разрешений.:
- "Projects" repository permissions (write)
 - "Projects" organization permissions (write)
 
Параметры для "Create a project card"
| Имя., Тип, Description | 
|---|
accept string Setting to   | 
| Имя., Тип, Description | 
|---|
column_id integer Обязательное полеThe unique identifier of the column.  | 
| Имя., Тип, Description | 
|---|
note string or null Обязательное полеThe project card's note  | 
content_id integer Обязательное полеThe unique identifier of the content associated with the card  | 
content_type string Обязательное полеThe piece of content associated with the card  | 
Коды состояния http-ответа для "Create a project card"
| Код состояния | Описание | 
|---|---|
201 | Created  | 
304 | Not modified  | 
401 | Requires authentication  | 
403 | Forbidden  | 
422 | Validation failed  | 
503 | Service Unavailable  | 
Примеры кода для "Create a project card"
Пример запроса
curl -L \
  -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  http(s)://HOSTNAME/api/v3/projects/columns/COLUMN_ID/cards \
  -d '{"note":"Add payload for delete Project column"}'Response
Status: 201{
  "url": "https://HOSTNAME/projects/columns/cards/1478",
  "id": 1478,
  "node_id": "MDExOlByb2plY3RDYXJkMTQ3OA==",
  "note": "Add payload for delete Project column",
  "creator": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://HOSTNAME/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://HOSTNAME/users/octocat/followers",
    "following_url": "https://HOSTNAME/users/octocat/following{/other_user}",
    "gists_url": "https://HOSTNAME/users/octocat/gists{/gist_id}",
    "starred_url": "https://HOSTNAME/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://HOSTNAME/users/octocat/subscriptions",
    "organizations_url": "https://HOSTNAME/users/octocat/orgs",
    "repos_url": "https://HOSTNAME/users/octocat/repos",
    "events_url": "https://HOSTNAME/users/octocat/events{/privacy}",
    "received_events_url": "https://HOSTNAME/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  },
  "created_at": "2016-09-05T14:21:06Z",
  "updated_at": "2016-09-05T14:20:22Z",
  "archived": false,
  "column_url": "https://HOSTNAME/projects/columns/367",
  "content_url": "https://HOSTNAME/repos/api-playground/projects-test/issues/3",
  "project_url": "https://HOSTNAME/projects/120"
}