/api/datasheet
Datasheet instances are project-specific fill-ins of a standard. These endpoints read, revise, and upgrade datasheets.
GET /api/datasheet/:idGet a datasheet instance with its element values, revision info, and comments. Each element carries TWO INDEPENDENT layers, and answering a question about the wrong one is a factual error: (1) the field DEFINITION inherited from the standard — `drawing_ref` (true = the standard says this field's value comes from the drawings), `drawing_ref_locator`, `starting_disposition`, `starts_deferred` (legacy alias), and `default_value`; and (2) this project's INSTANCE STATE — `user_value`, `disposition` (one of "specified", "per_drawings", "not_applicable", "tbd", "manufacturer_standard"), and `disposition_note`. So: "which fields defer to the drawings / are drawing-referenced / should come from the drawings?" is answered by `drawing_ref: true` on the DEFINITION. "Which fields are currently marked per-drawings / left to the drawings on this datasheet?" is answered by `disposition: "per_drawings"` on the INSTANCE. A field very commonly has `drawing_ref: true` while its instance `disposition` is still "specified" (nobody has dispositioned it yet) — that field DOES defer to the drawings. Never report "no fields defer to the drawings" on the strength of the disposition alone; check `drawing_ref` too, and if you mean only one of the two layers, say which one in plain words. `values_summary` ({ total_fields, fields_with_user_value }) tells you how many fields have recorded user values — if `fields_with_user_value` is greater than 0, do not claim fields are unfilled without checking each element's `user_value`. EDIT VERSION: `datasheet.version` (an opaque string — never parse or change it) is what POST /:id/revise needs back as baseVersion. `standardHome` is who holds the standard that defines the fields, {type: "global"|"company"|"user"|"project", name} (name "SynC" for the SynC library), or null when the reader may not be told. SHORT BY DEFAULT for an API key or connected app: a read that sends none of view, fields, address, addresses or format gets the view=labels answer (each field with its id, address, label, input_type, unit, user_value, disposition and at_default; on a 104-field datasheet 30 KB of 90 KB) with a `note` saying so; send view=full for every element in full. To read or change one or a few fields, do not read the whole list: send search=<words> (fields by label or clause heading) or fields=<ids or clause addresses>; they come back in full, with their options and identity_uuid. A range field carries range {min, max, step}, or {min, max, setpoints, setpoints_only: true} where only those setpoints are accepted, in the labels, search and compact rows (the full rows have the same limits in options). Such a read by an API key or connected app answers a short header (identity, version, revision_code; header=full for integrity, upgrade status and edit access detail). `datasheet_read` {view, addresses, fields, fields_total, fields_returned} says what was read; `values_summary` still counts every field. DERIVED FIELDS hold no value and SynC computes none: in the labels and compact reads a field with disposition "derived" carries `derived_basis`, the basis as the issued datasheet prints it (the project parameter answers filled in), and `derived_from` [{name, value, unit, answered}], the parameters it names; `derived_note` says so once. EDIT ACCESS: for an API key or connected app, `hasEditAccess` answers whether it can write this datasheet (project:draft:edit on the project, the question PATCH /api/projects/:id/datasheets/:datasheetInstanceId/fields and POST /:id/revise ask, of the key: its grants and its owner's own access together), and `edit_access` {allowed, permission, granted_to_key, owner_can_edit, reason} says which half is missing when it is false. Report `reason` to the person instead of guessing why.
Required permissions: datasheet:read, project:read
Optional permission (unlock additional behaviour): project:draft:view
| Name | In | Type | Description |
|---|---|---|---|
| id | path | integer | The NUMERIC datasheet instance id (e.g. 95014) — NEVER the datasheet's display name like "DT-1". Get the id from the project's datasheet list (GET /api/projects/:id/datasheets) first. |
| projectRevisionId | query | integer | The project revision being read: `datasheet.project_datasheet_instance_id` / `project_revision_id` are then that revision's wrapper row, the anchor for a field comment, and the datasheet is served as THAT project revision holds it (its pinned datasheet revision), so an issued revision stays readable after the open draft revises the datasheet. Must be readable by the caller (404 otherwise); a past published revision (not the current one) also needs project:revision:view (403 otherwise). Omitted, a caller with draft access reads the datasheet as it now stands (the draft); anyone else is served it as the newest project revision they may read holds it (a share recipient: the newest revision their link reaches), and a datasheet that revision does not hold is a 404. `datasheet.current_revision_id` then names the datasheet revision served, and `version` is absent. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
| revisionId | query | integer | A specific DATASHEET revision id, to read this datasheet as it stood at that revision (ids from GET /api/datasheet/:id/revisions). Omit for the current state, which is what almost every question wants. ASSISTANT-ONLY: the HTTP route deliberately ignores this parameter and always serves the current revision, so an integration reading historical values must use GET /api/datasheet/:instanceId/revision/:revisionId instead (it returns elements in this same shape). Historical values are not the datasheet — never answer a question about what the project specifies today out of a revision you pinned, and say which revision you read whenever you pass this. |
| format | query | string | "verbose" (default, all fields) or "compact" (id/address/label/user_value/disposition/disposition_note per element). Invalid values return 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. The assistant already receives a reduced projection. Note for integrations: the compact shape omits the field DEFINITION (drawing_ref, starting_disposition, default_value, options), so it says which fields are deferred on this datasheet but not which ones the standard points at the drawings. It carries `id`, which is what POST /:id/revise needs in changes[].element_id — so a compact read can drive a write without a second fetch. A derived field also carries derived_basis and derived_from (see DERIVED FIELDS). Sending format counts as asking for the elements, so an API key gets them in that format rather than the short list. |
| view | query | string | "labels": per field id, address, label, input_type, unit (range fields), option_count (choice fields), range (range fields: {min, max, step}, or {min, max, setpoints, setpoints_only: true}, where only those setpoints are accepted), user_value (a range value as a number), disposition, disposition_note when set, and at_default (true when the value equals the standard's default: a create stores the default for every field it was not sent, and this cannot tell that from a person choosing the same value). blank: true marks a field no one answered: no value, and disposition reads specified only because every field starts there (the app shows it as Not specified), so it is open. No options, defaults or field definition; `omitted` names what was left out, and the datasheet header leaves out standard_description unless include=description. It is the default for an API key or connected app. "full": every element in full. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
| fields | query | string | Comma-separated fields (up to 200): an element id, an identity_uuid, or a clause address with a dot (15.1.7: every field on that clause; for a top-level clause use address=15). Only those fields, in full (with view=labels, as labels rows). A field the datasheet does not have: 404 FIELD_NOT_FOUND naming it; a clause with no field: 404 ADDRESS_NOT_FOUND naming the nearest addresses that have fields. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
| address | query | string | Only the fields under this clause address (3.1 is 3.1 and everything under it), in full unless view=labels. An address with no field under it: 404 ADDRESS_NOT_FOUND naming the nearest ones; malformed: 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. |
| addresses | query | string | Comma-separated clause addresses (up to 50): the fields under any of them, as 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. |
| search | query | string | Words to find fields by: comma-separated terms (search=tube length,refrigerant), each matched without regard to case against the field's label and the heading of the clause it sits in; a field matches a term when every word of it appears. A term nothing matches that way takes the fields matching any of its words (3 letters or more), marked `partial`. `field_search` {search, terms: [{term, matched, partial}], fields_total, fields_returned} says how each term fared, and a `note` when nothing matched (200, no rows). Only the matching fields come back, each with id, identity_uuid (the field_id the fields PATCH takes), address, heading, label, input_type, unit, options, user_value, disposition, disposition_note when set, at_default, and `suggested` (the standard's default when short, else has_suggestion: true). Works with fields= and address= (it searches within them). Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
| header | query | string | "lean" or "full". "lean": the datasheet header is only its identity (id, name, project, standard, revision ids), version (what a write sends back as baseVersion) and revision_code, with hasEditAccess, in_draft, edit_access only when editing is refused, upgradeStatus only when an upgrade is waiting, and header_note; no integrity hashes or standardHome (values_summary, and derived_note beside a derived field, stay). It is the default for an API key or connected app whose read sends fields, address, addresses or search; send header=full there for the whole header. 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 | Comma-separated extras to fold into the response: "template" adds the standard's field definitions as they stood for this datasheet's standard revision, and "comments" adds the datasheet's comment thread. Without it neither is returned. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. ("values" is also accepted but is a no-op — elements always come back.) Prefer include=template over a separate template fetch when you need to know what a field is SUPPOSED to hold, since the instance alone does not carry the definition text. "clauses" adds `relatedContent`, the clause text beside each field (often most of the read): an API key or connected app gets it only with include=clauses; a signed-in browser always gets it. With fields or address, only the clauses of the fields read. With view=labels: "identity_uuid" adds each field_id, "description" keeps standard_description. |
GET /api/datasheet/:id/revisionsList revision history for a datasheet instance. Only revisions that a project revision you may read holds are listed: a share recipient sees those their link reaches, and without project:revision:view none held only by a past published revision. Requires BOTH permissions: `project:read` on the datasheet's OWN project (the row question) and `datasheet:read` in any scope (the tier question). Access is their intersection.
Required permissions: datasheet:read, project:read
Optional permissions (unlock additional behaviour): project:draft:view, project:revision:view
GET /api/datasheet/:id/compareCompare two datasheet revisions side-by-side. Both must be revisions GET /:id/revisions lists for you (404 otherwise; 403 for one held only by a past revision without project:revision:view). Requires BOTH permissions: `project:read` on the datasheet's OWN project (the row question) and `datasheet:read` in any scope (the tier question). Access is their intersection.
Required permissions: datasheet:read, project:read
Optional permission (unlock additional behaviour): project:revision:view
| Name | In | Type | Description |
|---|---|---|---|
| from | query | integer | Source revision ID |
| to | query | integer | Target revision ID |
POST /api/datasheetCreate a new datasheet instance for a standard in a project, or several in one call (API keys and connected apps: `datasheets: [...]`, see SEVERAL AT ONCE below). Returns 201 with `datasheetId`, `revisionId`, `collisions` (other datasheets in the project with this name, advisory), and how the fields were filled: `fields_total` (the fields of the standard revision the datasheet uses), `values_sent` (fields you sent a value for), `dispositioned` (fields that start deferred, by you or by the standard), and `left_at_default` ({count, fields: [{element_id, address, label, value}]}, the fields that took the standard's default), and `left_blank` (fields with no value and no deferral); the four counts add up to fields_total. Tell the user which fields kept the default. A value a field does not accept refuses the whole create, with every refused value at once: 422 (400 when a value is over the length limit), code DATASHEET_VALUES_REFUSED, `metadata.problems` [{element_id, label, value, code, message, options | rule}], `options` being the field's valid choices and `rule` its number limits (min, max, step, setpoints, unit) or max_length. Nothing was saved; fix each listed value, or defer the field, and send the create again. SEVERAL AT ONCE: send `{project_id, datasheets: [<create body>, ...]}` (at most 25, each body as for one create, without project_id). Each is created on its own and the answer is per item: 201 when all were created, 207 when any was refused, with `created`, `refused` and `results` [{index, name, status: "created" | "refused", ...the single answer | error: {status, message, code, metadata}}]. A refused item saved nothing and the others are kept: resend only the refused ones. For an API key or connected app the answer also carries `version` (the value POST /:id/revise and PATCH /api/projects/:id/datasheets/:datasheetInstanceId/fields take as baseVersion), and `left_at_default.fields` lists {element_id, label, value} unless include=defaults (every field in full): `value` is the default the field took when it is short (at most 40 characters as JSON, the template's `suggested` rule), and a longer one shows `long_value: true` with `preview`, its first 80 or so characters (a choice list's picks joined by ", ", and `picked`, how many), ending in "…" when cut. An API key or connected app also gets dispositioned_by_you (the fields you deferred) and dispositioned_by_standard (those the standard starts deferred), which add up to dispositioned.
Required permission: project:draft:edit
| Name | In | Type | Description |
|---|---|---|---|
| include | query | string | "defaults": list each defaulted field in full ({element_id, address, label, value}) rather than {element_id, label}. Only an API key or connected app gets the short form. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
standard_id — integerproject_id — integername — stringdatasheets — array — create several datasheets in one call: each entry a create body (standard_id, name, elementValues, dispositions, ...) without project_id; send it with project_id only, in place of standard_id and name. At most 25. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result.scope — stringelementValues — objectdispositions — arraysummary — stringseverity — stringREQUIRES AN OPEN DRAFT: this change lands in the project's current unpublished draft. If the project has no open draft the call is rejected outright — check GET /api/projects/:id/revisions (a revision with is_draft true) and, if there is none, propose POST /api/projects/:id/draft/create first, then make this call. Opening a draft is its own user-approved change; never publish or revert a project to bring a draft into existence. A field left out of elementValues takes the standard's default (stored as a real value), and leaving it out is a decision. Before you create, decide each field from the project's context: the request, the project parameters, and the clause the field sits in (GET /api/datasheet/:standardId/template with no option lists every field with its id, clause address, label and suggested value, then fields=<ids> gives the options and clause excerpt of the fields you will set). Send each value that context supports. Where a value is genuinely open, defer it in dispositions (per_drawings, tbd, not_applicable, manufacturer_standard) with a disposition_note saying why. Ask the user about the choices that matter and have no basis in one grouped question, in your own conversation, before you send the create: nothing in SynC asks them first. A value copied from another datasheet (a sibling unit, an earlier project) or inferred from the project is still a guess unless the person's source says it for this item: defer it (tbd) with a note saying where the guess came from, and ask. Never invent a value, and never copy a default into elementValues just to fill it. Keeping a default with no basis is allowed only if you tell the user which fields kept it. A field sent as "" or null is an explicit blank and suppresses its default. Unknown top-level fields are REFUSED with a 400 naming them, rather than dropped. Every body field must have its documented type: name is a string, not a single-element array. summary and severity (MAJOR|MINOR|PATCH) describe the datasheet's FIRST revision; omit them for "Initial creation" / MAJOR. dispositions is an array of { element_id, disposition, disposition_note } for fields that start deferred — a deferred field carries no value, so leave it out of elementValues.
POST /api/datasheet/:id/reviseSave changes and create a new datasheet revision. Requires a summary; the severity is computed from the changes unless you send one.
Required permission: project:draft:edit
summary — stringchanges — arraybaseVersion — string — the datasheet's `version` from your most recent read (GET /:id) or from your previous revise; makes this write merge or fail loudly instead of overwriting someone else's edit (see notes)severity — string — MAJOR | MINOR | PATCH (case-insensitive); omitted, SynC computes it from the changes (see notes)currentRevisionId — integer — the legacy alias of baseVersion (the same head revision id); send baseVersion insteadsource_note — string — optional, at most 200 characters: your integration's own source line (e.g. "From Revit model sync"). Stored apart from the summary and shown beside it; the summary is always exactly what you wroteresolvedConflicts — array of { elementId, choice: "mine" | "theirs" } — only on the revise that settles an EDIT_CONFLICT; recorded, never obeyed (the choice is expressed by which fields you send, see notes)severity is optional, one of MAJOR|MINOR|PATCH (case-insensitive); it drives the next revision code. Omitted, SynC computes it from the changes: PATCH when every changed field held nothing before (no value, no deferral, no note), MINOR when a value, deferral or note someone entered is changed or cleared. A severity you send overrules it, higher or lower. The response carries severity (saved) and suggested_severity (computed); POST /:id/revise/preview reads the computed level before you save. Each change must have element_id (from the id field of each element in GET response) and then EITHER a new_value (to specify the field) OR a disposition (to defer it) — see below. DEFERRING A FIELD IS A `disposition`, NEVER AN EMPTY VALUE. To record that a field is left to the drawings, is not applicable, is still to be determined, or is the manufacturer's standard, send disposition: "per_drawings" | "not_applicable" | "tbd" | "manufacturer_standard" (and "specified" to bring a deferred field back to a real value). Sending an empty new_value with NO disposition does NOT defer anything, and is now REFUSED with a 400 naming every field it would have erased. The disposition is the only thing that carries the deferral; the empty value carries nothing, so a blank with nothing to say what it means is treated as an accident rather than obeyed. This is keyed on the ABSENCE of `disposition`, never on the emptiness of the value: to erase a value deliberately, send disposition: "specified" alongside the blank and it succeeds. To leave a field exactly as it is, OMIT it from changes[] — do not echo a whole datasheet back. Every success returns `changed` (how many fields this revision actually altered) and `cleared` (an entry per field whose recorded value was removed: element_id, label, previous_value), so an erasure is visible in the write response rather than only in a later compare. A non-"specified" disposition FORCES the value to null, so never pair one with a new_value expecting both to stick — send the disposition alone. Going the other way (disposition: "specified") needs the new_value in the same change, or the field ends up specified and blank. disposition_note is the free-text "where to look" hint (max 500 characters) and is ALLOWED ONLY alongside a non-"specified" disposition — sending it with a plain value change is a 400. Use it for the drawing/sheet reference when you have one. Pass an empty string as new_value only when the user genuinely wants the recorded value erased with the field left specified — and pair it with disposition: "specified" to say so. Read the current state first (GET /api/datasheet/:id): each element carries `disposition` and `disposition_note` alongside `user_value`, so you can see which fields are already deferred before proposing a change to them. EDIT CONFLICTS: ALWAYS SEND baseVersion, the `version` from that same read (an opaque string — the head revision; never parse or change it). Missing, it is a 400 BASE_VERSION_REQUIRED for API keys and the assistant. Every success returns `version` for the next revise. If the datasheet moved on since your read, the server compares per field: when nobody else changed the fields you send, your changes are applied on top and the response carries merged: true and mergedChanges: [{ elementId, label, change, editedBy, editedAt }] naming the fields that came in from others; when someone changed one of your fields to a different value it is 409 `code: "EDIT_CONFLICT"`, metadata { reason: "fields", currentVersion, editedBy, editedAt, conflicts: [{ elementId, label, base, mine, theirs, editedBy, editedAt }] } (base/mine/theirs are { value, disposition, disposition_note }). To settle, revise again with baseVersion = currentVersion, leaving out each field whose other value you keep ("theirs") and sending each field you keep yours for ("mine"). A datasheet upgraded to another standard revision since your read is always 409 reason "upgraded" with metadata.standardRevision { id, code }: re-read it, never carry values across. The assistant never merges: any move since its read is 409 reason "stale". Nothing is written on a 409. On a 409, RE-READ the datasheet and reconsider: the other edit may already have done what was asked. This does NOT re-bind the datasheet to a newer standard revision: the new revision inherits the standard revision this datasheet's current revision is already bound to. To move a datasheet onto a newer standard revision use POST /api/datasheet/:id/upgrade (fetch GET /:id/upgrade-plan first) — never describe a revise as an upgrade. REQUIRES AN OPEN DRAFT: this change lands in the project's current unpublished draft. If the project has no open draft the call is rejected outright — check GET /api/projects/:id/revisions (a revision with is_draft true) and, if there is none, propose POST /api/projects/:id/draft/create first, then make this call. Opening a draft is its own user-approved change; never publish or revert a project to bring a draft into existence.
POST /api/datasheet/:id/revise/previewRead the severity a POST /:id/revise with these changes would be saved at when you send none, computed from the changes. Writes nothing.
Required permission: project:draft:edit
changes — array — as POST /:id/revise takes itReturns suggested_severity (MAJOR | MINOR | PATCH), changed (how many fields the changes would alter), current_revision_code and next_revision_codes ({MAJOR, MINOR, PATCH}: the code each level would save). PATCH when every changed field held nothing before; MINOR when a value, deferral or note someone entered is changed or cleared. A change the revise would refuse adds no level; the revise reports it.
DELETE /api/datasheet/:idSoft-delete a datasheet instance. Creates a DELETED revision.
Required permission: project:draft:edit
projectRevisionId — integerdeletionReason — stringPOST /api/datasheet/:id/upgradeApply a standard upgrade to this datasheet, resolving element changes. Get the upgrade plan first via GET /:id/upgrade-plan to see conflicts. A datasheet follows the revision of its standard that its project draft holds: toStandardRevisionId must be that revision, and any other is refused with 409 (to change it, use POST /api/projects/:id/standard-revisions, Change library revision). The upgrade never changes which revision the project holds. A target that retires the standard (a "(Superseded)" stub) is refused with 409, as is its upgrade plan. From an API key or connected app the answer also carries `draftVersion`, the project draft's version after the upgrade (the baseVersion of the next draft write or the publish).
Required permission: project:draft:edit
toStandardRevisionId — integerresolutions — arraysummary — stringseverity — stringValid resolution values: user_accepted (keeps the recorded value — an accept with no newValue is safe, the current value is carried forward; send newValue only to accept a DIFFERENT value), user_modified (writes newValue — a user_modified with no newValue would clear the field and is rejected before it is proposed), user_discarded (drops the value deliberately). Resolve EVERY conflict in the plan and propose it: use the upgrade-plan suggestedValue when one is given, otherwise pick the option that best fits the datasheet as recorded and the standard text. For a definition_changed conflict the suggestedValue is the current value, which still meets the new rules: keep it. For options_replaced, the project deferred this field (per drawings, TBD or not applicable) and every choice has since been replaced: keep the deferral unless the user asks for a specific choice. A removed field may name likelySuccessor, the added field that may have replaced it under a new name, with a score and the old answer as `value` (null when it does not fit or the new field starts deferred); the added field names it back as likelyPredecessor. An option_invalid conflict may name likelyOption with likelyOptionScore. Both are guesses: suggestedValue never changes and nothing is carried unless you send it. Send a guess only when the user asked to carry old answers, as user_modified, and call it a guess in the summary; otherwise leave the field and name the guess. Never leave a conflict out. Before you send the upgrade, show the user each field with the value you chose and ask them to confirm in your conversation: nothing in SynC asks them before this change is made. Say in the summary which choices were your own reading rather than the plan suggestion. Key each resolution by the integer elementId of the conflict from the upgrade plan (toElementId, or fromElementId for a removed field) or by its address ("5.4") — NOT by elementUuid: a 36-character id is easy to mis-copy, and two of 29 were on 2026-09-22. Every conflict in the plan needs its own resolution entry. severity is optional (MAJOR|MINOR|PATCH); if omitted, the datasheet revision takes the upgrade plan suggestedSeverity, computed from what the upgrade does to the fields: MAJOR when a field is added or removed or its type, choices, unit, range or constraint changes, MINOR when only a label or default changes, PATCH when no field changes. A severity you send overrules it. The response carries severity and suggested_severity. A refusal names every conflict left without a resolution, and every user_modified with no newValue on a field that holds a value or a deferral (it would clear it), in `metadata.unresolved` and `metadata.wouldClear`; nothing is written. To publish once the datasheets are upgraded, follow the order in the notes of POST /api/projects/:id/publish.
GET /api/datasheet/:id/commentsList the closed-plane comments on a datasheet instance that were not made in a project. Omit standard_element_id for every comment, or filter to one field. A comment made in a project is project correspondence and is read from GET /api/projects/:projectId/comments, where only its author, recipients and the parties it was forwarded to see it; this list does not return it. Requires BOTH permissions: `project:read` on the datasheet's OWN project (the row question) and `datasheet:read` in any scope (the tier question). Access is their intersection.
Required permissions: datasheet:read, project:read
| Name | In | Type | Description |
|---|---|---|---|
| standard_element_id | query | integer | Return only the comments on ONE field, identified by the datasheet FIELD id (the `id` of an element in GET /api/datasheet/:id) — not the printed section number. Omit it for the whole datasheet. Use the filter when the question is about one field: a heavily reviewed datasheet returns a long comment list that can be truncated to fit the context budget, and a truncated list reads exactly like a complete one. |
GET /api/datasheet/:id/upgrade-planGet detailed upgrade plan showing conflicts, auto-resolved elements, and new elements. Also returns `standardName`, `standardHome` ({type: "global"|"company"|"user"|"project", name}, name "SynC" for the SynC library; null when the reader may not be told who holds the standard), `suggestedSeverity` (the level the upgrade saves at when you send none), `nextRevisionCodes` ({MAJOR, MINOR, PATCH}: the datasheet revision code the upgrade saves under each severity), and `conflictCounts` ({toDecide, toReview, summary}, over the whole plan, e.g. "10 to decide, 117 to review"): toDecide conflicts each need a resolution or the upgrade is refused; toReview are fields the new revision adds, which take their suggestedValue (or stay blank) unless you answer them. A removed field and the added field that probably replaced it name each other (likelySuccessor, likelyPredecessor), and an option_invalid conflict may carry likelyOption: see the notes on POST /api/datasheet/:id/upgrade. Read through a connected app, the plan comes 25 conflicts at a time unless you set conflictLimit. Requires BOTH permissions: `project:read` on the datasheet's OWN project (the row question) and `datasheet:read` in any scope (the tier question). Access is their intersection.
Required permissions: datasheet:read, project:read
| Name | In | Type | Description |
|---|---|---|---|
| toRevisionId | query | integer | Target standard revision ID. Defaults to the revision the project holds for this standard (for a datasheet in no project, the latest). A revision other than the held one is refused with 409. |
| conflictOffset | query | integer | Index of the first conflict to return (default 0). A large plan comes back one page at a time: read conflictPage.nextOffset from each page and pass it here until it is null. The upgrade needs a resolution for every conflict in conflictPage.total, not just the ones on the first page; an added field (new_element) left out takes its suggestedValue, or blank when it has none. |
| conflictLimit | query | integer | Most conflicts to return in one page. Omit it to get every conflict at once, except through a connected app, which gets 25 per page. |
| include | query | string | Comma-separated extras. "relatedContent" adds the text of the clauses the conflicting fields sit in; omit it for the plan alone. |
GET /api/datasheet/check-nameCheck whether a datasheet name is already taken for a given project + standard pair. Ask before POST /api/datasheet: names are unique within that pair, so a colliding create is refused. Also returns `collisions` — datasheets elsewhere in the SAME project carrying this name under a DIFFERENT standard. That is advisory, not a refusal: a datasheet name is an instrument tag, and one tag names one device, so a name that is `available` can still be a numbering collision worth raising with the user.
Required permission: project:read
| Name | In | Type | Description |
|---|---|---|---|
| project_id | query | integer | Project id (required) — also what the permission is scoped to |
| standard_id | query | integer | Standard id (required) |
| name | query | string | Candidate datasheet name (required) |
GET /api/datasheet/:standardId/templateGet a STANDARD's datasheet template — the field definitions a datasheet instance fills in. This is the blank form, not anyone's filled-in copy: the path parameter is a STANDARD id, not a datasheet instance id. Requires BOTH permissions: `standard:read` in the scope that owns the standard (the row question; through a project, `project:read` on the project named by project_id) and `datasheet:read` in any scope (the tier question). Access is their intersection. The template is the one of the revision named, else the current revision, else (through a project) the revision that project uses. READ IT IN TWO STEPS. (1) Send no option: an API key or connected app gets the SHORT field list (the view=labels answer: each field with its id, clause address, label, type and the standard's suggested value, and a range field its range {min, max, step} or {min, max, setpoints, setpoints_only: true}, where only those setpoints are accepted, and a field with a constraint its `constraint`; no choice lists, only option_count; about 28 KB for 100 fields) with a `note` saying so. It leads with `decisions`: fields ({id, label}) by how they start (needs_value: no suggestion or disposition, so set or defer each; starts_as: by disposition) and the suggested count. view=decisions answers `decisions` alone (about 5 KB). A field whose starting_disposition is "derived" also carries derived_basis (parameters as [name]) and derived_from [{ name }], with one derived_note: leave such a field out of a create unless the person gives its value. `options` is a list of the choices on a select, radio or checkbox field and an object {min, max, step, unit, setpoints} on a range or number field. (2) Read fields=<ids> for the fields you will set: their options, defaults and clause excerpts. address=<clause> limits either step to the fields under one clause. Read a clause before leaving its field at the default. A suggested value is the one most projects use, so keeping it is reasonable where nothing in the project says otherwise; a field a create leaves out takes it. fields_only=true (about 54 KB for 100 fields), lean=true and view=full (the whole template, about 250 KB) are larger legacy reads; you do not need them. A browser session gets the whole template when it sends no option.
Required permissions: datasheet:read, standard:read
Optional permission (unlock additional behaviour): project:read
| Name | In | Type | Description |
|---|---|---|---|
| standardId | path | integer | Standard id (NOT a datasheet instance id) |
| revisionId | query | integer | The standard revision whose template to read (optional). Outside what you may read: 404. |
| view | query | string | "decisions": only `decisions` (which fields to set or defer, each {id, label}), no field rows. "labels": per field only id, address, label, input_type, unit (range fields), option_count (choice fields) and starting_disposition; no options, derived_basis or clause excerpts. From an API key or connected app each field also carries `suggested` (the standard's default value, when short) or `has_suggestion: true` (when longer); a field with neither has no default. It is the default for an API key or connected app. "full": the whole template (`elements` and `relatedContent`, the text of every clause); several times larger, and cut over MCP when it is too large. include=clauses adds the excerpts, include=identity_uuid each field_id. A label alone often does not say what to decide: read the clause (include=clauses, or fields=) before leaving a field at its default. |
| fields | query | string | Comma-separated field ids (the id or the identity_uuid; up to 200): only those fields, in full, with the excerpts of their clauses. A field the template does not have: 404 FIELD_NOT_FOUND naming it. |
| address | query | string | Only the fields under this clause address (3.1 is 3.1 and everything under it). An address the standard does not have: 404 ADDRESS_NOT_FOUND naming the nearest ones; malformed: 400. |
| addresses | query | string | Comma-separated clause addresses (up to 50): the fields under any of them, as address. |
| search | query | string | Words to find fields by: comma-separated terms (search=tube length,refrigerant), each matched without regard to case against the field's label and the heading of the clause it sits in; a field matches a term when every word of it appears. A term nothing matches that way takes the fields matching any of its words (3 letters or more), marked `partial`. `field_search` {search, terms: [{term, matched, partial}], fields_total, fields_returned} says how each term fared, and a `note` when nothing matched (200, no rows). Only the matching fields come back, in full (id, identity_uuid, address, label, input_type, options, default_value, suggested, derived_basis, constraint) with their clause heading, and `clauses`, the excerpt of each clause they sit in. Works with address= and fields= (it searches within them). |
| include | query | string | With the default list (view=labels): "clauses" adds the clause excerpts, "identity_uuid" each field_id (what PATCH /api/projects/:id/datasheets/:datasheetInstanceId/fields names a field by), "options" (an API key or connected app) the choices of every select, radio and checkbox field. With a lean fields_only read: "clauses" and "derived_basis"; comma-separate them. |
| fields_only | query | boolean | LEGACY, LARGER: prefer the default list and fields= (above). true returns `datasheetFields` (every field with its id, identity_uuid, address, label, input type, option values, default and derived_basis) and `clauses` (a short excerpt of each clause that holds a field, keyed by address) in place of `elements` and `relatedContent`: about 54 KB on a 100-field standard, against about 28 KB for the default list. identity_uuid is the field_id PATCH /api/projects/:id/datasheets/:datasheetInstanceId/fields takes. view, address, addresses and fields each imply fields_only=true, and any of them adds `template_read` (what was asked, fields_total, fields_returned). |
| lean | query | boolean | LEGACY: with fields_only (from an API key or connected app, lean=true alone implies it). true leaves out the clause excerpts (`clauses`) and each field's `derived_basis`, keeping options, defaults and dispositions: about a quarter smaller than fields_only, still about three times the default list. Off by default for every caller. |
| project_id | query | integer | The project the standard is being read in (optional). A reader who reaches the standard only through a project must name it, or gets 404 "Standard not found"; through it they read only the revisions that project uses. Ignored for a standard in your own library. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
| projectRevisionId | query | integer | With project_id, read through that one project revision only (optional). Without project_id: 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. |
| projectId | query | integer | Same as project_id, for an API key or connected app (the camelCase its sibling reads take); with both, project_id wins. A signed-in browser must send project_id. 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/datasheet/:instanceId/revision/:revisionIdGet one datasheet instance AS OF a specific datasheet revision, with the values that revision recorded. Values are read from that revision’s own snapshot, so this — not the live read — is what a historical value must be quoted from. A revision that does not belong to the instance, or that no project revision you may read holds, is a 404 (a share recipient gets it before any other refusal); one held only by a past published revision needs project:revision:view (403). For a caller without draft access `datasheet.current_revision_id` names the datasheet revision their project revision holds (projectRevisionId, else the newest they may read; null when none does) and `version` is absent. Returns `elements` and `values_summary` in the SAME shape as GET /api/datasheet/:id, so one parser reads both; `include` and `format` behave identically there too, and `standardHome` is the same. `datasheet.revision.standard_revision_id` is the standard revision THIS datasheet revision was built on; the top-level `datasheet.standard_revision_id` is the current revision’s. `revision_record` is the record of this revision itself: { source_note, write_channel }. `source_note` is the writer-supplied source line (null when none). `write_channel` is how the revision was written, { channel: editor | api_key | connection | assistant | wiki, label }, and only for a caller in the company that holds the record; null for anyone else and for a revision from before it was recorded. Over HTTP the response carries `immutable`, always false for now: this answer also carries fields that move (current_revision_id, version, hasEditAccess, comments), so a client should not reuse it. Requires BOTH permissions: `project:read` on the datasheet's OWN project (the row question) and `datasheet:read` in any scope (the tier question). Access is their intersection.
Required permissions: datasheet:read, project:read
Optional permission (unlock additional behaviour): project:revision:view
| Name | In | Type | Description |
|---|---|---|---|
| instanceId | path | integer | Datasheet instance id |
| revisionId | path | integer | Datasheet revision id belonging to that instance |
| projectRevisionId | query | integer | The project revision being read: `datasheet.project_datasheet_instance_id` / `project_revision_id` are then that revision's wrapper row, the anchor for a field comment. Must be readable by the caller (404 otherwise). Omitted, they name the newest published revision, or the draft for a caller with draft access. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. |
| format | query | string | "verbose" (default) or "compact" (id/address/label/user_value per element). Invalid values return 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. The compact shape omits drawing_ref, disposition and disposition_note, so it cannot answer which fields are deferred. |
| include | query | string | Comma-separated extras: "template" adds the standard's field definitions at this revision's standard revision, "comments" adds the comment thread. Over HTTP only: SynC's in-app assistant does not read this parameter, so sending it from the assistant changes nothing about the result. ("values" is accepted but is a no-op — elements always come back.) |
GET /api/datasheet/:id/upgrade-statusReport whether a datasheet is behind the revision of its standard that its project holds (`availableStandardRevision`; for a datasheet in no project, the current revision). The cheap first step of the upgrade flow: status → GET /:id/upgrade-plan → POST /:id/upgrade. Requires BOTH permissions: `project:read` on the datasheet's OWN project (the row question) and `datasheet:read` in any scope (the tier question). Access is their intersection. On a project the status is for draft editors only (project:draft:edit), refused (403) to anyone else; GET /:id leaves `upgradeStatus` out for them too.
Required permissions: datasheet:read, project:read
GET /api/datasheet/:id/comments/countsComment counts per standard element for a datasheet — how the UI marks which fields have discussion without fetching every comment. Requires BOTH permissions: `project:read` on the datasheet's OWN project (the row question) and `datasheet:read` in any scope (the tier question). Access is their intersection.
Required permissions: datasheet:read, project:read
| Name | In | Type | Description |
|---|---|---|---|
| project_id | query | integer | Required for TEMPLATE comments (when :id is a non-numeric id like "template-123"); ignored otherwise. |