/api/wiki
Read the SynC standards library: standards, their revisions and comparisons, citations and errata. Most reads need no sign-in or API key.
GET /api/wiki/librariesList wiki standard libraries with standard count.
No sign-in needed
GET /api/wiki/libraries/:slugGet a wiki library by slug with its category tree and standards list. Supports search. A search answers the best 20 standards (per_page for more), with total, page and per_page, descriptions cut to about 150 characters, and no category tree. Without a search, an API key or connected app gets pages of 50 with the same short descriptions (the whole library is over 1 MB); a signed-in browser gets every standard whole.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| slug | path | string | Library URL slug |
| search | query | string | Filter standards by title or description, best match first. A title also matches with punctuation ignored, its words in any order, and common abbreviations expanded (xfmr, swgr). "%" and "_" are literal characters. |
| mode | query | string | Optional, with search: "name" matches titles and slugs only, never descriptions (exact, prefix, every word, a misspelling, then a close trigram match for part of the title). Use it when you know what the standard is called. The response carries mode. From an API key or connected app, a title where the search begins a word ranks above one holding it inside a word, and each row carries `url`, its public page. "name" is the only mode here; to search clause text use GET /api/wiki/search-content with mode=keyword or mode=hybrid. Any other value is a 400. |
| page | query | integer | Page number, from 1 (default 1). Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
| per_page | query | integer | Standards per page (1-100). Default 20 on a search, 50 for an API key without one. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
| include | query | string | Comma-separated: "description" keeps each description whole; "categories" adds the category tree to a search. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
GET /api/wiki/standards/:librarySlug/:standardSlugGet a wiki standard by library and standard slug, including current revision content (markdown). The response carries `license` ({ label, url }): the license the library is published under. From an API key or connected app, standard.url is the standard's public page, the address to cite.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| librarySlug | path | string | Library URL slug |
| standardSlug | path | string | Standard URL slug |
GET /api/wiki/standards/:id/revisionsList revision history for a wiki standard. Paginated. Each row carries `license` ({ label, url }): the license the library is published under.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| id | path | string | Standard UUID |
| limit | query | integer | Results per page (default 50) |
| offset | query | integer | Offset for pagination (default 0) |
GET /api/wiki/standards/:id/revisions/:revIdGet a specific wiki standard revision with full markdown content. The response carries `license` ({ label, url }): the license the library is published under.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| id | path | string | Standard UUID |
| revId | path | string | Revision UUID |
GET /api/wiki/standards/:id/diff/:fromRev/:toRevCompare two revisions with computed diff. Returns both full documents, a structured hunks array (added/removed/unchanged lines), stats (added/removed counts), and a unified diff patch string.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| id | path | string | Standard UUID |
| fromRev | path | string | Source revision UUID |
| toRev | path | string | Target revision UUID |
GET /api/wiki/standards/:id/citationsList the documents that cite this standard ("what cites this?"), from the compiled citation index. Rows carry citingEntityType: "wiki_standard" (a wiki document, addressed by librarySlug/slug) or "standard" (a main-site standard, whose citingEntityId is an INTEGER for /standard/:id). Paginated over DOCUMENTS. Returns two distinct counts: citingDocumentCount (distinct citing documents) and citationOccurrenceCount (individual references — one document may cite the standard many times). Both counts and the rows are viewer-scoped, so a caller who cannot read a citing document neither sees it nor sees it counted; the counts may therefore be lower than the unfiltered totals. A third count, privateCitationOccurrenceCount, aggregates the references made by main-site standards the caller may not read: it says such citers exist and never identifies them. A standard the caller cannot read returns 404, identically to one that does not exist.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| id | path | string | Standard UUID (the CITED standard) |
| limit | query | integer | Citing documents per page, 1-100 (default 25) |
| offset | query | integer | Offset for pagination (default 0) |
GET /api/wiki/standards/:id/adoptedList adopted (stable) revisions for a wiki standard. Revoked editions are omitted for everyone but a wiki moderator, who also sees revoked_at and revoked_reason_code on the row, plus an `effect` object on any row under an open revocation window (level, reason_code, revoked_at, replacement_available_at, replacement_adopted_revision_id, level2_at and the derived deadlines). `effect` is absent for every non-moderator caller.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| id | path | string | Standard UUID |
GET /api/wiki/standards/:id/adopted/:revNumGet a specific adopted revision by revision number. A revoked edition 404s for everyone but a wiki moderator. The response carries `license` ({ label, url }): the license the library is published under.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| id | path | string | Standard UUID |
| revNum | path | integer | Adopted revision number |
GET /api/wiki/search-contentSearch the public wiki corpus and return matching clauses with their standard, address, and snippet. No auth, no project scope — the open-corpus twin of GET /api/standards/search-content. The response carries a search_event_id (uuid, or null when logging failed) purely so the browser can report a click back; API callers can ignore it. An API key or connected app waits at most ~1.5 s for the query embedding; past that it gets the keyword hits with degraded: true, and the same query repeated shortly after gets the full semantic answer.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| query | query | string | Search text (required) |
| limit | query | integer | Max hits, 1-100 (default 20) |
| mode | query | string | Optional, as on GET /api/standards/search-content: "name" (wiki standards whose name matches, as `standards`, hits empty, no embedding) when you know what the standard is called; "keyword" (full-text, no embedding, never degraded; a hit whose own clause text says the query, or every query word, or one of them with the standard's name and headings giving the rest, is "strong", and a list of what a standard does not cover never is) for exact terms; "hybrid" (the default) for questions. The response carries mode when you send one; any other value is a 400 naming the valid modes. From an API key or connected app, each hit's `wiki` also carries `url`, the standard's public page, and mode=name rows carry `wiki`. |
| standard_slug | query | string | Optional: search this one wiki standard only (its current revision), by the standard_slug a hit's `wiki` carries. A slug no public wiki page has is a 404 "Wiki standard not found". |
| library_slug | query | string | Optional, with standard_slug: the wiki library it is in. Needed only when two libraries have a standard with that slug (a 400 says so). |
GET /api/wiki/standards/:librarySlug/:standardSlug/elementsGet the standard's current revision as STRUCTURED elements (address / content / toc_content / depth / attributes) rather than raw markdown, by running the shared adoption parser over the stored content. Same content the markdown read and the public wiki page already expose — this is the parsed form, so a client does not have to reimplement the parser to address individual clauses. An API key or connected app gets each element as {address, depth, text}: a clause's text (and any body lines) in `text`, a section ({toc}) as `heading`, `note: true` on a rationale note, and the datasheet fields without their raw source block; and the standard leads with revision_code, the SynC Standards library revision a person quotes and a project imports (null, with revision_note, when this wiki revision is not that one), with the wiki's own count as wiki_revision_number. On its section reads, `url` is the public page, `clause_url` the link to one clause on it (#element- and the address with - for each ., 13.4 -> #element-13-4), and each element the read named, and each of its children (13 and 13.1-13.5 of address=13), carries its own `url`, a link to give a person. After your first section read of a standard, description=none leaves its description out. READ BY SECTION: first outline=true (address and a short heading per element, to depth 2: about 10 KB where the whole standard is 100-270 KB), then address=<address> for the part you need (that element and everything under it). The answer carries `section_read` {addresses, depth, outline, elements_total, elements_returned}. An address the standard does not have is 404 ADDRESS_NOT_FOUND, naming it, with the nearest addresses in metadata.suggestions; a malformed one is 400.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| librarySlug | path | string | Library URL slug |
| standardSlug | path | string | Standard URL slug |
| address | query | string | Read one element and its subtree, e.g. 3 (section 3 and all of 3.x) or 3.1. Optional. |
| addresses | query | string | Several subtrees, comma-separated (3.1,4.2), at most 50, answered in document order. Optional. |
| depth | query | integer | Only elements whose address has at most this many parts, 1-20, counted from the top of the standard: depth=1 is the top sections, depth=2 adds 3.1 but not 3.1.1. Optional. |
| outline | query | boolean | true: per element only {address, heading} (heading = the first ~80 characters of its text), no datasheet field list, depth 2 unless depth is sent. The cheapest first read; pick an address from it. |
| outline_full | query | boolean | true: answer an outline deeper than 2 whole. Without it, an API key or connected app asking for an outline deeper than 2 whose rows would pass 30 KB gets the depth=2 outline instead, with section_read.depth_asked, depth_capped {rows_asked, bytes_asked, cap_bytes, note} and section_counts (clauses under each clause listed), so it can read one section by address. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
| description | query | string | "none": leave standard.description out of a section read (an API key or connected app). It is the same on every read of a standard, about 1.5-2 KB: send description=none on the reads after your first. Any other value: 400. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
| include | query | string | description: keep the whole description on a section read. Without it, an API key or connected app reading an outline or an address gets standard.description cut to its scope lines: the first sentence of "When to use" and the whole "Not intended for" (what the standard does not cover and which standard does), without the "Covers" list (a description without those labels: about 150 characters); the whole description is 2-3.5 KB and is the same on every read. A read with no section option keeps it whole. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
GET /api/wiki/standards/:librarySlug/:standardSlug/titleGet just { title } for a wiki standard. A deliberately tiny, cacheable read for callers that need the display name without pulling the whole document.
No sign-in needed
GET /api/wiki/standards/:id/errataFull errata audit trail for a wiki standard — active AND withdrawn, with their affected adopted revisions. Public.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| id | path | string | Wiki standard UUID |
GET /api/wiki/errata/:errataIdGet one erratum in full, including every adopted revision and element address it affects. Public.
No sign-in needed
GET /api/wiki/adopted-revisions/:adoptedRevisionId/errataACTIVE errata for a single adopted revision — the banner hot path. Ask this before treating an adopted revision as correct: an empty array is the only evidence that no defect has been announced against it.
No sign-in needed
GET /api/wiki/moderation-logSite-wide public moderation log, newest first. Each entry carries the action, the date, the reason category and — while the affected standard is still published — a link to it. The moderator, the free-text reason note and the removed content itself are never disclosed. Public, no auth.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| action | query | string | Filter to one action: archive, restore, revision_hide, revision_restore, adoption_revoke, adoption_restore, adoption_level_change, adoption_element_revoke, adoption_element_restore, adoption_scope_narrow, adoption_replacement_change, display_name_reset, errata_issued, errata_withdrawn, errata_extended, errata_linked_correction |
| reason | query | string | Filter to one reason category: spam, vandalism, test_content, copyvio (legacy), copyright_notice, suspected_copy, counter_notice, legal_compulsion, out_of_scope, merged_into, other |
| limit | query | integer | Results per page, 1-200 (default 50) |
| offset | query | integer | Offset for pagination (default 0) |
GET /api/wiki/moderation-log/:idOne public moderation log entry, addressed by the entry id the feed and the log page already print. Carries everything a feed entry carries plus `related` — every other public entry belonging to the same moderation matter, oldest first and including this one — so a withholding and the restoration that ended it read as one record. `scope.kind` says what the action reached — `clauses` (with a count and their positional addresses), `edition` (one adopted edition; the standard stays published), `standard` (an archive or restore) or `revision` (an editorial revision hidden or restored) — and is null for an action that reached none of the four. The clause addresses are withheld once the standard is no longer published. Returns 404 both for an unknown id and for an entry the site-wide feed does not show, so enumerating ids discloses nothing the feed does not. Public, no auth.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| id | path | integer | Moderation log entry id |
GET /api/wiki/standards/:id/moderation-logPublic moderation log for one wiki standard. Returns 404 for any standard that is not publicly readable, including an archived one, so the endpoint cannot be used to confirm that a particular standard was removed; archived standards still appear in the site-wide feed with their identity withheld. Public, no auth.
No sign-in needed
| Name | In | Type | Description |
|---|---|---|---|
| id | path | string | Wiki standard UUID |
| action | query | string | Filter to one action (see GET /moderation-log) |
| reason | query | string | Filter to one reason category |
| limit | query | integer | Results per page, 1-200 (default 50) |
| offset | query | integer | Offset for pagination (default 0) |