Aptoma Articles API

Read-only REST API for Sjællandske Medier articles from the Aptoma DrPublish CMS.

Articles

GET /articles 30s cache

List articles with filtering and cursor-based pagination.

Query parameters
ParamTypeDescription
limitintPage size, 1–100. Default 20.
cursorstringOpaque cursor from next_cursor in a previous response.
categorystringFilter by category name (case-insensitive).
authorstringFilter by author name (partial match).
tagstringFilter by tag name (case-insensitive).
publicationstringFilter by publication name.
typestringFilter by article type (e.g. A-Artikel).
statusstringArticle status. Default published.
searchstringSearch headline and description (ILIKE).
fieldsstringComma-separated list of fields to return.
Available fields
idheadlinedescriptionstatus published_ataccess_levelword_count publicationarticle_typelead_asset authorcategory
Example
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 /articles/:id long cache + explicit purge

Get a single article with full content, authors, tags, categories, and assets.

ParamTypeDescription
fieldsqueryComma-separated fields. Omit for everything.
Available fields
idguidnameheadline descriptiondescription_altstatus sub_statusaccess_levelsource published_atcreated_atmodified_at word_countchar_countproperties publicationarticle_type contentauthorstags categoriesassets
Example
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.

Cache Invalidation

POST /purge

Purge the in-memory cache by article, tag, or entirely.

Request body (JSON)
FieldTypeDescription
articlenumberPurge all cached variants of a specific article.
tagstringPurge all entries tagged with this value.
tagsstring[]Purge multiple tags at once.
alltruePurge the entire cache.
Cache tags

Tags are assigned automatically when responses are cached:

TagApplied to
listsAll 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
Examples
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

System

GET /health

Health check. Pings the database and returns {"status": "ok"} or 503 if unreachable.