System

Site key for a verified WordPress site

Issues a key to a site that proves it controls its domain: we fetch the proof from the site's REST route (/wp-json/astroway/v1/verify?nonce=<proof_id>, or verify_url for plain permalinks) and compare it with the one sent. The key is bound to the host, covers a free set of readings and shares 300 calls an hour with the other installs on the host (at most 5). One key per install (host + home path): a new key for the same install revokes the previous one. Server-side only. No API key needed.

post/site-keys

Query parameters

fieldsstring

Comma-separated dotted paths, relative to data, to keep in the response. A path is applied to every element of an array, so planets.name means the name of each planet. Paths that match nothing come back in _fields_unmatched; a list where nothing matches at all is a 400, because an empty object would be a confident wrong answer.

precisioninteger

Round every non-integer number in the response to this many decimal places. Integers are left alone, because an id is not a measurement. Ecliptic longitudes ship with fourteen decimals by default; 2 is about a tenth of an arcminute.

Request body

site_urlstring uri required

The site home URL, https only. A subdirectory multisite uses the network home.

proof_idstring uuid required

UUID v4 the plugin generated for this attempt.

proofstring required

32 random bytes, base64url. The site must serve the same value at its verify route.

verify_urlstring uri

The verify REST route when /wp-json/ is not available, e.g. https://example.com/?rest_route=/astroway/v1/verify. Same host as site_url.

plugin_versionstring

Response

Successful calculation

okboolean

Example response

{
  "ok": true
}

Changes

Changed in 1 of the 29 revisions of this API.1