Skip to content

REST API

Brent Cordis edited this page Apr 5, 2026 · 10 revisions

REST API

Proclaim includes a read-only REST API built on Joomla's Web Services framework. It serves content in JSON:API format at /api/index.php/v1/proclaim/.

Access Control

The API has three modes, configured in Proclaim > Administration > REST API Settings:

Mode Description
Disabled No routes registered. API returns 404.
Public Read-only, no authentication required.
API Key Required (default) Requires a Joomla API token via Authorization: Bearer {token} header.

Generating an API Token

  1. Go to Users > Manage > [your user] > API Token tab
  2. Click Generate to create a token
  3. Copy the token and use it in the Authorization header
curl -H "Authorization: Bearer YOUR_TOKEN" \
     https://example.com/api/index.php/v1/proclaim/sermons

Endpoints

All endpoints are read-only (GET). Only published and archived items are returned; unpublished and trashed items are excluded.

Sermons (Messages)

Method URL Description
GET /api/index.php/v1/proclaim/sermons List all sermons
GET /api/index.php/v1/proclaim/sermons/{id} Get a single sermon

List fields: id, studytitle, alias, studydate, studyintro, series_id, access, published, hits

Detail fields: adds studytext, params

Teachers

Method URL Description
GET /api/index.php/v1/proclaim/teachers List all teachers
GET /api/index.php/v1/proclaim/teachers/{id} Get a single teacher

List fields: id, teachername, alias, title, image, short, access, published

Detail fields: adds description, website, email, phone, params

Series

Method URL Description
GET /api/index.php/v1/proclaim/series List all series
GET /api/index.php/v1/proclaim/series/{id} Get a single series

List fields: id, series_text, alias, description, series_thumbnail, teacher_id, access, published

Detail fields: adds params

Podcasts

Method URL Description
GET /api/index.php/v1/proclaim/podcasts List all podcasts
GET /api/index.php/v1/proclaim/podcasts/{id} Get a single podcast

List fields: id, title, alias, description, podcast_image, language, access, published

Detail fields: adds params

Media Files

Method URL Description
GET /api/index.php/v1/proclaim/media List all media files
GET /api/index.php/v1/proclaim/media/{id} Get a single media file

List fields: id, study_id, server_id, server_name, studytitle, createdate, plays, downloads, access, published

Detail fields: adds params, language

Pagination

List endpoints support JSON:API offset-based pagination:

?page[limit]=20&page[offset]=0
Parameter Default Description
page[limit] 20 Items per page
page[offset] 0 Starting offset

The response includes pagination metadata and navigation links:

{
  "links": {
    "self": "...?page[offset]=20&page[limit]=20",
    "next": "...?page[offset]=40&page[limit]=20",
    "prev": "...?page[offset]=0&page[limit]=20",
    "last": "...?page[offset]=80&page[limit]=20"
  },
  "meta": {
    "total-pages": 5
  }
}

Response Format

All responses follow the JSON:API 1.0 specification with content type application/vnd.api+json.

List Response

{
  "links": {
    "self": "https://example.com/api/index.php/v1/proclaim/sermons"
  },
  "data": [
    {
      "type": "sermons",
      "id": "42",
      "attributes": {
        "studytitle": "The Sermon on the Mount",
        "alias": "the-sermon-on-the-mount",
        "studydate": "2026-03-15",
        "studyintro": "An introduction to...",
        "series_id": 5,
        "access": 1,
        "published": 1,
        "hits": 128
      }
    }
  ],
  "meta": {
    "total-pages": 3
  }
}

Item Response

{
  "links": {
    "self": "https://example.com/api/index.php/v1/proclaim/sermons/42"
  },
  "data": {
    "type": "sermons",
    "id": "42",
    "attributes": {
      "studytitle": "The Sermon on the Mount",
      "alias": "the-sermon-on-the-mount",
      "studydate": "2026-03-15",
      "studyintro": "An introduction to...",
      "studytext": "<p>Full sermon content...</p>",
      "series_id": 5,
      "access": 1,
      "published": 1,
      "hits": 128,
      "params": {}
    }
  }
}

Error Responses

Status Meaning
401 Missing or invalid API token (when API Key mode is enabled)
403 Authenticated but not authorized
404 Resource not found, or API is disabled

Foreign Keys

Use these fields to link related resources:

Field On References
series_id Sermons /proclaim/series/{id}
teacher_id Series /proclaim/teachers/{id}
study_id Media /proclaim/sermons/{id}
server_id Media Server type (internal)

Examples

Fetch recent sermons (newest first, page 1)

curl -H "Authorization: Bearer TOKEN" \
     "https://example.com/api/index.php/v1/proclaim/sermons?page[limit]=10"

Fetch a specific teacher

curl -H "Authorization: Bearer TOKEN" \
     "https://example.com/api/index.php/v1/proclaim/teachers/3"

Fetch media files for a specific sermon

# First get the sermon, note the ID
curl -H "Authorization: Bearer TOKEN" \
     "https://example.com/api/index.php/v1/proclaim/sermons/42"

# Then fetch media files (filter by study_id in your application)
curl -H "Authorization: Bearer TOKEN" \
     "https://example.com/api/index.php/v1/proclaim/media"

Clone this wiki locally