Explorar a documentação

Open Ecosystem Toolkits & Public HTTP API Reference

Developer reference for Origo X open toolkits, theme protocol schemas, SIL OFL 1.1 static font mirrors, and unauthenticated read-only public HTTP APIs for releases, changelogs, docs, themes, and compliance feeds.

Nesta página

Origo X publishes open developer toolkits, machine-readable JSON schemas, redistributable SIL OFL 1.1 static font mirrors, and unauthenticated read-only public HTTP APIs for build automation, theme tooling, and compliance verification. This guide covers public unauthenticated resources only; for OAuth 2.0 / OIDC sign-in and portable data schemas, see Origo OAuth 2.0 & Portable Data Formats.

Part 1: Open Toolkits, Machine-Readable Schemas & Static Mirrors

1. Source & Theme Developer Toolkits

The following packages and schemas are hosted directly at the site root (https://origox.site) for direct download by developers, AI coding agents, and CI pipelines:

2. Static SIL OFL 1.1 Font Mirror

Origo X hosts five unmodified open-source fonts licensed under SIL OFL 1.1 under /fonts/ with immutable edge caching (Cache-Control: public, max-age=31536000, immutable and X-Content-Type-Options: nosniff). Native clients download and verify these files by SHA-256 checksum:

Font ID Static Mirror URL
Source Han Serif (source_han_serif) https://origox.site/fonts/source_han_serif.ttf
Source Han Sans (source_han_sans) https://origox.site/fonts/source_han_sans.ttf
Instrument Sans (instrument_sans) https://origox.site/fonts/instrument_sans.ttf
Newsreader (newsreader) https://origox.site/fonts/newsreader.ttf
JetBrains Mono (jetbrains_mono) https://origox.site/fonts/jetbrains_mono.ttf

3. Historical Open-Source Repository

The historical open-source codebase of Origo X is preserved on GitHub at origo-x, where versions <= v2.4.5 remain licensed under AGPL-3.0. Starting with v2.4.6, official builds transitioned to closed-source development while continuing to distribute signed multi-platform installers via the Download and Releases pages.

Part 2: Public Read-Only HTTP API Reference

All public read-only endpoints are served on both https://origox.site and https://api.origox.site using UTF-8 JSON payloads.

Error Envelope & Rate Limiting

  • Standard Error Envelope: Client (4xx) and server (5xx) errors return a language-neutral JSON envelope:
{
  "detail": "Release does not exist or has been removed",
  "code": "releaseUnavailable",
  "params": {}
}

detail is a human-readable message, code is a stable programmatic identifier, and params carries optional structured context.

  • Rate Limits (429 Too Many Requests): Public routes apply per-IP sliding-window limits. For example, release metadata checks (GET /api/v1/releases/latest, GET /api/release-groups) allow up to 120 requests per 60 seconds per IP, while download shortlinks allow up to 30 requests per hour per IP. Exceeded requests receive 429 with a Retry-After header in seconds.

1. Health & Platform Catalog

  • GET /api/health: Lightweight liveness probe performing no storage or database I/O; returns 200 OK with {"status": "ok"}.
  • GET /api/platforms: Returns supported platforms, architectures, and package-type presets ({"items": [...]}).

2. Releases & Update Checks

Latest Release Check: GET /api/v1/releases/latest

Parameter Location Required Description
platform Query Yes Target platform (android, ios, macos, windows, linux, harmony)
architecture / abi Query Conditional Required for platform=android (if both are supplied, they must match); e.g. arm64-v8a, x86_64, universal
channel Query No Release channel; defaults to stable
package_type Query No Specific installer format (e.g. exe vs zip on Windows; omits prefers installer)

Responses emit Cache-Control: no-store and include schema_version (1), version, build_number, platform, architecture, package_type, channel, release_notes, download_url, github_release_url, website_url, sha256, file_size, published_at, and mandatory.

Release Directory Endpoints

  • GET /api/releases: Paginated release listing with optional platform, channel, and architecture filters, plus page (default 1) and page_size (1–100, default 20). Returns items, page, page_size, and total.
  • GET /api/release-groups: Groups published artifacts by version with platform, channel, page, and page_size (1–100).
  • GET /api/releases/{release_id}: Returns a single release record along with pre-rendered release_notes_html.

3. Changelog & Activities

  • GET /api/v1/changelog: Cursor-paginated published changelog entries.
    • Query parameters: locale (default zh-CN), platform, track, limit (1–20, default 20), and cursor (unpadded Base64URL-encoded decimal offset).
    • Returns {"schema_version": ..., "entries": [...], "next_cursor": "..."} with ETag conditional caching.
  • GET /api/v1/changelog/by-build/{version}/{release_build_number}: Looks up the changelog entry matching an exact version and positive integer build number (supports ?locale=en). Returns 410 (changelogWithdrawn) if withdrawn or 404 (changelogNotFound) if absent.
  • GET /api/v1/changelog/{entry_id}: Fetches a single changelog entry with optional ?locale=en&render_html=false.
  • GET /api/v1/activities: Lists active public activities (?channel=store or ?channel=official, default store; Cache-Control: no-store), returning {"activities": [...]}. Individual activity details are served at GET /api/v1/activities/{activity_id}?channel=store.

4. Documentation Feed

  • GET /api/docs?locale=en: Returns the published snapshot of all documentation pages ({"items": [...], "locale": "..."}). Content locales are zh-CN, zh-TW, and en; other supported UI locales automatically resolve to en content. Drafts and edit histories are never exposed, and responses set Cache-Control: no-store.

5. Theme Market Public API

  • GET /api/v1/themes: Lists approved public theme suites.
    • Parameters: maxSchemaVersion (1–7, default 1) and projection (full or web, default full).
    • Returns {"themes": [...]} with Cache-Control: public, max-age=60.
  • GET /api/v1/themes/protocol/current: Returns the active theme protocol version metadata (latestSchemaVersion, supportedSchemaVersions, and referenceUrl).
  • GET /api/v1/themes/submissions/policy: Returns the schema versions currently accepted for creator submissions ({"schemaVersions": [...]}).
  • GET /api/v1/themes/{theme_id}: Returns details for one theme (maxSchemaVersion and projection supported).
  • Exact Suite Version & Component Endpoints: All immutable versioned routes require integer version and lowercase 64-hex suiteRevision:
    • GET /api/v1/themes/{theme_id}/versions/{version}?suiteRevision={sha256}: Exact suite revision metadata.
    • GET /api/v1/themes/{theme_id}/versions/{version}/download?suiteRevision={sha256}: Full suite ZIP download.
    • GET /api/v1/themes/{theme_id}/versions/{version}/selection/download?suiteRevision={sha256}&components={kind}: On-demand partial ZIP containing selected modules (repeatable components query param).
    • GET /api/v1/themes/{theme_id}/versions/{version}/components/{kind}/download?suiteRevision={sha256}: Single component ZIP download.
    • GET /api/v1/themes/{theme_id}/versions/{version}/preview?suiteRevision={sha256} and /media/{media_id}?suiteRevision={sha256}: Suite previews and media assets (optional size, ETag, and 304 Not Modified).

6. Channel Compliance Feeds (Source Restrictions & Rights Notices)

Origo X clients synchronize read-only compliance policy snapshots per distribution channel. Both feeds are publicly inspectable and cacheable:

  • GET /api/v1/support/source-restrictions?channel={channel}: Returns active domain restriction rules for the requested channel.
    • Payload: {"schema_version": 1, "revision": 12, "rules": [{"id": "...", "host": "...", "include_subdomains": true, "reason": "..."}]}.
  • GET /api/v1/support/rights-notices?channel={channel}: Returns reviewed rights-holder notices, restricted hosts, and restricted works.
    • Payload: {"schema_version": 1, "revision": 8, "holders": [{"id": "...", "name": "...", "message": "...", "link": "https://..."}], "hosts": [{"host": "...", "include_subdomains": true, "holder": "..."}], "works": [{"title": "...", "author": "...", "holder": "..."}]}.
  • All 9 Distribution channel Identifiers:
    • ios_store (iOS App Store)
    • macos_store (macOS App Store)
    • google_play (Google Play)
    • android_direct (Android Direct)
    • ios_direct (iOS Direct)
    • macos_direct (macOS Direct)
    • windows (Windows)
    • linux (Linux)
    • harmony (HarmonyOS)
    • (Omitting channel returns the union snapshot; policy evaluation also supports the ios_testflight channel identifier.)
  • Conditional Caching: Both endpoints emit Cache-Control: public, max-age=60 and a strong ETag computed as the SHA-256 of the channel key and serialized payload. Sending If-None-Match returns an empty 304 Not Modified when unchanged.

Practical curl Examples

# 1. Check the latest stable Android arm64-v8a release
curl -s "https://api.origox.site/api/v1/releases/latest?platform=android&architecture=arm64-v8a&channel=stable" | jq .

# 2. Fetch the 5 most recent English changelog entries
curl -s "https://api.origox.site/api/v1/changelog?locale=en&limit=5" | jq .

# 3. Inspect current theme market protocol versions
curl -s "https://api.origox.site/api/v1/themes/protocol/current" | jq .

# 4. Poll channel source restrictions with ETag validation
curl -i -H 'If-None-Match: "<previous-etag>"' \
  "https://api.origox.site/api/v1/support/source-restrictions?channel=ios_store"

See also: Origo OAuth 2.0 & Portable Data Formats, ORSP 1.6 Protocol & API Reference, Publishing Themes, and Support.

Encontrou um problema neste guia? Sugerir uma correção