hosting
GET /v1/wordpress/plugin-directory
Search the WordPress plugin directory.
Упълномощаване
Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението sites.view; ключ без него се отхвърля с 403, а не с 404.
Този ендпойнт не изисква идентификатор на организация. Вашият ключ вече идентифицира организацията, към която принадлежи, и отговорът е ограничен до нея.
Опитайте
Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.
curl -X GET https://api.zinndigital.com/v1/wordpress/plugin-directory?q=<q> \
-H "Authorization: Bearer zdk_live_…"Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата
Детайли
Plugins a customer can install, from the wordpress.org directory. Collection-level and not under a site, because choosing a plugin comes before choosing where to put it — the fleet-wide manager picks the plugin first and the sites second, and hanging this off /v1/sites/{siteId}/… would force it to name an irrelevant site to search. An empty or whitespace-only q returns an empty page rather than the directory's popularity ranking: sixty thousand plugins nobody asked for, one upstream call per keystroke of nothing. rating is normalised to 0–5. The upstream reports 0–100, and a client rendering that as stars without dividing shows every plugin as full marks. author is plain text — upstream sends it as an HTML anchor, which is stripped here so a vendor's markup never reaches our page. Requires sites.view. The upstream is unauthenticated and read-only; our egress routing for it is registered as wordpress_org.
Параметри
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
q (query) | string | Да | What to search for. |
page (query) | integer | Не | — |
per_page (query) | integer | Не | — |
Отговор
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
data | WordPressDirectoryPlugin[] | Да | — |
page | integer | Да | — |
pages | integer | Да | Total pages available. 0 when nothing matched. |
total | integer | Да | Total matching plugins across all pages. |
Грешки, които този крайpoint може да върне
401 · 403 · 429 · 503