Skip to main content

Get content resource snapshot

Use this endpoint to fetch a full copy of one public content resource. The API calls this full copy a snapshot.

A snapshot returns all current rows for one resource in records. For example, a translation snapshot returns all current translation rows for that translation resource. A recitation snapshot returns ayah audio file rows and chapter audio file rows.

Typical client flow:

  1. Call GET /resources/sync.
  2. If a change has a non-null snapshot_url, call this endpoint using that change's resource_group and resource_id.
  3. Delete existing local rows for that one resource.
  4. Insert the returned records as the new local copy.
  5. Continue applying later sync changes normally.

Example:

curl "https://apis.quran.foundation/content/api/v4/resources/snapshots/translations/19" \
-H "x-auth-token: $ACCESS_TOKEN" \
-H "x-client-id: $CLIENT_ID"

Snapshots are current at fetch time and are not tied to a specific sync sequence. Snapshot responses are not cacheable and return Cache-Control: no-store.

Path Parameters
    resource_group ContentSyncResourceGroup required

    Possible values: [articles, recitations, tafsirs, translations]

    Public content group. Supported values are articles, recitations, tafsirs, and translations.

    id int64 required

    Possible values: >= 1

    Resource ID within the selected group, such as translation resource 19 or tafsir resource 151.

Responses

Successful snapshot response

Response Headers
  • Cache-Control string

    Always no-store for snapshot responses.


Schema
    resource_group ContentSyncResourceGroup required

    Possible values: [articles, recitations, tafsirs, translations]

    Public content group supported by Content Sync.

    resource_id int64 required

    Resource ID within the selected group.

    resource_content_id int64 nullable required

    Underlying resource content ID when available. It is null for article resources.

    schema_version integer required

    Version of the snapshot payload shape.

    sync_sequence int64 required

    Current sync sequence when the snapshot was fetched. Snapshots are current-at-fetch, not pinned to the sequence of the change that requested them.

    records object[] required

    Full current row list for this resource. Replace the client's existing local rows for this resource with this array. Shape depends on resource_group.

Loading...