Sites hosted elsewhere
Connect a WordPress site hosted elsewhere through the WPL7 Connect plugin: create a connection, install its plugin on the site, then add the site. The last three endpoints are the plugin’s own.
Reading needs Read only and changes need Manage, unless an endpoint says otherwise. How to read this page.
GET /api/connections
Section titled “GET /api/connections”List the connections that are not a site yet, newest first.
- Level: Read only
- Returns:
{items: ConnectionSummaryDto[]}
POST /api/connections
Section titled “POST /api/connections”Start connecting a site: it enrolls with the plugin this hands out.
- Level: Manage
- Input:
{sourceUrl?, allowHttp?: false} - Returns:
201 ConnectionDto
GET /api/connections/:id
Section titled “GET /api/connections/:id”One connection in full: the site’s report, its warnings and what Add site starts with.
- Level: Read only
- Returns:
ConnectionDto
GET /api/connections/:id/plugin
Section titled “GET /api/connections/:id/plugin”Download WPL7 Connect for this connection, to install on the site.
A zip file: the plugin with this connection’s file in it.
- Level: Manage. It holds the token the site enrolls with
- Notes: Not over MCP
- Returns:
application/zip
GET /api/connections/:id/code
Section titled “GET /api/connections/:id/code”The panel address and connection code, for the plugin’s form when it came without its connection file.
- Level: Manage. The code is the token the site enrolls with
- Notes: Not over MCP
- Returns:
ConnectionCodeDto
POST /api/connections/:id/check
Section titled “POST /api/connections/:id/check”Check that the panel reaches the plugin on the site now.
- Level: Manage
- Returns:
ConnectionDto
POST /api/connections/:id/add
Section titled “POST /api/connections/:id/add”Add the site: list it under External and take its first backup.
- Level: Manage
- Input:
{slug?, title?, storageServerId?, actAs?, backups?: true} - Returns:
201 {site: SiteSummary, jobs: Job[]}
DELETE /api/connections/:id
Section titled “DELETE /api/connections/:id”Delete a connection that is not a site.
- Level: Manage
- Notes: Destructive
- Returns:
204
PATCH /api/sites/:slug/connection
Section titled “PATCH /api/sites/:slug/connection”Change who an external site acts as, where its backups are kept, or take its new address.
- Level: Manage
- Input:
{actAs?, storageServerId? (needs Full), useNewHome?: true} - Returns:
SiteDetail
POST /api/sites/:slug/connection/reconnect
Section titled “POST /api/sites/:slug/connection/reconnect”A new plugin download for an external site: its keys change when that plugin connects.
- Level: Manage
- Returns:
201 ConnectionDto
POST /api/sites/:slug/connection/disconnect
Section titled “POST /api/sites/:slug/connection/disconnect”Disconnect an external site; it stays listed, with its backups, and can reconnect.
- Level: Manage
- Notes: Destructive
- Returns:
SiteDetail
POST /api/connect/enroll
Section titled “POST /api/connect/enroll”The plugin reports the site; the connection’s token goes in X-WPL7-Connect-Token.
- Level: No key
- Notes: Not over MCP
- Input:
the report (docs/internal/connect-protocol.md)
GET /api/connect/package
Section titled “GET /api/connect/package”WPL7 Connect for a site to update itself, through a link the panel signed.
- Level: No key
- Notes: Not over MCP
- Input:
?v&e&s - Returns:
application/zip
GET /api/connect/catalog/:pluginId
Section titled “GET /api/connect/catalog/:pluginId”A catalog zip for one install on a site, through a link the panel signed.
- Level: No key
- Notes: Not over MCP
- Input:
?site&e&s - Returns:
application/zip