hosting
GET /v1/wordpress/theme-directory
Search the WordPress theme directory.
Автентифікація
Надішліть ключ API як маркер носія (bearer token). Ключ повинен мати дозвіл sites.view; ключ без нього відхиляється з кодом 403, а не 404.
Цей кінцевий пункт не потребує ідентифікатора організації. Ваш ключ уже ідентифікує організацію, якій він належить, і відповідь обмежується її межами.
Спробувати
Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.
curl -X GET https://api.zinndigital.com/v1/wordpress/theme-directory?q=<q> \
-H "Authorization: Bearer zdk_live_…"Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API
Деталі
Themes a customer can install, from the wordpress.org directory. Collection-level and not under a site, for the same reason as the plugin catalogue: choosing a theme comes before choosing where to put it. An empty or whitespace-only q returns an empty page rather than the directory's popularity ranking. rating is normalised to 0–5 (upstream reports 0–100). author is plain text — upstream returns it as an object on this API and as an HTML anchor on the plugin one, so neither shape reaches our page. screenshot_url and preview_url are normalised to https: upstream emits them protocol-relative (//ts.w.org/…), which is a working URL in a browser and a broken one everywhere else. ⚠️ screenshot_url and preview_url are third-party URLs a client will put in an <img src> and an anchor. Choosing a theme without seeing it is not a feature, so they travel; this is a considered risk, not an oversight. The engine never fetches them. Requires sites.view. Our egress routing for the upstream is registered as wordpress_org — the same service key as the plugin directory, because it is the same host, the same (absent) account and therefore the same throttling subject.
Параметри
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
q (query) | string | Так | What to search for. |
page (query) | integer | Ні | — |
per_page (query) | integer | Ні | — |
Відповідь
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
data | WordPressDirectoryTheme[] | Так | — |
page | integer | Так | — |
pages | integer | Так | Total pages available. 0 when nothing matched. |
total | integer | Так | Total matching themes across all pages. |
Помилки, які може повертати ця кінцева точка
401 · 403 · 429 · 503