API reference

Sirwan Afifi public content API_

A small, read-only HTTP API for site discovery and published-post metadata. The base URL is https://sirwan.info and all endpoints use GET.

Request conventions

Endpoints

GET

/api/v1/site.json

Returns the site's identity, author, languages, authentication policy, and canonical discovery-resource URLs.

curl --fail --silent \
  https://sirwan.info/api/v1/site.json

GET

/api/v1/posts.json

Returns all non-draft posts, newest first. Each item includes title, language, dates, tags, canonical URL, and its explicit Markdown URL.

curl --fail --silent \
  https://sirwan.info/api/v1/posts.json

Versioning and deprecation

Stable REST endpoints use a major version in the URL. Version 1 lives under /api/v1. The unversioned/api/site.json and /api/posts.json paths are deprecated compatibility aliases. They advertise their successor-version through a Link response header. A breaking schema change requires a new major path. Before a stable version is removed, this page will publish migration guidance and the responses will carry standards-based Deprecation and dated Sunset headers.

Errors and formats

API errors use application/problem+json with a stable machine-readable code, human-readable detail, and a suggested resolution. A quota response is 429 and includes Retry-After. Unknown API paths return a typed404; unavailable origins return 502. Content pages support HTML and Markdown through HTTP Acceptnegotiation at the edge, while machine-readable files and static assets keep their native media types.

Machine-readable contract

The canonical OpenAPI 3.1 entry document is available at/openapi.json. Return to thedeveloper portal for the quickstart and live sandbox.