Skip to content

Commit 5863f46

Browse files
Update index.md
1 parent d143398 commit 5863f46

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

restful/index.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,32 @@ WP-CLI's mission is to be, quantitatively, the *fastest* interface for developer
1111

1212
Wait a second, what does it mean to "unlock the potential of the WP REST API at the command line"? Pragmatically, it means any endpoints registered in plugins or themes are *automagically* accessible as WP-CLI commands. For instance, if you were to register an endpoint for `GET /my-plugin/v1/product/<id>`, this endpoint is also accessible on the command line as (more or less) `wp @prod product get <id>`.
1313

14-
For a summary of these features, check out [wp-cli/restful](https://github.com/wp-cli/restful). Or, read through the updates linked below for a broader overview of how the project progressed.
14+
Quick links: [Highlights](#highlights) - [Milestones](#Milestones) - [Budget](#budget) - [Supporters](#supporters)
1515

16-
Quick links: [Achievements](#achievements) - [Budget](#budget) - [Supporters](#supporters)
16+
***
17+
18+
## Highlights
19+
20+
### RESTful WP-CLI
21+
22+
RESTful WP-CLI is a [WP-CLI package](https://github.com/wp-cli/restful) that makes WP REST API endpoints available as WP-CLI commands.
23+
24+
As WordPress becomes more of an application framework embedded into the web, RESTful WP-CLI enables WP-CLI users to interact with a given WordPress install through the higher-level, self-expressed abstraction of how WordPress understands itself. For instance, on an eCommerce website, instead of having to know data is stored as `wp post list --post_type=edd_product`, RESTful WP-CLI exposes the properly-modeled data at `wp rest product list`.
25+
26+
First, RESTful WP-CLI auto-discovers WP REST API endpoints from any WordPress site running WordPress 4.4 or higher. These can be endpoints from the WP REST API v2 plugin, or custom endpoints you’ve registered yourself. You can target a specific WordPress install with `--path=<path>`, `--ssh=<host>`, or `--http=<domain>`. Then, it registers WP-CLI commands for the resource endpoints it understands, in the wp rest namespace. In addition to the standard list, get, create, update and delete commands, RESTful WP-CLI also registers commands for higher-level operations like edit, generate and diff.
27+
28+
Try it yourself:
29+
30+
```
31+
wp package install wp-cli/restful
32+
wp --http=runcommand.io rest excerpt list
33+
```
34+
35+
For a summary of these features, check out [wp-cli/restful](https://github.com/wp-cli/restful).
1736

1837
***
1938

20-
## Achievements
39+
## Milestones
2140

2241
Blog posts:
2342

0 commit comments

Comments
 (0)