{"openapi":"3.1.0","info":{"title":"Chainage API","version":"1.0.0","description":"Chainage production REST API — the v1 read model for the site + leadership apps."},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-Api-Key"}},"schemas":{}},"paths":{"/v1/webhooks/workos":{"post":{"tags":["webhooks"],"description":"Inbound WorkOS events (signature-verified).","responses":{"200":{"description":"Default Response"}}}},"/v1/me":{"get":{"tags":["identity"],"description":"The signed-in user profile. Returns `user` (id, workosUserId, email, emailVerified, name, firstName, lastName, avatarUrl, role, status, lastSeenAt), `organization` (id, name, slug, workosOrgId), `memberships` (projectId, projectCode, projectName, role), and `capabilities` (canRaise, canRecord, canDecide, isAdmin) derived from the role.","responses":{"200":{"description":"Default Response"}}}},"/v1/projects":{"get":{"tags":["projects"],"responses":{"200":{"description":"Default Response"}}},"post":{"tags":["projects"],"description":"Onboard a NEW project into the caller’s organization (ADMIN only). Creates the project row plus its road extent, layers, test definitions, and RFI counter, so every role in the org can immediately raise/record/decide on it. Optionally takes custom `layers` and `testDefinitions` (specs compile-checked; defs must reference the provided layers); absent, the default catalogue is seeded. Rejects a duplicate (org, code) with 409 PROJECT_CODE_TAKEN.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"client":{"type":"string","minLength":1},"contractor":{"type":"string","minLength":1},"authorityEngineer":{"type":"string","minLength":1},"rfiIdPrefix":{"type":"string","minLength":1},"timezone":{"type":"string","minLength":1},"road":{"type":"object","properties":{"code":{"type":"string","minLength":1},"chainageStart":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"chainageEnd":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cellSize":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["chainageStart","chainageEnd"]},"layers":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"ordinal":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"code":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"prereq":{"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["layer"]},"code":{"type":"string","minLength":1,"maxLength":40},"from":{"type":"integer","minimum":0,"maximum":9007199254740991},"to":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["feature"]},"featureId":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","minLength":1,"maxLength":60},"from":{"type":"integer","minimum":0,"maximum":9007199254740991},"to":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","featureId"]}]}}},"required":["code"]}},"testDefinitions":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"entryMode":{"type":"string","enum":["sheet","manual","record_only","docs_only"]},"category":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"layers":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"frequency":{"type":"string"},"isAsRequired":{"type":"boolean"},"sheetTitleAliases":{"type":"array","items":{"type":"string"}},"acceptanceSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeInPoc":{"type":"boolean"},"displaySuffix":{"anyOf":[{"type":"string","minLength":1,"maxLength":8},{"type":"null"}]},"spec":{"type":"object","properties":{"inputs":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"unit":{"type":"string"},"dp":{"type":"integer","minimum":0,"maximum":10}},"required":["key","label"]}},"computed":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"unit":{"type":"string"},"dp":{"type":"integer","minimum":0,"maximum":10},"formula":{"type":"string","minLength":1,"maxLength":500}},"required":["key","label","dp","formula"]}},"acceptance":{"anyOf":[{"type":"object","properties":{"rule":{"type":"string","minLength":1,"maxLength":500},"display":{"type":"string","minLength":1}},"required":["rule","display"]},{"type":"null"}]},"documents":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"purpose":{"type":"string","enum":["PROJECT_SOURCE","TEST_EVIDENCE","TEST_ATTACHMENT"]},"kind":{"type":"string","minLength":1,"maxLength":100},"multiple":{"type":"boolean"},"accept":{"type":"object","properties":{"mimeTypes":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"extensions":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"maxBytes":{"type":"integer","minimum":1,"maximum":5368709120}}},"processing":{"type":"object","properties":{"parse":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"extraction":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"instructions":{"type":"string","maxLength":10000},"deepExtract":{"type":"boolean"},"citations":{"type":"boolean"}},"required":["schema"]}}},"review":{"type":"object","properties":{"required":{"type":"boolean"},"minimumConfidence":{"type":"number","minimum":0,"maximum":1},"requiredPaths":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}}}},"required":["key","label","required"]}}},"required":["inputs","computed","acceptance","documents"]},"code":{"type":"string","minLength":1}},"required":["name","entryMode","layers","spec","code"]}}},"required":["code","name","road"]}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}":{"patch":{"tags":["projects"],"description":"Update project settings.\n\nIncludes `enforceLayerSequence`, the per-project layer-sequence policy that had\nno production writer at all — it was read in seven places and written only by a\ntest helper, so every real project ran with the gate permanently on.\n\nThe flag lives in `projects.extra`, which is MERGED rather than replaced, so\nsetting it cannot destroy other keys.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":500},"client":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"contractor":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"authorityEngineer":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"rfiIdPrefix":{"type":"string","minLength":1,"maxLength":120},"timezone":{"type":"string","minLength":1,"maxLength":60},"enforceLayerSequence":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/road":{"put":{"tags":["projects"],"description":"Replace the road extent and cell size.\n\nRefused when it would orphan existing work: 409 ROAD_EXTENT_UNSAFE if any live\nRFI or configured feature would fall outside the new extent, and 409\nCELL_SIZE_MISALIGNED if a new cell size would leave existing RFIs off-grid.\nEvery board coordinate derives from these values.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"chainageStart":{"type":"integer","minimum":0,"maximum":9007199254740991},"chainageEnd":{"type":"integer","minimum":1,"maximum":9007199254740991},"cellSize":{"type":"integer","minimum":1,"maximum":1000}},"required":["chainageStart","chainageEnd","cellSize"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/layers/{code}":{"put":{"tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"ordinal":{"type":"integer","minimum":0,"maximum":1000},"kind":{"type":"string","enum":["PAVEMENT","COMPONENT"]},"prereq":{"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["layer"]},"code":{"type":"string","minLength":1,"maxLength":40},"from":{"type":"integer","minimum":0,"maximum":9007199254740991},"to":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["feature"]},"featureId":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","minLength":1,"maxLength":60},"from":{"type":"integer","minimum":0,"maximum":9007199254740991},"to":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","featureId"]}]}}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":40},"in":"path","name":"code","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"tags":["projects"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","minLength":1,"maxLength":40},"in":"path","name":"code","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/layers/reorder":{"post":{"tags":["projects"],"description":"Reorder the pavement stack bottom-to-top. Must name EVERY pavement layer — a partial list would silently reshuffle the ones it omits.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"order":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}}},"required":["order"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/test-definitions":{"get":{"tags":["test-definitions"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/test-definitions/{code}":{"put":{"tags":["test-definitions"],"description":"Create or update one test in the project’s catalogue (ADMIN only). The code in the URL is the immutable natural key — renaming is deactivate + create. The spec (inputs, computed formulas, acceptance rule, documents) is compile-checked; failures return 400 SPEC_INVALID with per-field diagnostics in details. Edits apply to RFIs raised from now on; raised RFIs keep their raise-time rules.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"entryMode":{"type":"string","enum":["sheet","manual","record_only","docs_only"]},"category":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"layers":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"frequency":{"type":"string"},"isAsRequired":{"type":"boolean"},"sheetTitleAliases":{"type":"array","items":{"type":"string"}},"acceptanceSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeInPoc":{"type":"boolean"},"displaySuffix":{"anyOf":[{"type":"string","minLength":1,"maxLength":8},{"type":"null"}]},"spec":{"type":"object","properties":{"inputs":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"unit":{"type":"string"},"dp":{"type":"integer","minimum":0,"maximum":10}},"required":["key","label"]}},"computed":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"unit":{"type":"string"},"dp":{"type":"integer","minimum":0,"maximum":10},"formula":{"type":"string","minLength":1,"maxLength":500}},"required":["key","label","dp","formula"]}},"acceptance":{"anyOf":[{"type":"object","properties":{"rule":{"type":"string","minLength":1,"maxLength":500},"display":{"type":"string","minLength":1}},"required":["rule","display"]},{"type":"null"}]},"documents":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"purpose":{"type":"string","enum":["PROJECT_SOURCE","TEST_EVIDENCE","TEST_ATTACHMENT"]},"kind":{"type":"string","minLength":1,"maxLength":100},"multiple":{"type":"boolean"},"accept":{"type":"object","properties":{"mimeTypes":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"extensions":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"maxBytes":{"type":"integer","minimum":1,"maximum":5368709120}}},"processing":{"type":"object","properties":{"parse":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"extraction":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"instructions":{"type":"string","maxLength":10000},"deepExtract":{"type":"boolean"},"citations":{"type":"boolean"}},"required":["schema"]}}},"review":{"type":"object","properties":{"required":{"type":"boolean"},"minimumConfidence":{"type":"number","minimum":0,"maximum":1},"requiredPaths":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}}}},"required":["key","label","required"]}}},"required":["inputs","computed","acceptance","documents"]}},"required":["name","entryMode","layers","spec"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"code","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"tags":["test-definitions"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"code","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/catalogues":{"get":{"tags":["catalogues"],"description":"The organization's business vocabulary — feature subtypes, junction\nclasses, units, evidence types, frequency bases and the rest.\n\nEvery configurable choice in the Project Configurator loads from here, so no\nscreen carries its own option list. The organization's bootstrap set is inserted\non first read, which means a brand-new org answers this call with a usable\ncatalogue and an administrator's own additions are indistinguishable from it\nafterwards.\n\n`meta.system` carries the code-controlled vocabularies (feature class, side,\nentry mode, role, …) in the same option shape. Those are invariants the product\nbranches on: they are returned so a form never hand-writes them, but they cannot\nbe created or retired here.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"kind","required":false},{"schema":{"type":"string","maxLength":120},"in":"query","name":"q","required":false},{"schema":{"type":"boolean"},"in":"query","name":"includeRetired","required":false}],"responses":{"200":{"description":"Default Response"}}},"post":{"tags":["catalogues"],"description":"Add a value to a business catalogue (ADMIN only).\n\nCalled in-context from the configurator, so an administrator who finds the\nvocabulary short can extend it without losing the draft they are in the middle\nof. The code is the identifier every configured record will store, and it is\nimmutable once written; 409 CATALOGUE_CODE_TAKEN if it is already used, retired\nentries included.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["feature_subtype","junction_form","junction_class","run_position","pavement_layer","test_category","unit","frequency_basis","evidence_type","stage_template","source_doc_kind"]},"code":{"type":"string","minLength":1,"maxLength":60},"label":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"extra":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","code","label"]}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/catalogues/{id}":{"patch":{"tags":["catalogues"],"description":"Correct a catalogue entry's label or ordering, retire it, or supersede it.\n\nThere is deliberately NO delete: a configured feature from two years ago cites a\ncode, and that code has to keep resolving to a label. Retiring sets ARCHIVED, so\nnothing new may choose it while everything already citing it still reads\ncorrectly. `supersededBy` records the replacement.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"ordinal":{"type":"integer","minimum":0,"maximum":10000},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"supersededBy":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"extra":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/feature-configs":{"get":{"tags":["feature-configs"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"tags":["feature-configs"],"description":"Open a new DRAFT, optionally cloning an existing version.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/feature-configs/{version}":{"get":{"tags":["feature-configs"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"version","required":true}],"responses":{"200":{"description":"Default Response"}}},"patch":{"tags":["feature-configs"],"description":"Update the open DRAFT (ADMIN only).\n\nSlices merge at the top level (`identity`, `road`, `layers`, `tests`,\n`controls`, `roles`), so the configurator can autosave the step in front of\nthe author without shipping — and risking clobbering — everything else.\n\n`confirmSteps` marks steps complete, capturing the signatures of everything\nthey depend on at that moment. That is the mechanism behind downstream\ninvalidation: change the alignment later and the steps that were confirmed\nagainst the old one say so, instead of silently keeping a stale tick.\n\nThe object slices (`identity`, `road`, `controls`) merge field by field;\nsend only the fields that changed. Send `baseRevision` — the `revision` of the\nstate the edit was made against — and the write is refused with 409\nCONFIG_DRAFT_CHANGED (fresh state in `details.state`) when somebody else wrote\nin between, instead of replacing their work with an older copy.\n\n409 CONFIG_NOT_DRAFT on an activated version — it is the contract existing RFIs\nwere raised under.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"draft":{"type":"object","properties":{"identity":{"type":"object","properties":{"name":{"type":"string","maxLength":500},"client":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"contractor":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"authorityEngineer":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"timezone":{"type":"string","maxLength":60}}},"road":{"type":"object","properties":{"code":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"chainageStart":{"type":"integer","minimum":0,"maximum":9007199254740991},"chainageEnd":{"type":"integer","minimum":0,"maximum":9007199254740991},"cellSize":{"type":"integer","minimum":1,"maximum":1000}}},"layers":{"maxItems":60,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":40},"label":{"default":"","type":"string","maxLength":200},"ordinal":{"type":"integer","minimum":0,"maximum":1000},"kind":{"type":"string","enum":["PAVEMENT","COMPONENT"]},"prereq":{"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["layer"]},"code":{"type":"string","minLength":1,"maxLength":40},"from":{"type":"integer","minimum":0,"maximum":9007199254740991},"to":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["feature"]},"featureId":{"type":"string","minLength":1,"maxLength":120},"stage":{"type":"string","minLength":1,"maxLength":60},"from":{"type":"integer","minimum":0,"maximum":9007199254740991},"to":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","featureId"]}]}}},"required":["code","ordinal","kind"]}},"tests":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1},"enabled":{"type":"boolean"},"layers":{"maxItems":60,"type":"array","items":{"type":"string","minLength":1}},"frequencyBasis":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"frequency":{"type":"string","maxLength":300},"isAsRequired":{"type":"boolean"}},"required":["code","enabled","layers"]}},"controls":{"type":"object","properties":{"enforceLayerSequence":{"type":"boolean"}}},"roles":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","minLength":1,"maxLength":40}},"required":["userId","role"]}}}},"sourceDocs":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120},"title":{"type":"string","minLength":1,"maxLength":300},"version":{"type":"string","minLength":1,"maxLength":60},"kind":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"required":["id","title","version"]}},"changeReason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"effectiveFrom":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"overrides":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"findingCode":{"type":"string","minLength":1,"maxLength":80},"target":{"type":"string","maxLength":200},"reason":{"type":"string","minLength":1,"maxLength":500},"actorUserId":{"default":"","type":"string"},"at":{"default":"","type":"string"}},"required":["findingCode","reason"]}},"confirmSteps":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"unconfirmSteps":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"baseRevision":{"type":"string","minLength":1,"maxLength":64},"baseComponentsRevision":{"type":"string","minLength":1,"maxLength":64}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"version","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/feature-configs/{version}/features/{featureKey}":{"put":{"tags":["feature-configs"],"description":"Create or replace ONE feature in a DRAFT configuration.\n\nConverging upsert on (config, featureKey) — repeats cannot duplicate, so no\nIdempotency-Key. `featureKey` is the stable domain identity every raise-time\nfeatureRef cites; it is taken from the URL, never the body.\n\nGeometry may be a point, an interval, or `segments` for an asset that occupies\nseveral disjoint stretches. A drain run may carry its own `segments` when it\ndiffers from its siblings; absent, it spans the parent's geometry.\n\nOnly a DRAFT accepts edits (409 CONFIG_NOT_DRAFT otherwise): an activated\nconfiguration is the contract existing RFIs were raised under.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":120},"cls":{"type":"string","enum":["STRUCTURE","DRAIN","JUNCTION"]},"subtype":{"default":"","type":"string","maxLength":60},"unclassifiedText":{"type":"string","maxLength":500},"geometry":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["point"]},"chainage":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kind","chainage"]},{"type":"object","properties":{"kind":{"type":"string","enum":["interval"]},"start":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kind","start","end"]},{"type":"object","properties":{"kind":{"type":"string","enum":["segments"]},"segments":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["start","end"]}}},"required":["kind","segments"]}]},"side":{"default":"CROSS","type":"string","enum":["LHS","RHS","CROSS"]},"label":{"default":"","type":"string","maxLength":300},"runs":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"side":{"type":"string","enum":["LHS","RHS"]},"position":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"segments":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["start","end"]}}},"required":["id","code","side","position"]}},"junction":{"type":"object","properties":{"form":{"type":"string","minLength":1,"maxLength":60},"cls":{"type":"string","minLength":1,"maxLength":60}},"required":["form","cls"]},"stagePlanId":{"type":"string","minLength":1},"source":{"default":null,"anyOf":[{"type":"object","properties":{"docId":{"type":"string","minLength":1},"docVersion":{"type":"string","minLength":1},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"originalValue":{"type":"string"},"confirmedValue":{"type":"string"},"overrideReason":{"type":"string"}},"required":["docId","docVersion","page"]},{"type":"null"}]},"review":{"default":"PROPOSED","type":"string","enum":["PROPOSED","REVIEWED","EXCLUDED"]},"excludeReason":{"type":"string","maxLength":500},"lifecycle":{"default":"DRAFT","type":"string","enum":["DRAFT","ACTIVE","SUPERSEDED","ARCHIVED"]}},"required":["code","cls","geometry","stagePlanId"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"baseComponentsRevision","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"version","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"featureKey","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"tags":["feature-configs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"baseComponentsRevision","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"version","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"featureKey","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/feature-configs/{version}/stage-plans/{planKey}":{"put":{"tags":["feature-configs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"stages":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":60},"label":{"type":"string","minLength":1,"maxLength":200},"prereq":{"default":[],"maxItems":20,"type":"array","items":{"type":"string"}},"testCodes":{"default":[],"maxItems":20,"type":"array","items":{"type":"string"}}},"required":["code","label"]}}},"required":["label","stages"]}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"baseComponentsRevision","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"version","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"planKey","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"tags":["feature-configs"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"baseComponentsRevision","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"version","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"planKey","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/configurator":{"get":{"tags":["feature-configs"],"description":"The whole Project Configurator state for one version.\n\nReturns the draft envelope, the features and stage plans, the project as it\nstands today, the RESOLVED configuration (live rows with the draft's proposals\napplied) and the step-by-step evaluation — statuses, prerequisites, stale steps,\nfindings routed to the exact step and field that must change, and the activation\nverdict.\n\nOmit `version` and the server opens the right one: the DRAFT if work is in\nprogress, otherwise the version in force. A project that has never been\nconfigured answers `{ state: null }` rather than 404 — that is a project\nwaiting to be configured, not a missing one.","parameters":[{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"query","name":"version","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/config-recipes":{"get":{"tags":["feature-configs"],"description":"The setup recipes a configuration draft can start from: complete,\nvalidated starting points from a two-layer service road to a full expressway\nwith structures, drains and junctions. Static; any member may read them.","responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/feature-configs/{version}/recipe":{"post":{"tags":["feature-configs"],"description":"Apply a setup recipe to an open DRAFT (ADMIN only).\n\nThe same writes the configurator's recipe picker makes: the recipe's tests are\ncreated in the catalogue (a code the project already has is left untouched),\nthen the draft's layers, test applicability, controls and sources in one\npatch, then stage plans, then components fitted to the road — all PROPOSED in\nthe draft, nothing on the live project. Failures are reported per record in\n`failed`, never half-hidden. 409 RECIPE_DOES_NOT_FIT when the road is too\nshort for the recipe's components.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipeId":{"type":"string","minLength":1,"maxLength":80}},"required":["recipeId"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"version","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/feature-configs/{version}/discard":{"post":{"tags":["feature-configs"],"description":"Abandon an open DRAFT and everything in it (ADMIN only).\n\nOnly a DRAFT can be discarded, so nothing that ever governed an RFI is\ndestroyed. Without this, one abandoned draft blocked every future amendment on\nthe project — DRAFT_EXISTS with no way out through any interface.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"version","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/feature-configs/{version}/activate":{"post":{"tags":["feature-configs"],"description":"Activate a configuration version.\n\nValidates first: any ERROR finding blocks activation with 409\nCONFIG_VALIDATION_FAILED carrying `details.findings`. On success the incumbent\nACTIVE version is superseded and this one promoted, in ONE transaction — a\npartial unique index on (project_id) WHERE state='ACTIVE' is the backstop if two\nactivations race. Re-activating the version already in force is a 200 no-op, so\nno Idempotency-Key is required.\n\nRFIs already raised keep their raise-time featureRef snapshot: activation never\nrewrites what an existing inspection was raised against.\n\nSend `baseRevision` (the revision the author reviewed) and a draft that changed\nsince is refused with 409 CONFIG_DRAFT_CHANGED rather than activated unseen.","requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"baseRevision":{"type":"string","minLength":1,"maxLength":64},"baseComponentsRevision":{"type":"string","minLength":1,"maxLength":64}}},{"type":"null"}]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"version","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/bundle":{"get":{"tags":["projects"],"description":"The complete v1 read model for a project in a single round trip.","parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/rfis":{"get":{"tags":["rfis"],"parameters":[{"schema":{"type":"string","enum":["RAISED","IN_TESTING","SUBMITTED","APPROVED","REJECTED"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["EW","GSB","DLC","PQC"]},"in":"query","name":"layer","required":false},{"schema":{"type":"string","enum":["LHS","RHS"]},"in":"query","name":"side","required":false},{"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"in":"query","name":"from","required":false},{"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"in":"query","name":"to","required":false},{"schema":{"type":"string"},"in":"query","name":"updatedSince","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"isHistory","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"default":50,"type":"integer","minimum":1,"maximum":200},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"tags":["rfis"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chainageStart":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"chainageEnd":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"side":{"type":"string","enum":["LHS","RHS","BOTH"]},"layer":{"type":"string","minLength":1,"maxLength":32},"assignedTo":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"testCodes":{"type":"array","items":{"type":"string"}},"featureRef":{"type":"object","properties":{"featureId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"stage":{"type":"string","minLength":1}},"required":["featureId","stage"]}},"required":["chainageStart","chainageEnd","side","layer","assignedTo"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/rfis/{seq}":{"get":{"tags":["rfis"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"seq","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/metadata":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/options":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["projects","roads","people","layers"]},"search":{"default":"","type":"string","maxLength":150},"projectIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"selectedIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","maxLength":100}},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000}},"required":["kind"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/query":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"definition":{},"offset":{"default":0,"type":"integer","minimum":0,"maximum":1000000},"limit":{"default":100,"type":"integer","minimum":1,"maximum":200}},"required":["definition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/rfis/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/saved":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"definition":{},"revision":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","definition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/saved/{id}":{"put":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"definition":{},"revision":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name","definition"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/runs":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"definition":{},"requestKey":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["definition","requestKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/runs/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/runs/{id}/query":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"offset":{"default":0,"type":"integer","minimum":0,"maximum":1000000},"limit":{"default":100,"type":"integer","minimum":1,"maximum":200}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/runs/{id}/rows/{rowId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"rowId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/runs/{id}/exports":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","enum":["csv","xlsx"]}},"required":["format"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/runs/{id}/exports/{exportId}":{"delete":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"exportId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/reporting/runs/{id}/exports/{exportId}/download":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"exportId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/rfis/{seq}/cancel":{"post":{"tags":["rfis"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"seq","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/rfis/{seq}/tests":{"post":{"tags":["rfis"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"testCodes":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["testCodes"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"seq","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/rfis/{seq}/decision":{"post":{"tags":["rfis"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["APPROVE","REJECT"]},"remarks":{"type":"string"}},"required":["decision","remarks"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"seq","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/rfis/{seq}/results/manual":{"post":{"tags":["rfis"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"testCode":{"type":"string","minLength":1},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}}},"required":["testCode","values"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"seq","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/results/{displayId}/fields":{"patch":{"tags":["results"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"edits":{"minItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"]}}},"required":["edits"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"displayId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/results/{displayId}/confirm":{"post":{"tags":["results"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"displayId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/rfis/{seq}/results/{testCode}/documents":{"post":{"tags":["documents","results"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"docKey":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":255},"sizeBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["docKey","filename","contentType","sizeBytes","sha256"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"in":"path","name":"seq","required":true},{"schema":{"type":"string","minLength":1},"in":"path","name":"testCode","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/documents/{documentId}/complete":{"post":{"tags":["documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uploaded":{"type":"boolean","enum":[true]},"reductoUploaded":{"type":"boolean","enum":[true]}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/documents/{documentId}":{"get":{"tags":["documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/documents/{documentId}/review":{"patch":{"tags":["documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"corrections":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["corrections"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/documents/{documentId}/confirm":{"post":{"tags":["documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/projects/{projectId}/documents/{documentId}/retry":{"post":{"tags":["documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/sources/documents":{"post":{"tags":["sources"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"title":{"type":"string","minLength":1,"maxLength":300},"kind":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"versionLabel":{"type":"string","maxLength":60},"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":255},"sizeBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["projectId","title","filename","contentType","sizeBytes","sha256"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}},"get":{"tags":["sources"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"includeArchived","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/v1/sources/documents/{documentId}/complete":{"post":{"tags":["sources"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/sources/documents/{documentId}":{"get":{"tags":["sources"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/sources/documents/{documentId}/pages":{"get":{"tags":["sources"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"from","required":true,"description":"First page to read (1-based)."},{"schema":{"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"to","required":true,"description":"Last page to read, inclusive. At most 20 pages are returned per call; nextPage says where to continue."},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/sources/search":{"get":{"tags":["sources"],"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":200},"in":"query","name":"q","required":true,"description":"Words or an exact phrase in quotes; also matches identifiers such as \"IS: 2720\" or \"120+500\" literally."},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false,"description":"The project whose documents to search. Omit for the organisation intake set (administrators)."},{"schema":{"type":"string","maxLength":2000},"in":"query","name":"documentIds","required":false,"description":"Comma-separated document ids to restrict the search to."},{"schema":{"default":10,"type":"integer","minimum":1,"maximum":25},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/v1/sources/documents/{documentId}/archive":{"post":{"tags":["sources"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/sources/documents/{documentId}/retry":{"post":{"tags":["sources"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"documentId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/sources/analyses":{"post":{"tags":["sources"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The project the documents belong to, or null for an intake set (a new project)."},"documentIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"Documents to analyse together; all must have been read (state READY)."}},"required":["projectId","documentIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}},"get":{"tags":["sources"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"includeArchived","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/v1/sources/analyses/{id}":{"get":{"tags":["sources"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/sources/analyses/{id}/cancel":{"post":{"tags":["sources"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/sources/analyses/{id}/review":{"post":{"tags":["sources"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decisions":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","maxLength":40},"decision":{"anyOf":[{"type":"string","enum":["use","leave","noted"]},{"type":"null"}]},"edit":{"type":"object","properties":{"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]},"code":{"type":"string","maxLength":120},"label":{"type":"string","maxLength":300},"subtype":{"type":"string","maxLength":60},"side":{"type":"string","enum":["LHS","RHS","CROSS"]},"chainage":{"type":"integer","minimum":0,"maximum":9007199254740991},"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":0,"maximum":9007199254740991},"frequency":{"type":"string","maxLength":300},"ordinal":{"type":"integer","minimum":1,"maximum":1000}},"additionalProperties":false}},"required":["itemId","decision"],"additionalProperties":false}}},"required":["decisions"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/sources/analyses/{id}/apply":{"post":{"tags":["sources"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"itemIds":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","maxLength":40}},"edits":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"object","properties":{"value":{"anyOf":[{"type":"string","maxLength":500},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]},"code":{"type":"string","maxLength":120},"label":{"type":"string","maxLength":300},"subtype":{"type":"string","maxLength":60},"side":{"type":"string","enum":["LHS","RHS","CROSS"]},"chainage":{"type":"integer","minimum":0,"maximum":9007199254740991},"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":0,"maximum":9007199254740991},"frequency":{"type":"string","maxLength":300},"ordinal":{"type":"integer","minimum":1,"maximum":1000}},"additionalProperties":false}},"project":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":40},"name":{"type":"string","minLength":1,"maxLength":500},"rfiIdPrefix":{"type":"string","minLength":1,"maxLength":60},"timezone":{"type":"string","minLength":1,"maxLength":60}},"required":["code"],"additionalProperties":false},"asNewProject":{"type":"boolean"}},"required":["itemIds"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/org/api-keys":{"post":{"tags":["org"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["rfis:read","results:read"]}},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"expiresAt":{"type":"string"}},"required":["name","scopes"]}}}},"responses":{"200":{"description":"Default Response"}}},"get":{"tags":["org"],"responses":{"200":{"description":"Default Response"}}}},"/v1/org/api-keys/{id}":{"delete":{"tags":["org"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/org/members":{"get":{"tags":["org"],"responses":{"200":{"description":"Default Response"}}}},"/v1/org/members/{userId}":{"patch":{"tags":["org"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["QS","ENGINEER","APPROVER","ADMIN"]},"status":{"type":"string","enum":["active","disabled"]}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/org/members/{userId}/memberships/{projectId}":{"put":{"tags":["org"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["QS","ENGINEER","APPROVER","ADMIN"]}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"tags":["org"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"userId","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/org/invitations":{"post":{"tags":["org"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["qs","engineer","approver","admin"]}},"required":["email","role"]}}}},"responses":{"200":{"description":"Default Response"}}},"get":{"tags":["org"],"responses":{"200":{"description":"Default Response"}}}},"/v1/org/invitations/{workosInvitationId}":{"delete":{"tags":["org"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"workosInvitationId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/org/audit":{"get":{"tags":["org"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"entityType","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"entityId","required":false},{"schema":{"type":"string","minLength":1,"maxLength":64},"in":"query","name":"action","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"actorUserId","required":false},{"schema":{"type":"string"},"in":"query","name":"from","required":false},{"schema":{"type":"string"},"in":"query","name":"to","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"default":50,"type":"integer","minimum":1,"maximum":200},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/projects/{projectId}/road-status":{"get":{"parameters":[{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"from","required":false,"description":"Start of the stretch in metres (e.g. 42+500 is 42500). Omit for the road start."},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"to","required":false,"description":"End of the stretch in metres. Omit for the road end."},{"schema":{"type":"string","enum":["LHS","RHS"]},"in":"query","name":"side","required":false,"description":"Omit for both sides."},{"schema":{"type":"string","maxLength":40},"in":"query","name":"layer","required":false,"description":"A pavement layer code. Omit for every layer."},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/projects/{projectId}/progress":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/projects":{"get":{"parameters":[{"schema":{"default":"","type":"string","maxLength":150},"in":"query","name":"search","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/projects/{projectId}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/search":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"search":{"type":"string","maxLength":150},"status":{"type":"string","enum":["RAISED","IN_TESTING","SUBMITTED","APPROVED","REJECTED"]},"layer":{"type":"string","maxLength":40},"side":{"type":"string","enum":["LHS","RHS"]},"assignedToId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mine":{"type":"boolean"},"overdue":{"type":"boolean"},"changedInLastDays":{"type":"integer","minimum":1,"maximum":365},"offset":{"default":0,"type":"integer","minimum":0,"maximum":100000},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/projects/{projectId}/health":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"projectId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/navigation":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"destination":{"type":"string","enum":["projects","overview","road","inspections","rfi","tests","queue","progress","reports","configuration","catalogue","people","settings","audit","documents","document","analysis","intake"]},"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"seq":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"documentId":{"description":"For destination \"document\": which document to open.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"page":{"description":"For destination \"document\": the page to open at.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"analysisId":{"description":"For destination \"analysis\": the analysis to review.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"stretch":{"description":"For destination \"road\": a stretch (metres) to select and show.","type":"object","properties":{"from":{"type":"integer","minimum":0,"maximum":9007199254740991},"to":{"type":"integer","minimum":0,"maximum":9007199254740991},"side":{"type":"string","enum":["LHS","RHS","BOTH"]},"layer":{"type":"string","maxLength":40}},"required":["from","to"],"additionalProperties":false}},"required":["destination"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/actions/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/capabilities":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/conversations":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"projectId","required":false}],"responses":{"200":{"description":"Default Response"}}},"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["projectId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/conversations/{id}":{"get":{"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/runtime/start":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"context":{"type":"object","properties":{"path":{"type":"string","maxLength":300,"pattern":"^\\/(?!\\/)[^?#]*$"},"surface":{"type":"string","enum":["global","command","contextual","form"]},"projectId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"rfiSeq":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"featureId":{"type":"string","maxLength":120},"resultId":{"type":"string","maxLength":160},"reportDefinition":{},"reportRunId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"historicalAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"selection":{"type":"object","properties":{"start":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"side":{"type":"string","enum":["LHS","RHS","BOTH"]},"layer":{"type":"string","maxLength":40}},"required":["start","end","side","layer"],"additionalProperties":false},"visibleRfiIds":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":160}},"filters":{"type":"object","properties":{"layers":{"maxItems":60,"type":"array","items":{"type":"string","maxLength":40}},"sides":{"maxItems":2,"type":"array","items":{"type":"string","enum":["LHS","RHS"]}},"search":{"type":"string","maxLength":150},"status":{"type":"string","maxLength":20},"assignee":{"type":"string","maxLength":150},"withinDays":{"type":"integer","minimum":0,"maximum":3660},"includeHistory":{"type":"boolean"},"sortKey":{"type":"string","maxLength":40},"sortDir":{"type":"string","enum":["asc","desc"]}},"required":["layers","sides"],"additionalProperties":false},"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentPage":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"analysisId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"view":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"tab":{"type":"string","maxLength":80},"focus":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":40},"id":{"type":"string","minLength":1,"maxLength":160},"label":{"type":"string","maxLength":160}},"required":["kind","id"],"additionalProperties":false},"selected":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":40},"id":{"type":"string","minLength":1,"maxLength":160},"label":{"type":"string","maxLength":160}},"required":["kind","id"],"additionalProperties":false}},"visible":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":40},"items":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":40},"id":{"type":"string","minLength":1,"maxLength":160},"label":{"type":"string","maxLength":160}},"required":["kind","id"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","items"],"additionalProperties":false},"notices":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":240}},"facts":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":160},{"type":"number"},{"type":"boolean"}]}}},"required":["title"],"additionalProperties":false},"panel":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"tab":{"type":"string","maxLength":80},"focus":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":40},"id":{"type":"string","minLength":1,"maxLength":160},"label":{"type":"string","maxLength":160}},"required":["kind","id"],"additionalProperties":false},"selected":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":40},"id":{"type":"string","minLength":1,"maxLength":160},"label":{"type":"string","maxLength":160}},"required":["kind","id"],"additionalProperties":false}},"visible":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":40},"items":{"maxItems":30,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":40},"id":{"type":"string","minLength":1,"maxLength":160},"label":{"type":"string","maxLength":160}},"required":["kind","id"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","items"],"additionalProperties":false},"notices":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":240}},"facts":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":40},"additionalProperties":{"anyOf":[{"type":"string","maxLength":160},{"type":"number"},{"type":"boolean"}]}}},"required":["title"],"additionalProperties":false}},"required":["path","surface","projectId"],"additionalProperties":false},"message":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"text":{"type":"string","minLength":1,"maxLength":8000}},"required":["id","text"],"additionalProperties":false},"mode":{"type":"string","enum":["ask","agent"]}},"required":["conversationId","context","message"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/runtime/{id}/append":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entries":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"kind":{"type":"string","enum":["assistant","tool_results"]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant","user"]},"content":{"minItems":1,"maxItems":2000,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["role","content"],"additionalProperties":false},"results":{"type":"object","propertyNames":{"type":"string","maxLength":100},"additionalProperties":{}},"model":{"type":"string","maxLength":150},"stopReason":{"type":"string","maxLength":40}},"required":["id","kind","at","message"],"additionalProperties":false}}},"required":["runId","entries"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/runtime/{id}/finish":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"outcome":{"type":"string","enum":["completed","cancelled","model_error"]},"model":{"type":"string","maxLength":150},"durationMs":{"type":"integer","minimum":0,"maximum":900000},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheReadTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cacheWriteTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"failureCategory":{"type":"string","enum":["AI_AUTH","AI_ACCESS","AI_CREDITS","MODEL_RATE_LIMIT","MODEL_OVERLOADED","MODEL_TIMEOUT","MODEL_REFUSAL","MODEL_CONTEXT","MODEL_TRUNCATED","MODEL_ERROR"]}},"required":["runId","outcome","model","durationMs"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/invoke":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"capability":{"type":"string","maxLength":80},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["conversationId","capability","input"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}}},"/v1/coworker/actions/{id}/review":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean"},"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["approve"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}}},"servers":[{"url":"http://localhost:8002","description":"Local development"}],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}]}