Sites

Import an existing site

Fetches an existing static site from a domain this project has proven it owns (active here, or proven with the TXT record) and publishes it as a site, through the same checks as POST /sites. Only the same host, respecting robots.txt, within the site limits; links become relative, and forms that need a server lose their action. The response is the same as for POST /sites (or PUT /sites/{id}), with an import report.

post/sites/import

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/sites/import
  • 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 existing site, on a domain this project connected (like https://www.example.com).

site_idstring uuid

Optional. An existing site of this project to replace with the imported files. Without it, a new site is created.

namestring

Optional. A name for the new site; default the host name.

slugstring

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

max_pagesinteger

Optional. At most this many pages (default 25, at most 50).

Response

The replaced site, with import.

Changes

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