Domov/API Docs

API Documentation

WordPress-compatible interface for managing blog content, categories and media.

Discovery

The homepage response advertises this document with a Link header using the service-doc relation and exposes a machine-readable catalog at /.well-known/api-catalog. Homepage and this page also support markdown negotiation via Accept: text/markdown.

Base path: /wp-json/wp/v2

Authentication: HTTP Basic auth via Authorization header.

Accepted credentials are configured with WP_AUTH or the WP_USERNAME and WP_PASSWORD environment variables.

Every post carries a language field (sk / en) reflecting the source content language.

Endpoints

GET/wp-json/wp/v2/posts

List blog posts in a WordPress-compatible shape (includes a `language` field).

POST/wp-json/wp/v2/posts

Create a new blog post.

GET/wp-json/wp/v2/posts/{id}

Fetch one post by WordPress post ID.

PUT/wp-json/wp/v2/posts/{id}

Update or recreate a post by WordPress post ID.

DELETE/wp-json/wp/v2/posts/{id}

Delete a post by WordPress post ID.

GET/wp-json/wp/v2/categories

List available blog categories.

POST/wp-json/wp/v2/categories

Create a new blog category (idempotent by slug).

GET/wp-json/wp/v2/media

List uploaded media assets.

POST/wp-json/wp/v2/media

Upload a media asset and receive its stored URL.

GET/wp-json/wp/v2/media/{id}

Fetch a single media item by ID.