links
GET /v1/content/targets
Which of your sites can receive a post, and why the rest cannot.
Автентифікація
Надішліть ключ API як маркер носія (bearer token). Ця кінцева точка не вказує конкретного дозволу в специфікації, тому надайте своєму ключу мінімально необхідні права та перевірте відповідь, замість того щоб припускати.
Де вказується ідентифікатор вашої організації
Цей ендпоїнт приймає org_id як параметр запиту. Залиште його порожнім, і виклик охопить увесь ваше дерево орендарів; надішліть його, щоб звузити виклик до однієї організації.
Ідентифікатор вашої організації знаходиться на екрані API-ключів у вашій панелі керування, поруч із самим ключем. Це той самий ідентифікатор у кожному вашому запиті.
Спробувати
Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.
curl -X GET https://api.zinndigital.com/v1/content/targets \
-H "Authorization: Bearer zdk_live_…"Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API
Деталі
Every live site in scope with its suitability: can it take an article, and — when it cannot — whose fact that is. Gated on links.view. ⛔⛔ suitability has five values and the difference between two of them is the whole point of this endpoint. unsuitable is measured: every adapter was asked which sites it claims and each one declined, so this kind of site genuinely has nowhere to put an article. unknown means we could not determine it — the box was unreachable, the credential has never been tested, or nothing has checked this site yet. A client MUST NOT render unknown as a refusal, MUST NOT silently exclude it from a selection, and SHOULD count it separately in any confirmation ("9 ready, 3 unchecked"). Treating "we could not look" as "no" is the defect this endpoint exists to prevent. ⛔ This endpoint makes no outbound calls. Suitability is served from the last stored probe with checkedAt beside it, because probing every row of a 500-site page would be an uncached external call in an interactive path. checkedAt: null means never checked and MUST be shown as such, not as a fresh result. Use probeContentTargets to refresh. ⭐ requires takes capability ids a recipe needs; each row then carries missingCapabilities, so an editor can grey a site out and say what it cannot do. A site whose capabilities are not established reports nothing missing rather than everything missing — for the same reason unknown is not unsuitable.
Параметри
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
org_id (query) | string | Ні | Narrow to one organisation in a reseller subtree. Can never widen scope. |
q (query) | string | Ні | Match on domain or site name. |
suitability (query) | string<ready, needs_setup, unknown, unsuitable, blocked> | Ні | — |
product_line (query) | string | Ні | — |
stack_type (query) | string | Ні | — |
group_id (query) | string | Ні | Only sites in this site group. |
cms (query) | string<wordpress, headless_rest, git_static> | Ні | Only sites whose target is this kind. |
requires (query) | string | Ні | Comma-separated capability ids a recipe requires, e.g. cms_target:featured_image,cms_target:category. |
limit (query) | integer | Ні | — |
offset (query) | integer | Ні | — |
Відповідь
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
items | SiteTarget[] | Так | — |
total | integer | Так | Every site matching the filters, not the page. This is the number a select-all-matching control shows. |
offset | integer | Так | — |
limit | integer | Так | — |
has_more | boolean | Так | — |
Помилки, які може повертати ця кінцева точка
401 · 403 · 422