Sites

Fetch a page of a site or app, live

Fetches one path of a site or app of this project from the public internet, through Hypamoon's server, and returns the status, the main headers (never set-cookie), the final URL after redirects and the start of the body as text. The way to prove that a deployed site or app endpoint works live, for a client that cannot open the address itself. Only addresses of this project: the site's own address (also the secret link of an unlisted site) and its connected domains; give path (on the site's address) or a full url on one of them. Redirects are followed up to 3 times, and only to addresses of this project; otherwise redirect_blocked says why and the redirect itself is returned. GET or HEAD only, without cookies or keys, a 10 second timeout per hop, the body cut at 20 KB (truncated), private addresses refused. At most 30 requests per minute per project (429 rate_limited). A site that does not answer gives 502 upstream_error.

get/sites/{id}/fetch

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/sites/{id}/fetch
  • 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:read)

Path parameters

idstring uuid required

The id of the site.

Query parameters

pathstring

The path on the site's address, like / or /contact or /api/health, with a query if needed. Give this or url.

urlstring uri

A full https URL on an address of this site, like a connected domain. Give this or path.

method'GET' | 'HEAD'

GET (default) or HEAD.

Response

What the site answered.

urlstring required

The address that was asked for.

final_urlstring required

The address that answered, after the redirects that were followed.

method'GET' | 'HEAD' required
statusinteger required

The HTTP status of the final answer.

okboolean required

true for a 2xx status.

headersobject required

content-type, cache-control, location, etag, x-* and a few more. Never set-cookie.

redirect_blockedstring

Set when a redirect was not followed (another host, not https, or too many); status and headers are then of that redirect.

content_typestring nullable required
bodystring nullable required

The body as text, at most 20 KB; null for HEAD, an empty body or a body that is not text.

body_bytesinteger required

Bytes received (reading stops after 256 KB).

truncatedboolean required

true when the body is longer than what is returned.

body_notestring

Why the body is not shown, when it is not.

elapsed_msinteger required

Changes

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