I’d like to manipulate a WordPress website from another program/website. IS there an API already written that provides access, and authentication, to do this?
Ideally, I’ll be using a multi-site wordpress instance and I want an outside program to add new sites, send config options to plugins, etc.
As of WordPress 4.7 (released December 2016), a REST API is provided out of the box on WordPress.
As you’re probably aware, REST APIs are interfaced with by standard HTTP GET and POST requests, so if you have a WordPress 4.7 installation, you can access it at this URL, by plugging this into your browser:
http://your.site.com/wp/v2/posts
Further reading:
Important side note:
Because this is turned on be default, because this exposes endpoints that can changes your data (via POST/PATCH/DELETE requests), and because WordPress prefers you not to disable it, you really really ought to turn on some form of authentication. Thankfully, turning on basic WP logged-in authentication isn’t particularly hard, and there are plugins that will enable OAuth.
WordPpress platform provides XML-RPC support which you can use to maintain your WP site. You also enable to extend functionality of build in xml-rpc methods to use it for your needs.
There are multiple API plugins out there that work very well:
WP-API by Ryan McCue
https://github.com/WP-API/WP-API
and JSON API by Dan Phiffer:
http://wordpress.org/plugins/json-api/