hosting

POST /v1/sites/{siteId}/wordpress/cli

Run one allow-listed WP-CLI command on the site.

అన్ని hosting ఎండ్‌పాయింట్లు

ప్రమాణీకరణ

బీయర్ టోకెన్‌గా API కీని పంపండి. కీ తప్పనిసరిగా sites.view అనుమతిని కలిగి ఉండాలి; అది లేని కీని 404 కాకుండా 403తో తిరస్కరిస్తారు.

ఈ ఎండ్‌పాయింట్ ఎలాంటి సంస్థ ఐడీని తీసుకోదు. మీ కీ ఇప్పటికే అది ఏ సంస్థకు చెందుతుందో గుర్తిస్తుంది మరియు ప్రతిస్పందన దానికే పరిమితం చేయబడుతుంది.

ప్రయత్నించండి

కోణీయ బ్రాకెట్‌లలో ఉన్న దేన్నైనా మీ స్వంత విలువలతో భర్తీ చేయండి, మరియు కీ ప్లేస్‌హోల్డర్‌ను మీ డాష్‌బోర్డ్ నుండి తీసుకున్న కీతో భర్తీ చేయండి.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/wordpress/cli \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "command": <string> }'

సైన్ ఇన్ చేశారా? మీ డ్యాష్‌బోర్డ్‌లోని API కాన్సోల్ మీ అసలైన సంస్థ ID మరియు మీ స్వంత కీని నింపుతుంది, అలాగే మీరు అసలైన ప్రతిస్పందనను చూడటానికి లైవ్ API ద్వారా ఆభ్యర్థనను రన్ చేస్తుంది. ఈ ఎండ్‌పాయింట్‌ను API కన్సోల్‌లో తెరిచండి

వివరాలు

An audited WP-CLI console. Every invocation is recorded in the site's WordPress activity log with its argv and exit code — never its output. ⛔ **Allow-listed, never arbitrary.** An unrestricted passthrough is remote code execution as the site user: `wp eval` runs arbitrary PHP, `wp db query` runs arbitrary SQL, and `wp --require=/tmp/x.php` loads code the caller chose before WP-CLI decides what to do. The permitted commands are reads and idempotent cache operations, listed by `listWordPressCliCommands`; anything else answers `422` naming the whole list. ⛔ `config get` and `config list` are **deliberately absent** — they read `wp-config.php`, whose constants include the database password and the authentication salts. ⛔ A **non-zero `exit_code` still answers `200`.** The console's product is what WP-CLI said, and mapping a bad argument onto a 4xx would put our error page over the diagnosis the customer asked for. A `422` means *we* refused the command, which is a different answer. ⛔ The command travels in the **body**, not the path, so it never reaches a proxy or edge access log — `option get` names options a plugin may have stored a credential in. ⛔ **Fleet only** — refused where `wp_cli` is `false`. Requires `sites.view` and `sites.panel_access`.

పారామీటర్లు

పేరురకంకావలసినదిఇది ఏమిటి
siteId (path)UuidఅవునుSite ID (UUIDv7).

అభ్యర్థన బాడీ

పేరురకంకావలసినదిఇది ఏమిటి
commandstringఅవునుThe WP-CLI command, with or without a leading `wp`.

స్పందన

పేరురకంకావలసినదిఇది ఏమిటి
argvstring[]అవునుWhat actually ran, after the allow-list normalised it — echoed back so `wp plugin list` and `plugin list` are visibly the same command.
exit_codeintegerఅవునుWP-CLI's exit code. `0` is success.
stdoutstringఅవునుWhat WP-CLI printed, up to the console's cap.
stderrstringఅవునుWP-CLI's diagnostics, carried **separately** and never merged into `stdout` — WP-CLI writes PHP notices here on runs that succeed, so folding them together would corrupt the JSO…
truncatedbooleanఅవునుTrue when `stdout` was cut at the cap. ⛔ Stated rather than hidden: a silently cut-off JSON document is worse than none, because it nearly parses.

ఈ ఎండ్‌పాయింట్ తిరిగి ఇవ్వగల లోపాలు

401 · 403 · 404 · 422 · 429 · 503