board-github
PUT /v1/board-github/links/{linkId}/items/{itemId}/archive
Archive a GitHub Project item, or restore it.
Аутентификация
Передайте API-ключ в качестве маркера носителя (bearer token). Эта конечная точка не указывает конкретное разрешение в спецификации, поэтому предоставьте своему ключу минимум необходимых прав и проверьте ответ, вместо того чтобы делать предположения.
Этот эндпоинт не принимает идентификатор организации. Ваш ключ уже определяет организацию, к которой он принадлежит, и ответ ограничивается ее рамками.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X PUT https://api.zinndigital.com/v1/board-github/links/{linkId}/items/{itemId}/archive \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "archived": <boolean> }'Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
The reversible half of clearing a board, and how a person empties a Done column without destroying anything. `archived` is required and carries both directions; there is no default, because a default would make a request that lost its body in a proxy mean *archive* — the opposite of a restore, applied silently. `isArchived` in the response is read back from GitHub with a second query rather than taken from the mutation's own echo, which returns the item it was handed and would therefore agree with us whether or not GitHub applied anything.
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
linkId (path) | string | Да | The GitHub Projects connection. |
itemId (path) | string | Да | The item, by OUR id — not GitHub's node id, which is not a path-safe value. |
Тело запроса
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
archived | boolean | Да | Required, with no default. A default would make a request that lost its body mean *archive*, so a restore would silently do the opposite of what was asked. |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
id | string | Нет | — |
item_node_id | string | Нет | — |
item_type | string<ISSUE, PULL_REQUEST, DRAFT_ISSUE, REDACTED> | Нет | — |
content_number | integer | Нет | — |
repository | string | Нет | — |
title | string | Нет | — |
body | string | Нет | — |
url | string | Нет | — |
state | string | Нет | — |
is_archived | boolean | Нет | — |
field_values | object | Нет | Keyed by the field's **node id**, never its name. A project owner renaming a field would otherwise orphan every stored value at once, and the next sync would read it as "every i… |
github_updated_at | string | Нет | — |
local_updated_at | string | Нет | When WE last changed this item. Set only by a local edit, never by a sync — a sync that stamped it would make every imported item look locally-edited and hand every subsequent c… |
card_id | string | Нет | — |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 422