← Disc archive

API / VERSION 1

The collection, connected.

Read the same structured data used by this archive. Public reads need no API key and support cross-origin requests.

Public read endpoints

releases.ashx
Search published releases. Returns items, total, page, pageSize and serverTimeUtc.
records.ashx
Search records of any type, or fetch one record with ?id=UUID or ?slug=permanent-slug. Detail responses include linked records and approved reviews.
schema.ashx
Entity types and active field definitions, including types, reference targets, choices and cardinality.

Base URL: /discs/api/v1/. Every endpoint is a concrete .ashx file.

Search parameters

type (default release; use * for all), q (name search), page (default 1), pageSize (1–100; default 24), sort (name, updatedUtc, votes, or a single-value field key), direction (asc/desc), references (linked record UUID), and updatedSince (ISO timestamp).

Provide filter as URL-encoded JSON. Nest and/or groups up to four levels, with at most 40 nodes.

{
 "logic": "and",
 "rules": [
  {"field":"speed", "op":"eq", "value":9},
  {"field":"year", "op":"eq", "value":2021},
  {"field":"plastic", "op":"ne", "value":"UUID-OF-Z-PLASTIC"}
 ]
}

Operators: eq, ne, in, notIn, gt, gte, lt, lte, contains, known, unknown. Use arrays for in/notIn. Exclusions require a known value; combine with an unknown rule if you want missing values included.

Edition options and image uploads

GET options.ashx?field=edition returns distinct existing edition names as {items:[...],hasMore:false}, up to 1,000 values. Public reads include published records; editors may use scope=admin to include saved draft editions.

POST uploads.ashx accepts a multipart form with one file entry containing a JPG or PNG of up to 3 MB. It requires the same editor permission, session cookie and X-Disc-CSRF token as editor writes. On success it returns HTTP 201 and {url:"https://..."}. Attach that URL to the record's photos array through the normal versioned record save. Images are uploaded immediately, independently of record saving.

Flight ratings and linked filters

Raw values remain in record.values. The effectiveRatings object includes each effective number, its source (release or mold), the source record ID and any rating source URL. Release ratings take priority over mold ratings in filters and sorting. Discraft stability remains independent of speed, glide, turn and fade.

Traverse references with field paths such as mold.manufacturer or mold.speed. The latter explicitly tests the mold's specification. A path matches when at least one linked record satisfies the condition.

Polling and future storefronts

For this proof of concept, poll the paginated public collection and schema to build your storefront index. updatedSince is a record-change aid, not a complete synchronization feed: inherited mold changes, schema edits, review moderation and removals from public visibility require a full reconciliation. It provides no tombstones or consistent multi-page snapshot. Keep permanent UUIDs as your external keys.

const filter = {logic: 'and', rules: [
 {field: 'speed', op: 'eq', value: 9},
 {field: 'year', op: 'eq', value: 2021}
]};
const query = new URLSearchParams({filter: JSON.stringify(filter)});
const response = await fetch('/discs/api/v1/releases.ashx?' + query);
const collection = await response.json();

Authenticated operations

Writes use same-origin site sessions and CSRF protection. Cross-origin public reads are available; cross-origin writes and API-key authentication are not part of v1. For a Shopify frontend, public reads can call these endpoints directly. Voting and editor writes need a future storefront identity integration or server-side adapter.

Fetch session.ashx for the current user, editor permission and csrfToken. Send JSON POST bodies with Content-Type: application/json and X-Disc-CSRF: token.

POST records.ashx
Editor only. Body: {records:[...]}. Up to 200 complete record snapshots per atomic batch; each includes id, type, name, slug, description, status, version and values. Version 0 creates a record.
POST types.ashx / fields.ashx
Editor only. Add or update schema definitions with expected versions.
GET revisions.ashx?id=UUID
Editor only. Last 200 record revisions with batch IDs, actor IDs and before/after snapshots.
POST revisions.ashx
Editor only. Restore with {revisionId:123,expectedVersion:4}.
GET votes.ashx?id=UUID
Current account's vote state.
POST votes.ashx
Signed-in account. Body: {releaseId:"UUID",liked:true}. Set false to remove a vote.
POST submissions.ashx
Public, same-origin. Body: releaseId, kind (review/correction/comment/rerun), name, email, message. Contributions enter moderation.
GET submissions.ashx
Editor only. Latest 200 contributions, pending first. Includes private contact details.
POST moderation.ashx
Editor only. Body: {id:"UUID",version:1,status:"approved"}. Status may also be pending or rejected. Only approved reviews are public.

Add scope=admin to records/schema GET requests to include drafts, archived records or inactive field definitions. Explicit archive editor access is required.

Errors use {"error":{"message":"..."}} with HTTP 400, 401, 403, 404, 405, 409, 429 or 503 as appropriate. Version conflicts return 409. Read and write responses use no-store caching.