REST API endpoints
The WordPress REST API (wp-json) endpoints Whalesync calls to list post types, read and write records, and upload media, for network-level debugging.
Overview
Section titled “Overview”Whalesync talks to your site through the standard WordPress REST API (the wp-json endpoints). This page lists the specific endpoints we call and what each one is for. It's mostly here for the curious and for anyone debugging a connection at the network level — you don't need to know any of this to set up a sync.
Throughout, {type} is a post type slug (for example posts, pages, or a custom post type) and {id} is a record's ID.
Endpoints by function
Section titled “Endpoints by function”| Function | Method | Path | Key query params |
|---|---|---|---|
| Auth / connection probe | GET | wp/v2/posts | per_page=5&context=edit |
| Discover REST root | HEAD / GET | site root (reads Link header) → wp-json/ | — |
| List available post types (tables) | GET | wp/v2/types | — |
| Fetch a table's field schema | OPTIONS | wp/v2/{type} | — |
| Poll / list records | GET | wp/v2/{type} | per_page=100 + page=n&orderby=id&order=asc (or offset=n); status=any |
| Get one record | GET | wp/v2/{type}/{id} | status=any |
| Create record (new row) | POST | wp/v2/{type} | — |
| Update record | PATCH | wp/v2/{type}/{id} | — |
| Delete record | DELETE | wp/v2/{type}/{id} | force=true |
| Upload media | POST | wp/v2/media | raw file body + Content-Disposition |
| Get media | GET | wp/v2/media/{id} | — |