links
GET /v1/content/targets
Which of your sites can receive a post, and why the rest cannot.
Xác thực
Gửi khóa API dưới dạng mã thông báo bearer. Điểm cuối này không nêu rõ quyền cụ thể trong thông số kỹ thuật, vì vậy hãy cấp cho khóa của bạn quyền tối thiểu cần thiết và kiểm tra phản hồi thay vì phỏng đoán.
Nơi điền id tổ chức của bạn
Điểm cuối này nhận org_id làm tham số truy vấn. Hãy bỏ trống để áp dụng cho toàn bộ cây thuê của bạn; hoặc truyền giá trị vào để thu hẹp phạm vi gọi về một tổ chức duy nhất.
Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.
Dùng thử
Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.
curl -X GET https://api.zinndigital.com/v1/content/targets \
-H "Authorization: Bearer zdk_live_…"Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API
Chi tiết
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`.
Tham số
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
org_id (query) | string | Không | Narrow to one organisation in a reseller subtree. Can never widen scope. |
q (query) | string | Không | Match on domain or site name. |
suitability (query) | string<ready, needs_setup, unknown, unsuitable, blocked> | Không | — |
product_line (query) | string | Không | — |
stack_type (query) | string | Không | — |
group_id (query) | string | Không | Only sites in this site group. |
cms (query) | string<wordpress, headless_rest, git_static> | Không | Only sites whose target is this kind. |
requires (query) | string | Không | Comma-separated capability ids a recipe requires, e.g. `cms_target:featured_image,cms_target:category`. |
limit (query) | integer | Không | — |
offset (query) | integer | Không | — |
Phản hồi
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
items | SiteTarget[] | Có | — |
total | integer | Có | Every site matching the filters, not the page. This is the number a select-all-matching control shows. |
offset | integer | Có | — |
limit | integer | Có | — |
has_more | boolean | Có | — |
Các lỗi điểm cuối này có thể trả về
401 · 403 · 422