Sites

Import a WordPress site

Imports the published pages and posts of a WordPress site on a domain this project has proven it owns, as clean pages that keep their addresses, with images within the site limits, a /_redirects file for addresses that change, a collection per form (the form on the new site posts to it), products to the product collection where payments are available, and puts posts that do not fit into a private collection. Publishes through the same checks as POST /sites (or PUT /sites/{id}). The response is the same as for POST /sites, with import (the report) and data (the collections).

post/sites/import-wordpress

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/sites/import-wordpress
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: sites:write)

Request body

urlstring required

The https address of the WordPress site, on a domain this project has proven it owns (like https://www.example.com).

site_idstring uuid

Optional. An existing site of this project to put the import in. Without it, a new site is created.

keep_existingboolean

Only with site_id. true: a partial update. The imported files are added or replaced and every other file of the site stays; images already on the site are not fetched again. Needs if_match_version.

if_match_versionstring

With keep_existing: the version of the site from get_site or list_sites. If the site changed since, nothing changes (409).

namestring

Optional. A name for the new site; default the site's own name.

slugstring

Optional. The address of a new site, like deploy_site's slug.

max_postsinteger

Optional. Read at most this many posts, newest first (default all, at most 500).

Response

The updated site, with import and data.

Changes

No recorded changes to this operation across all 1 revision of this API.