{"components":{"responses":{"BadRequest":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"Invalid download scope"}},"schemas":{"Change":{"properties":{"after":{"description":"Can contain serialized JSON.","type":"string"},"before":{"description":"Can contain serialized JSON.","type":"string"},"detectedAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"previousSnapshotId":{"type":"string"},"snapshotId":{"type":"string"},"sourcePayloadKind":{"type":"string"},"subject":{"type":"string"},"type":{"type":"string"}},"required":["detectedAt","id","type","kind","name","previousSnapshotId","snapshotId"],"type":"object"},"Snapshot":{"properties":{"captureStatus":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"},"manifestHash":{"type":"string"},"reviewStatus":{"type":"string"}},"required":["id","createdAt","manifestHash","captureStatus","reviewStatus"],"type":"object"},"Subject":{"properties":{"kind":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"tokens":{"items":{"$ref":"#/components/schemas/Token"},"type":"array"}},"required":["kind","slug","name","tokens"],"type":"object"},"SubjectSummary":{"properties":{"jsonUrl":{"format":"uri-reference","type":"string"},"kind":{"type":"string"},"lifecycleNoticeCount":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"sourcePageUrls":{"items":{"format":"uri","type":"string"},"type":["array","null"]},"tokenCount":{"type":"integer"},"url":{"format":"uri-reference","type":"string"}},"required":["kind","slug","name","tokenCount","lifecycleNoticeCount","sourcePageUrls","url","jsonUrl"],"type":"object"},"Token":{"properties":{"displayName":{"type":"string"},"lifecycle":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"values":{"items":{"$ref":"#/components/schemas/TokenValue"},"type":"array"}},"required":["name","values"],"type":"object"},"TokenReference":{"properties":{"name":{"type":"string"},"references":{"items":{"$ref":"#/components/schemas/TokenReference"},"type":"array"}},"required":["name"],"type":"object"},"TokenValue":{"properties":{"context":{"items":{"type":"string"},"type":"array"},"default":{"type":"boolean"},"references":{"items":{"$ref":"#/components/schemas/TokenReference"},"type":"array"},"value":{"description":"Source-structured JSON, including references or typed compound values; may be null. Do not assume a hex color or scalar."}},"required":["value"],"type":"object"}}},"info":{"description":"Independent Material Design 3 token captures and observed changes. Public GET endpoints; no authentication. Source references and contexts should be preserved. Observation dates are not upstream release dates.","title":"Token Catalog read-only API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/v1/changes":{"get":{"description":"No pagination or server-side filters. Filter records locally by subject or snapshotId. Counts represent records, not unique tokens.","operationId":"listChanges","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"changes":{"items":{"$ref":"#/components/schemas/Change"},"type":["array","null"]},"publicationId":{"type":"string"},"snapshot":{"$ref":"#/components/schemas/Snapshot"}},"required":["publicationId","snapshot","changes"],"type":"object"}}},"description":"Change history"}},"summary":"Read all retained observed changes"}},"/api/v1/health":{"get":{"operationId":"getHealth","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"publicationId":{"type":"string"},"snapshotId":{"type":"string"},"status":{"type":"string"}},"required":["status","publicationId","snapshotId"],"type":"object"}}},"description":"Server status"}},"summary":"Read the active publication identifiers"}},"/api/v1/releases":{"get":{"operationId":"listSnapshots","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"current":{"$ref":"#/components/schemas/Snapshot"},"publicationId":{"type":"string"},"snapshots":{"items":{"$ref":"#/components/schemas/Snapshot"},"type":["array","null"]}},"required":["publicationId","current","snapshots"],"type":"object"}}},"description":"Snapshot inventory"}},"summary":"Read the current and retained snapshots"}},"/api/v1/subjects":{"get":{"description":"No pagination. Follow jsonUrl to fetch one subject with all contexts; slugs can contain slashes. The legacy /api/v1/components index has the same response.","operationId":"listSubjects","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"publicationId":{"type":"string"},"snapshot":{"$ref":"#/components/schemas/Snapshot"},"subjects":{"items":{"$ref":"#/components/schemas/SubjectSummary"},"type":"array"}},"required":["publicationId","snapshot","subjects"],"type":"object"}}},"description":"Subject index"}},"summary":"List every component and non-component subject"}},"/downloads/tokens.json":{"get":{"operationId":"downloadCollection","parameters":[{"description":"styles includes all non-component subject kinds. Every scope includes all supported contexts.","in":"query","name":"scope","required":true,"schema":{"enum":["components","styles","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"capturedAt":{"type":"string"},"subjects":{"items":{"$ref":"#/components/schemas/Subject"},"type":"array"}},"required":["capturedAt","subjects"],"type":"object"}}},"description":"JSON attachment"},"400":{"$ref":"#/components/responses/BadRequest"}},"summary":"Download components, styles or the whole collection"}},"/downloads/{kind}/{slug}.json":{"get":{"description":"Subject scopes: view selects one table and applies q and context filters to its values; set selects one table with every supported context, ignoring q and context filters; all returns every table and supported context in this subject, ignoring set, q and context filters. Collection scope=all at /downloads/tokens.json instead returns every subject on the site. Obtain exact table keys and supported context settings from the subject HTML Download JSON form; do not invent them. Slugs can span multiple path segments.","operationId":"downloadSubject","parameters":[{"in":"path","name":"kind","required":true,"schema":{"type":"string"}},{"in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"view = filtered table; set = whole table, all contexts; all = whole subject, all tables and contexts.","in":"query","name":"scope","required":true,"schema":{"enum":["view","set","all"],"type":"string"}},{"description":"Exact table key from the HTML form. Used by view and set; ignored by all. Omission selects the default table.","in":"query","name":"set","schema":{"type":"string"}},{"description":"Token search, applied only for scope=view.","in":"query","name":"q","schema":{"type":"string"}},{"description":"Only applies to scope=view when this table supports Theme. Copy an available value from the HTML form. Omission uses the table default. Other context names may be supported.","in":"query","name":"context.Theme","schema":{"type":"string"}},{"description":"Only applies to scope=view when this table supports Platform. Copy an available value from the HTML form. Omission uses the table default. Other context names may be supported.","in":"query","name":"context.Platform","schema":{"type":"string"}},{"description":"Only applies to scope=view when this table supports Contrast. Copy an available value from the HTML form. Omission uses the table default. Other context names may be supported.","in":"query","name":"context.Contrast","schema":{"type":"string"}},{"description":"Only applies to scope=view when this table supports Audience. Copy an available value from the HTML form. Omission uses the table default. Other context names may be supported.","in":"query","name":"context.Audience","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Subject"},{"properties":{"capturedAt":{"type":"string"}},"required":["capturedAt"],"type":"object"}]}}},"description":"JSON attachment"},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"Subject not found"}},"summary":"Download a filtered table, a whole table or an entire subject"}}},"security":[],"servers":[{"url":"https://tokencatalog.dev/md3"}]}
