board-github
POST /v1/board-github/discover
List the GitHub Projects a credential can see.
Аутентификација
Пошаљите API кључ као bearer токен. Ова крајња тачка не наводи конкретну дозволу у спецификацији, па свом кључу доделите најмања неопходна овлашћења и проверите одговор уместо да претпостављате.
Где се уноси ID ваше организације
Ова крајња тачка узима org_id као поље у JSON телу.
Идентификатор ваше организације се налази на екрану са API кључевима на вашој контролној табли, поред самог кључа. То је исти идентификатор у сваком позиву који упутите.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X POST https://api.zinndigital.com/v1/board-github/discover \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "owner_login": <string> }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
Asked before anything is linked, so the customer picks a project from a list rather than pasting a node id. Reads both owner shapes — GitHub's organization query returns null for a user login and user returns null for an org login, so a single-shape read would answer "no projects" for half of all customers with no error anywhere. count is returned beside projects deliberately: an owner with genuinely no projects and a credential that cannot see any would otherwise be the same empty array.
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
owner_login | string | Да | — |
auth_kind | GitHubAuthKind | Не | app is the Zinn® GitHub App installation — per-repository scope the customer chooses on GitHub's own screen, revocable by them in one click, belonging to their organisation… |
installation_id | string | Не | — |
token | string | Не | A fine-grained token, for auth_kind: pat. Write-only and never echoed — a response carrying it would put a live GitHub credential in the browser's network tab and in any log… |
org_id | string | Не | — |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
owner_login | string | Не | — |
count | integer | Не | Returned beside the list on purpose. An owner with genuinely no projects and a credential that cannot see any would otherwise be the same empty array. |
projects | GitHubProjectSummary[] | Не | — |
Грешке које ова крајња тачка може вратити
401 · 403 · 422