Read-only REST API for Sjællandske Medier articles from the Aptoma DrPublish CMS.
List articles with filtering and cursor-based pagination.
| Param | Type | Description |
|---|---|---|
| limit | int | Page size, 1–100. Default 20. |
| cursor | string | Opaque cursor from next_cursor in a previous response. |
| category | string | Filter by category name (case-insensitive). |
| author | string | Filter by author name (partial match). |
| tag | string | Filter by tag name (case-insensitive). |
| publication | string | Filter by publication name. |
| type | string | Filter by article type (e.g. A-Artikel). |
| status | string | Article status. Default published. |
| search | string | Search headline and description (ILIKE). |
| fields | string | Comma-separated list of fields to return. |
GET /articles?category=Erhverv&limit=3&fields=id,headline,author
{
"articles": [
{ "id": 6509682, "headline": "...", "author": "Joe Kniesek" },
{ "id": 6448501, "headline": "...", "author": null }
],
"next_cursor": "WyIyMDI2LTAyLT...",
"has_more": true
}
Get a single article with full content, authors, tags, categories, and assets.
| Param | Type | Description |
|---|---|---|
| fields | query | Comma-separated fields. Omit for everything. |
GET /articles/6509682?fields=id,headline,content,authors
{
"article": {
"id": 6509682,
"headline": "...",
"content": {
"headline": "...",
"lead": "<p>...</p>",
"body": "<p>...</p>",
"lead_asset": "...",
...
},
"authors": [
{ "id": 1, "fullname": "Joe Kniesek", "role": "author" }
]
}
}
Relations (content, authors, tags, categories, assets) are only fetched from the database when included in fields.
Purge the in-memory cache by article, tag, or entirely.
| Field | Type | Description |
|---|---|---|
| article | number | Purge all cached variants of a specific article. |
| tag | string | Purge all entries tagged with this value. |
| tags | string[] | Purge multiple tags at once. |
| all | true | Purge the entire cache. |
Tags are assigned automatically when responses are cached:
| Tag | Applied to |
|---|---|
| lists | All list responses |
| article-{id} | Detail responses for a specific article |
| category-{name} | Lists filtered by that category + details of articles in it |
| publication-{name} | Lists filtered by that publication |
| author-{name} | Lists filtered by that author + details of articles by them |
| tag-{name} | Lists filtered by that tag |
POST /purge {"article": 6509682} → purge one article (all field variants)
POST /purge {"tag": "lists"} → purge all list caches
POST /purge {"tags": ["lists","category-erhverv"]} → purge multiple
POST /purge {"all": true} → purge everything
Health check. Pings the database and returns {"status": "ok"} or 503 if unreachable.