> For the complete documentation index, see [llms.txt](https://docs.rootcause.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rootcause.ai/api-and-integrations/rest-api-reference/ontology.md).

# Ontology

## List ontology concepts

> Lists ontology concepts for the workspace. Paginated (limit, cursor). Optional query param sourceId filters to concepts that have a field mapping for that source. Read from platform MongoDB (ontologyConcepts collection). Concepts are created by ontology extraction on sources or manually via POST.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Ontology"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"OntologyConceptListEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OntologyConcept"}},"pagination":{"type":"object","properties":{"cursor":{"type":"string","description":"Pass back as ?cursor= to fetch the next page"},"hasMore":{"type":"boolean","description":"Whether a further page exists"},"total":{"type":"number","description":"Total matching rows, when the query can count them"}},"required":["hasMore"]}},"required":["data","pagination"]},"OntologyConcept":{"type":"object","properties":{"id":{"type":"string"},"organisationId":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"conceptClassification":{"anyOf":[{"$ref":"#/components/schemas/ConceptClassificationEnum"},{"type":"null"}]},"anchorConceptLinks":{"type":"array","items":{"type":"string"},"default":[]},"schemaFieldName":{"type":"string"},"schemaType":{"$ref":"#/components/schemas/SchemaMainTypeEnum"},"schemaSubtype":{"anyOf":[{"$ref":"#/components/schemas/SchemaSubTypeEnum"},{"type":"null"}]},"metadata":{"$ref":"#/components/schemas/ConceptMetadataSchema"},"lockedMetadataFields":{"type":"array","items":{"type":"string"}},"detectedMetadata":{"anyOf":[{"$ref":"#/components/schemas/ConceptMetadataSchema"},{"type":"null"}]},"fieldMappings":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"field":{"type":"string"},"status":{"$ref":"#/components/schemas/BindingStatusEnum","default":"confirmed"},"source":{"$ref":"#/components/schemas/BindingSourceEnum","default":"ingest"},"confidence":{"type":["number","null"]},"evidence":{"type":["string","null"]},"valueMap":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"string"}]}},{"allOf":[{},{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"string"}]}}]}]},{"type":"null"}]},"canonicalField":{"type":["string","null"]},"scopeFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"precedence":{"type":["number","null"]},"keyRole":{"anyOf":[{"$ref":"#/components/schemas/KeyRoleEnum"},{"type":"null"}]},"conformance":{"anyOf":[{"$ref":"#/components/schemas/ConformanceReportSchema"},{"type":"null"}]},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]}},"required":["sourceId","field"]}},"derivedInfo":{"anyOf":[{"$ref":"#/components/schemas/DerivedConceptInfoSchema"},{"type":"null"}]},"conceptKind":{"$ref":"#/components/schemas/ConceptKindEnum","default":"standard"},"metricSql":{"type":["string","null"]},"relationshipRules":{"type":"array","items":{"$ref":"#/components/schemas/RelationshipRuleSchema"},"default":[]},"temporalPrerequisites":{"type":"array","items":{"type":"string"},"default":[]},"suggestedRole":{"anyOf":[{"$ref":"#/components/schemas/SuggestedRoleEnum"},{"type":"null"}]},"trustTier":{"anyOf":[{"type":"string","enum":["exploratory","curated_pending","curated"]},{"type":"null"}]},"ontologyRef":{"anyOf":[{"type":"object","properties":{"ontologyId":{"type":"string"},"ontologyVersion":{"type":"string"},"canonicalId":{"type":"string"},"installScope":{"anyOf":[{"type":"object","properties":{"conceptCanonicalIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"filters":{"type":"array","items":{"type":"object","properties":{"conceptRef":{"type":"string"},"values":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"start":{"type":["string","null"]},"end":{"type":["string","null"]}},"required":["conceptRef"]},"default":[]}}},{"type":"null"}]}},"required":["ontologyId","ontologyVersion","canonicalId"]},{"type":"null"}]},"layerIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"},"default":[]},"valueMappings":{"type":"array","items":{"$ref":"#/components/schemas/ConceptValueMappingSchema"},"default":[]},"lockedConceptFields":{"type":"array","items":{"type":"string"}},"detectedConceptStructure":{"anyOf":[{"$ref":"#/components/schemas/DetectedConceptStructureSchema"},{"type":"null"}]},"lastEditedBy":{"type":["string","null"]},"lastEditedAt":{"type":["string","null"]},"lineageDrift":{"type":["boolean","null"]},"editVersion":{"type":"integer","minimum":0,"default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organisationId","workspaceId","name","schemaFieldName","schemaType","metadata","fieldMappings"]},"ConceptClassificationEnum":{"type":"string","enum":["identifier","location","time"]},"SchemaMainTypeEnum":{"type":"string","enum":["None","String","Category","Number","Boolean","DateTime","Array","Unknown"]},"SchemaSubTypeEnum":{"type":"string","enum":["Integer","Float","UnsignedInteger","UnsignedFloat","String","Number","Category","Boolean","DateTime"]},"ConceptMetadataSchema":{"type":"object","properties":{"categories":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"minValue":{"type":["number","null"]},"maxValue":{"type":["number","null"]},"isMonotonicallyIncreasing":{"type":["boolean","null"]},"isMonotonicallyDecreasing":{"type":["boolean","null"]},"isUnique":{"type":["boolean","null"]},"isCyclic":{"type":["boolean","null"]},"isHeterogeneousIdentifier":{"type":["boolean","null"]},"compositeScopeConceptId":{"type":["string","null"]},"isUniformDistribution":{"type":["boolean","null"]},"locationType":{"anyOf":[{"$ref":"#/components/schemas/AnchorLocationTypeEnum"},{"type":"null"}]},"coordinateFormat":{"anyOf":[{"$ref":"#/components/schemas/CoordinateFormatEnum"},{"type":"null"}]},"coordinateDatum":{"anyOf":[{"$ref":"#/components/schemas/CoordinateDatumEnum"},{"type":"null"}]},"coordinatePairConceptId":{"type":["string","null"]},"locationDetectionSource":{"anyOf":[{"$ref":"#/components/schemas/LocationDetectionSourceEnum"},{"type":"null"}]},"latitudeInRangeFraction":{"type":["number","null"]},"longitudeInRangeFraction":{"type":["number","null"]},"fractionalPartFraction":{"type":["number","null"]},"coordinatePairFraction":{"type":["number","null"]},"dmsCoordinateFraction":{"type":["number","null"]},"postalCodeFraction":{"type":["number","null"]},"addressShapeFraction":{"type":["number","null"]},"enrichments":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EnrichmentRecordSchema"}},{"type":"null"}]},"geoEnrichmentStatus":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentStatusEnum"},{"type":"null"}]},"geoEnrichmentKind":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentKindEnum"},{"type":"null"}]},"geoEnrichedAt":{"type":["string","null"]},"geoEnrichmentVersion":{"type":["number","null"]},"geoSidecarKey":{"type":["string","null"]},"geoDistinctTotal":{"type":["number","null"]},"geoMatchedCount":{"type":["number","null"]},"geoUnmatchedCount":{"type":["number","null"]},"geoTruncated":{"type":["boolean","null"]},"geoEnrichmentError":{"type":["string","null"]},"nanFillStrategy":{"anyOf":[{"$ref":"#/components/schemas/NanFillStrategyEnum"},{"type":"null"}]},"changeRate":{"type":["number","null"]},"dateTimeFormat":{"type":["string","null"]},"displayFormat":{"type":["string","null"]},"averageInterval":{"type":["number","null"]},"isConsistentInterval":{"type":["boolean","null"]},"unit":{"type":["string","null"]},"unitModifier":{"type":["number","null"]},"higherIsBetter":{"type":["boolean","null"]},"isEqualInterval":{"type":["boolean","null"]},"intervalSize":{"type":["number","null"]},"valueClass":{"anyOf":[{"$ref":"#/components/schemas/ValueClassEnum"},{"type":"null"}]},"fracZero":{"type":["number","null"]},"zeroRunLengthP95":{"type":["number","null"]},"nonZeroRunLengthP95":{"type":["number","null"]},"trendSlopePerSecond":{"type":["number","null"]},"trendR2":{"type":["number","null"]},"emailFraction":{"type":["number","null"]},"medianLength":{"type":["number","null"]},"distinctLengthCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"tsGranularity":{"type":["string","null"]},"tsValidGranularities":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"tsTypicalDeltaSeconds":{"type":["number","null"]},"tsSelectedGrid":{"type":["string","null"]},"tsGapProfile":{"anyOf":[{"$ref":"#/components/schemas/GapProfileSchema"},{"type":"null"}]},"tsSeasonalPeriods":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SeasonalPeriodSchema"}},{"type":"null"}]},"tsCategoricalSeasonality":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CategoricalSeasonalPeriodSchema"}},{"type":"null"}]},"tsMissingPatterns":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"tsActiveWindows":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"tsPerEnvProfiles":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TimeSeriesEnvProfileSchema"}},{"type":"null"}]},"tsAnalyzerVersion":{"type":["string","null"]},"tsAnalyzedAt":{"type":["string","null"]},"elementSchemaType":{"anyOf":[{"$ref":"#/components/schemas/SchemaMainTypeEnum"},{"type":"null"}]},"elementCategories":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"sizeStatistics":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]}},"additionalProperties":true},"AnchorLocationTypeEnum":{"type":"string","enum":["latitude","longitude","coordinate","country","region","city","postal_code","address","continent","airport_code","unlocode"]},"CoordinateFormatEnum":{"type":"string","enum":["dd","dms","ddm"]},"CoordinateDatumEnum":{"type":"string","enum":["wgs84","gcj02","bd09"]},"LocationDetectionSourceEnum":{"type":"string","enum":["values","column_name","user"]},"EnrichmentRecordSchema":{"type":"object","properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentStatusEnum"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentKindEnum"},{"type":"null"}]},"enrichedAt":{"type":["string","null"]},"enricherVersion":{"type":["string","null"]},"dataVersion":{"type":["string","null"]},"version":{"type":["number","null"]},"sidecarKey":{"type":["string","null"]},"keyFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"hintFields":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"corroborationFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"latLonPrecision":{"type":["number","null"]},"distinctTotal":{"type":["number","null"]},"matchedCount":{"type":["number","null"]},"unmatchedCount":{"type":["number","null"]},"truncated":{"type":["boolean","null"]},"error":{"type":["string","null"]},"appliedDatum":{"type":["string","null"]}}},"GeoEnrichmentStatusEnum":{"type":"string","enum":["running","completed","partial","failed"]},"GeoEnrichmentKindEnum":{"type":"string","enum":["forward","reverse"]},"NanFillStrategyEnum":{"type":"string","enum":["forward","interpolate","zero","drop","undefined"]},"ValueClassEnum":{"type":"string","enum":["continuous","sparse_event","bursty","binary_indicator"]},"GapProfileSchema":{"type":"object","properties":{"expectedIntervalSeconds":{"type":["number","null"]},"p50GapSeconds":{"type":["number","null"]},"p95GapSeconds":{"type":["number","null"]},"p99GapSeconds":{"type":["number","null"]},"maxGapSeconds":{"type":["number","null"]},"gapCount":{"type":["number","null"]},"largestGapStart":{"type":["string","null"]}}},"SeasonalPeriodSchema":{"type":"object","properties":{"periodSeconds":{"type":"number"},"cycleLabel":{"type":["string","null"]},"strength":{"type":"number"},"confidence":{"type":"number"},"amplitude":{"type":["number","null"]},"phase":{"type":["number","null"]},"order":{"type":"number","default":1}},"required":["periodSeconds","strength","confidence"]},"CategoricalSeasonalPeriodSchema":{"type":"object","properties":{"periodSeconds":{"type":"number"},"cycleLabel":{"type":["string","null"]},"nPhaseBins":{"type":"number"},"cramersV":{"type":"number"},"chi2PerDof":{"type":["number","null"]},"phaseDistribution":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"number"}}},{"type":"null"}]},"levels":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["periodSeconds","nPhaseBins","cramersV"]},"CyclicPatternSchema":{"type":"object","properties":{"cycle":{"$ref":"#/components/schemas/CycleNameEnum"},"activeIndices":{"type":"array","items":{"type":"number"},"default":[]},"inactiveIndices":{"type":"array","items":{"type":"number"},"default":[]},"densityByIndex":{"type":"object","additionalProperties":{"type":"number"},"default":{}},"aggByIndex":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]}},"required":["cycle"]},"CycleNameEnum":{"type":"string","enum":["hour_of_day","day_of_week","day_of_month","month_of_year","week_of_year"]},"TimeSeriesEnvProfileSchema":{"type":"object","properties":{"envKey":{"type":"string"},"tsSeasonalPeriods":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SeasonalPeriodSchema"}},{"type":"null"}]},"tsCategoricalSeasonality":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CategoricalSeasonalPeriodSchema"}},{"type":"null"}]},"tsMissingPatterns":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"tsActiveWindows":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"trendSlopePerSecond":{"type":["number","null"]},"trendR2":{"type":["number","null"]},"tsTypicalDeltaSeconds":{"type":["number","null"]}},"required":["envKey"]},"BindingStatusEnum":{"type":"string","enum":["confirmed","suggested"]},"BindingSourceEnum":{"type":"string","enum":["ingest","statistical","llm","user","install"]},"KeyRoleEnum":{"type":"string","enum":["primary","foreign"]},"ConformanceReportSchema":{"type":"object","properties":{"rowsScanned":{"type":"number"},"nullRate":{"type":"number"},"allowedValueCoverage":{"type":["number","null"]},"unresolvedValues":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"number"}},"required":["value","count"]},"default":[]},"inferredGranularity":{"type":["string","null"]},"granularityMatch":{"type":["boolean","null"]},"duplicateAnchorKeys":{"type":["number","null"]},"unitNote":{"type":["string","null"]},"verdict":{"$ref":"#/components/schemas/ConformanceVerdictEnum","default":"pass"}},"required":["rowsScanned","nullRate"]},"ConformanceVerdictEnum":{"type":"string","enum":["pass","warn","fail"]},"DerivedConceptInfoSchema":{"type":"object","properties":{"formula":{"type":["string","null"]},"formulaBlocks":{"anyOf":[{"oneOf":[{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"template"},"blockType":{"type":"string","minLength":1},"values":{"type":"object","additionalProperties":{}}},"required":["nodeId","kind","blockType"]},{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"structural"},"blockType":{"type":"string","enum":["binary","ifElse"]},"values":{"type":"object","additionalProperties":{}},"children":{"type":"object","additionalProperties":{"anyOf":[{"oneOf":[{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"template"},"blockType":{"type":"string","minLength":1},"values":{"type":"object","additionalProperties":{}}},"required":["nodeId","kind","blockType"]},{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"structural"},"blockType":{"type":"string","enum":["binary","ifElse"]},"values":{"type":"object","additionalProperties":{}},"children":{"type":"object","additionalProperties":{"anyOf":[{},{"type":"null"}]}}},"required":["nodeId","kind","blockType","children"]}],"discriminator":{"propertyName":"kind"}},{"type":"null"}]}}},"required":["nodeId","kind","blockType","children"]}],"discriminator":{"propertyName":"kind"}},{"type":"null"}]},"derivedType":{"$ref":"#/components/schemas/DerivedTypeEnum","default":"manual"},"kind":{"anyOf":[{"$ref":"#/components/schemas/DerivedInfoKindEnum"},{"type":"null"}]},"source":{"anyOf":[{"$ref":"#/components/schemas/DerivedSourceEnum"},{"type":"null"}]},"sourceColumns":{"type":"array","items":{"type":"string"},"default":[]},"expression":{"type":["string","null"]},"r2":{"type":["number","null"]},"isDeterministic":{"type":["boolean","null"]},"lag":{"type":["number","null"]},"cumulativeDirection":{"type":["string","null"]},"sourceDataViewId":{"type":["string","null"]},"operationLineage":{"anyOf":[{"$ref":"#/components/schemas/OperationLineageSchema"},{"type":"null"}]},"viewSnapshot":{"anyOf":[{"$ref":"#/components/schemas/ViewSnapshotSchema"},{"type":"null"}]},"lineageHash":{"type":["string","null"]},"sourceJoinConfig":{"anyOf":[{"$ref":"#/components/schemas/SourceJoinConfigSchema"},{"type":"null"}]}}},"DerivedTypeEnum":{"type":"string","enum":["manual","datetime_component","lag","cumulative","step_change","algebraic_identity","complement","ratio","view_operation"]},"DerivedInfoKindEnum":{"type":"string","enum":["op","formula","detected","join"]},"DerivedSourceEnum":{"type":"string","enum":["user","detected","discovered"]},"OperationLineageSchema":{"type":"object","properties":{"opType":{"$ref":"#/components/schemas/OperationTypeEnum"},"opId":{"type":"string"},"parentColumns":{"type":"array","items":{"type":"string"},"default":[]},"parentConceptIds":{"type":"array","items":{"type":"string"},"default":[]}},"required":["opType","opId"]},"OperationTypeEnum":{"type":"string","enum":["SQL_QUERY","FILTER","AGGREGATE","JOIN","CONCATENATE","SORT","SPLIT_COLUMN","DROP_COLUMNS","REMOVE_DUPLICATES","IMPUTE_NULLS","DROP_NULLS","REPLACE_VALUES","REPLACE_TYPE","INTERPOLATE_TIME","CLIP_OUTLIERS","NORMALIZE_NUMERIC","MAP_CATEGORIES","TIME_SERIES_AGGREGATE","TIME_SERIES_JOIN","TRANSPOSE","FREQUENCY_ANALYSIS","CYCLIC_AGGREGATE","DIFF","DATE_DIFF","CUMULATIVE","ARRAY_DECOMPOSE","ARRAY_CONSOLIDATE","ARRAY_EXPLODE","ARRAY_AGGREGATE","JSON_FLATTEN"]},"ViewSnapshotSchema":{"type":"object","properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceSchema"}},"operations":{"type":"array","items":{"$ref":"#/components/schemas/OperationSchema"}},"outputColumn":{"type":"string"}},"required":["sources","operations","outputColumn"]},"SourceSchema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"DATASET"},"name":{"type":["string","null"]},"conceptIds":{"type":"array","items":{"type":"string"}},"conceptVersions":{"anyOf":[{"type":"object","additionalProperties":{"type":"integer","minimum":0}},{"type":"null"}]},"version":{"anyOf":[{"$ref":"#/components/schemas/SourcePinSchema"},{"type":"null"}]}},"required":["id","type","conceptIds"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"DATA_VIEW"},"name":{"type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"CONCEPT"},"name":{"type":["string","null"]},"prioritiseCalculation":{"type":"boolean","default":true},"showCalculationColumns":{"type":"boolean","default":false}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"GEO_SIDECAR"},"name":{"type":["string","null"]},"conceptId":{"type":"string"},"sidecarKey":{"type":"string"}},"required":["id","type","conceptId","sidecarKey"]}],"discriminator":{"propertyName":"type"}},"SourcePinSchema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"latest"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"pinned"},"versionId":{"type":"string"}},"required":["kind","versionId"]}],"discriminator":{"propertyName":"kind"}},"OperationSchema":{"type":"object","properties":{"id":{"type":"string"},"sourceId":{"type":"string"},"config":{"$ref":"#/components/schemas/OperationConfigSchema"}},"required":["id","sourceId","config"]},"OperationConfigSchema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"FILTER"},"filterGroup":{"anyOf":[{"$ref":"#/components/schemas/FilterSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]}},"required":["type","filterGroup"]},{"type":"object","properties":{"type":{"type":"string","const":"AGGREGATE"},"groupByColumns":{"type":"array","items":{"type":"string"}},"aggregations":{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}}},"required":["type","groupByColumns","aggregations"]},{"type":"object","properties":{"type":{"type":"string","const":"JOIN"},"joinType":{"$ref":"#/components/schemas/JoinTypeEnum"},"columnPairs":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/JoinColumnPairSchema"}},{"type":"null"}]},"leftField":{"type":["string","null"]},"rightField":{"type":["string","null"]},"conflictResolution":{"$ref":"#/components/schemas/JoinConflictResolutionEnum"},"leftPrefix":{"type":["string","null"]},"rightPrefix":{"type":["string","null"]}},"required":["type","joinType","conflictResolution"]},{"type":"object","properties":{"type":{"type":"string","const":"CONCATENATE"},"topSource":{"type":["string","null"]},"bottomSource":{"type":["string","null"]},"sources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"columnMapping":{"type":"object","additionalProperties":{"type":"string"}},"unmatchedRule":{"$ref":"#/components/schemas/UnmatchedRuleEnum"},"discriminatorColumn":{"type":["string","null"]},"discriminatorValues":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["type","columnMapping","unmatchedRule"]},{"type":"object","properties":{"type":{"type":"string","const":"SORT"},"sortColumns":{"type":"array","items":{"$ref":"#/components/schemas/SortColumnSchema"}}},"required":["type","sortColumns"]},{"type":"object","properties":{"type":{"type":"string","const":"SQL_QUERY"},"query":{"type":"string"},"columnSourceAliases":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["type","query"]},{"type":"object","properties":{"type":{"type":"string","const":"SPLIT_COLUMN"},"columnToSplit":{"type":"string"},"splitType":{"$ref":"#/components/schemas/SplitTypeEnum"},"delimiter":{"type":["string","null"]},"columns":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/NewColumnDefinitionSchema"}},{"type":"null"}]}},"required":["type","columnToSplit","splitType"]},{"type":"object","properties":{"type":{"type":"string","const":"DROP_COLUMNS"},"columns":{"type":"array","items":{"type":"string"}}},"required":["type","columns"]},{"type":"object","properties":{"type":{"type":"string","const":"REMOVE_DUPLICATES"},"column":{"type":["string","null"]},"keep":{"$ref":"#/components/schemas/KeepEnum","default":"first"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"IMPUTE_NULLS"},"method":{"$ref":"#/components/schemas/ImputeMethodEnum","default":"constant"},"column":{"type":["string","null"]},"fillValue":{"anyOf":[{"type":["string","number","boolean"]},{"type":"null"}]},"imputations":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"method":{"$ref":"#/components/schemas/ImputeMethodEnum","default":"constant"},"fillValue":{"anyOf":[{"type":["string","number","boolean"]},{"type":"null"}]}},"required":["column"]}},{"type":"null"}]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"DROP_NULLS"},"axis":{"type":"string","enum":["rows","empty_columns"],"default":"rows"},"column":{"type":["string","null"]},"columns":{"type":"array","items":{"type":"string"},"default":[]},"nullThresholdPercent":{"type":"number","default":100}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"REPLACE_VALUES"},"column":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":["string","null"]}}},"required":["type","column","mapping"]},{"type":"object","properties":{"type":{"type":"string","const":"REPLACE_TYPE"},"changes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"toType":{"$ref":"#/components/schemas/SchemaMainTypeEnum"},"toSubType":{"anyOf":[{"$ref":"#/components/schemas/SchemaSubTypeEnum"},{"type":"null"}]},"dateFormat":{"type":["string","null"]}},"required":["column","toType"]}},{"type":"null"}]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"INTERPOLATE_TIME"},"column":{"type":"string"},"frequency":{"type":"string"},"method":{"$ref":"#/components/schemas/InterpolateTimeMethodEnum"}},"required":["type","column","frequency","method"]},{"type":"object","properties":{"type":{"type":"string","const":"CLIP_OUTLIERS"},"column":{"type":"string"},"lowerQuantile":{"type":"number","default":0.05},"upperQuantile":{"type":"number","default":0.95}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"NORMALIZE_NUMERIC"},"column":{"type":"string"},"method":{"$ref":"#/components/schemas/NormalizeNumericMethodEnum","default":"z_score"}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"MAP_CATEGORIES"},"column":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}},"defaultValue":{"type":["string","null"]}},"required":["type","column","mapping"]},{"type":"object","properties":{"type":{"type":"string","const":"TIME_SERIES_AGGREGATE"},"timeColumn":{"type":"string"},"granularity":{"type":"string","enum":["nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"]},"aggregations":{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}},"dateFormat":{"anyOf":[{"$ref":"#/components/schemas/DatetimeFormatSchema"},{"type":"null"}]}},"required":["type","timeColumn","granularity","aggregations"]},{"type":"object","properties":{"type":{"type":"string","const":"TIME_SERIES_JOIN"},"joinType":{"$ref":"#/components/schemas/JoinTypeEnum"},"leftTimeColumn":{"type":"string"},"rightTimeColumn":{"type":"string"},"rightSource":{"type":"string"},"strategy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"exact"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"granularity"},"granularity":{"type":"string","enum":["nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"]}},"required":["type","granularity"]},{"type":"object","properties":{"type":{"type":"string","const":"asOf"},"direction":{"$ref":"#/components/schemas/AsOfDirectionEnum"},"tolerance":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"unit":{"$ref":"#/components/schemas/ToleranceUnitEnum"}},"required":["value","unit"]},{"type":"null"}]}},"required":["type","direction"]},{"type":"object","properties":{"type":{"type":"string","const":"interval"},"leftEndColumn":{"type":"string"}},"required":["type","leftEndColumn"]}],"discriminator":{"propertyName":"type"}},"exactMatchKeys":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"leftField":{"type":"string"},"rightField":{"type":"string"}},"required":["leftField","rightField"]}},{"type":"null"}]},"multiMatch":{"$ref":"#/components/schemas/MultiMatchStrategyEnum"},"multiMatchAggregations":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}},{"type":"null"}]}},"required":["type","joinType","leftTimeColumn","rightTimeColumn","rightSource","strategy","multiMatch"]},{"type":"object","properties":{"type":{"type":"string","const":"TRANSPOSE"},"timeColumn":{"type":"string"},"envColumns":{"type":"array","items":{"type":"string"}},"valueColumns":{"type":"array","items":{"type":"string"}},"columnTemplate":{"type":"string"},"joinStrategy":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"exact"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"granularity"},"granularity":{"type":"string","enum":["nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"]}},"required":["type","granularity"]},{"type":"object","properties":{"type":{"type":"string","const":"asOf"},"direction":{"$ref":"#/components/schemas/AsOfDirectionEnum"},"tolerance":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"unit":{"$ref":"#/components/schemas/ToleranceUnitEnum"}},"required":["value","unit"]},{"type":"null"}]}},"required":["type","direction"]}],"discriminator":{"propertyName":"type"}},{"type":"null"}]}},"required":["type","timeColumn","envColumns","valueColumns","columnTemplate"]},{"type":"object","properties":{"type":{"type":"string","const":"FREQUENCY_ANALYSIS"},"timeColumn":{"type":"string"},"valueColumns":{"type":"array","items":{"type":"string"}},"method":{"$ref":"#/components/schemas/FrequencyMethodEnum"},"windowFunction":{"$ref":"#/components/schemas/FrequencyWindowFunctionEnum","default":"hann"},"windowSize":{"type":["number","null"]},"overlap":{"type":"number","default":0.5},"samplingRateHz":{"type":["number","null"]},"outputFormat":{"$ref":"#/components/schemas/FrequencyOutputFormatEnum"},"frequencyRange":{"anyOf":[{"type":"object","properties":{"minHz":{"type":["number","null"]},"maxHz":{"type":["number","null"]}}},{"type":"null"}]},"frequencyUnit":{"$ref":"#/components/schemas/FrequencyUnitEnum","default":"hz"}},"required":["type","timeColumn","valueColumns","method","outputFormat"]},{"type":"object","properties":{"type":{"type":"string","const":"CYCLIC_AGGREGATE"},"timeColumn":{"type":"string"},"cycleComponent":{"$ref":"#/components/schemas/CyclicComponentEnum"},"aggregations":{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}}},"required":["type","timeColumn","cycleComponent","aggregations"]},{"type":"object","properties":{"type":{"type":"string","const":"DIFF"},"timeColumn":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"partitionColumns":{"type":"array","items":{"type":"string"},"default":[]},"outputSuffix":{"type":"string","default":"_diff"},"replaceColumns":{"type":"boolean","default":false}},"required":["type","timeColumn","columns"]},{"type":"object","properties":{"type":{"type":"string","const":"DATE_DIFF"},"startColumn":{"type":"string"},"endColumn":{"type":"string"},"unit":{"$ref":"#/components/schemas/DateDiffUnitEnum","default":"days"},"sign":{"$ref":"#/components/schemas/DateDiffSignEnum","default":"signed"},"outputColumn":{"type":["string","null"]}},"required":["type","startColumn","endColumn"]},{"type":"object","properties":{"type":{"type":"string","const":"CUMULATIVE"},"timeColumn":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"partitionColumns":{"type":"array","items":{"type":"string"},"default":[]},"outputSuffix":{"type":"string","default":"_cumsum"},"replaceColumns":{"type":"boolean","default":false}},"required":["type","timeColumn","columns"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_DECOMPOSE"},"column":{"type":"string"},"mode":{"$ref":"#/components/schemas/ArrayDecomposeModeEnum","default":"position"},"maxColumns":{"type":"integer","exclusiveMinimum":0,"default":500},"outputPrefix":{"type":"string","default":"_"}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_CONSOLIDATE"},"groups":{"type":"array","items":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string"},"minItems":1},"outputColumn":{"type":"string"},"dropSource":{"type":"boolean","default":true},"includeNulls":{"type":"boolean","default":false}},"required":["columns","outputColumn"]},"minItems":1}},"required":["type","groups"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_EXPLODE"},"column":{"type":"string"},"outputColumn":{"type":["string","null"]},"preserveIndex":{"type":"boolean","default":false}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_AGGREGATE"},"column":{"type":"string"},"aggregation":{"$ref":"#/components/schemas/ArrayAggregationKindEnum"},"outputColumn":{"type":["string","null"]}},"required":["type","column","aggregation"]},{"type":"object","properties":{"type":{"type":"string","const":"JSON_FLATTEN"},"column":{"type":"string"},"maxColumns":{"type":"integer","exclusiveMinimum":0,"default":500},"separator":{"type":"string","default":"."},"dropSource":{"type":"boolean","default":true}},"required":["type","column"]}],"discriminator":{"propertyName":"type"}},"FilterSchema":{"type":"object","properties":{"column":{"type":"string"},"comparisonOperator":{"$ref":"#/components/schemas/ComparisonOperatorEnum"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":["string","number","boolean"]}}]},"correctType":{"type":"boolean"}},"required":["column","comparisonOperator","value","correctType"]},"ComparisonOperatorEnum":{"type":"string","enum":["Equal to","Not Equal to","Contains","Does not contain","Starts with","Ends with","Is Empty","Is not Empty","Less than","Greater than","Less than or equal to","Greater than or equal to","Before","After","Array contains","Array contains any","Array contains all","Array does not contain","Array does not contain any","Array does not contain all","Array size equal to","Array size greater than","Array size less than"]},"FilterGroupSchema":{"type":"object","properties":{"booleanOperator":{"$ref":"#/components/schemas/LogicalOperatorEnum"},"filters":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/FilterSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]}}},"required":["booleanOperator","filters"]},"LogicalOperatorEnum":{"type":"string","enum":["AND","OR"]},"AggregationFunctionSchema":{"type":"object","properties":{"column":{"type":"string"},"function":{"$ref":"#/components/schemas/AggregateFunctionEnum"},"alias":{"type":["string","null"]},"filter":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/FilterSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]},{"type":"null"}]}},"required":["column","function"]},"AggregateFunctionEnum":{"type":"string","enum":["sum","avg","min","max","count","countDistinct","first","last","categoryShare"]},"JoinTypeEnum":{"type":"string","enum":["inner","left","right","full"]},"JoinColumnPairSchema":{"type":"object","properties":{"leftField":{"type":"string"},"rightField":{"type":"string"}},"required":["leftField","rightField"]},"JoinConflictResolutionEnum":{"type":"string","enum":["keep_left","keep_right","prefix"]},"UnmatchedRuleEnum":{"type":"string","enum":["error","drop","append"]},"SortColumnSchema":{"type":"object","properties":{"column":{"type":"string"},"direction":{"$ref":"#/components/schemas/SortDirectionEnum"}},"required":["column","direction"]},"SortDirectionEnum":{"type":"string","enum":["asc","desc"]},"SplitTypeEnum":{"type":"string","enum":["delimiter","pattern"]},"NewColumnDefinitionSchema":{"type":"object","properties":{"name":{"type":"string"},"pattern":{"type":["string","null"]}},"required":["name"]},"KeepEnum":{"type":"string","enum":["first","last"]},"ImputeMethodEnum":{"type":"string","enum":["mean","median","mode","constant"]},"InterpolateTimeMethodEnum":{"type":"string","enum":["linear","time","index"]},"NormalizeNumericMethodEnum":{"type":"string","enum":["min_max","z_score"]},"DatetimeFormatSchema":{"type":"string","minLength":1},"AsOfDirectionEnum":{"type":"string","enum":["backward","forward","nearest"]},"ToleranceUnitEnum":{"type":"string","enum":["us","ms","s","m","h","d"]},"MultiMatchStrategyEnum":{"type":"string","enum":["first","last","aggregate"]},"FrequencyMethodEnum":{"type":"string","enum":["fft","welch"]},"FrequencyWindowFunctionEnum":{"type":"string","enum":["hann","hamming","blackman","rectangular"]},"FrequencyOutputFormatEnum":{"type":"string","enum":["spectrogram","time_frequency_long"]},"FrequencyUnitEnum":{"type":"string","enum":["hz","per_minute","per_hour","per_day","per_week","per_month","per_year"]},"CyclicComponentEnum":{"type":"string","enum":["second_in_minute","minute_in_hour","hour_of_day","day_of_week","day_of_month","week_of_year","month_of_year","quarter_of_year"]},"DateDiffUnitEnum":{"type":"string","enum":["seconds","minutes","hours","days","weeks"]},"DateDiffSignEnum":{"type":"string","enum":["signed","absolute"]},"ArrayDecomposeModeEnum":{"type":"string","enum":["position","one_hot"]},"ArrayAggregationKindEnum":{"type":"string","enum":["mean","sum","min","max","median","count"]},"SourceJoinConfigSchema":{"type":"object","properties":{"joinType":{"type":"string","enum":["left","inner"],"default":"left"},"strategy":{"type":["string","null"]}}},"ConceptKindEnum":{"type":"string","enum":["standard","derived","metric"]},"RelationshipRuleSchema":{"type":"object","properties":{"ruleType":{"$ref":"#/components/schemas/RelationshipRuleTypeEnum"},"sourceVariable":{"type":"string"},"condition":{"anyOf":[{"$ref":"#/components/schemas/ConditionSchema"},{"type":"null"}]},"allowedValues":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean"]}},{"type":"null"}]},"minValue":{"type":["number","null"]},"maxValue":{"type":["number","null"]},"confidence":{"type":"number","default":1},"support":{"type":"number","default":0},"strength":{"anyOf":[{"$ref":"#/components/schemas/RuleStrengthEnum"},{"type":"null"}]},"violationRate":{"type":["number","null"]},"source":{"type":["string","null"]},"cycle":{"type":["string","null"]}},"required":["ruleType","sourceVariable"]},"RelationshipRuleTypeEnum":{"type":"string","enum":["conditional_values","range","set","cyclic_active_window","cyclic_missing"]},"ConditionSchema":{"type":"object","properties":{"variable":{"type":"string"},"operator":{"type":"string","enum":["eq","ne","gt","lt","ge","le","in","not_in"]},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":["number","string","boolean"]}}]}},"required":["variable","operator","value"]},"RuleStrengthEnum":{"type":"string","enum":["hard","soft"]},"SuggestedRoleEnum":{"type":"string","enum":["source","target"]},"ConceptValueMappingSchema":{"type":"object","properties":{"canonicalValue":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"default":[]}},"required":["canonicalValue"]},"DetectedConceptStructureSchema":{"type":"object","properties":{"temporalPrerequisites":{"type":"array","items":{"type":"string"},"default":[]},"suggestedRole":{"anyOf":[{"$ref":"#/components/schemas/SuggestedRoleEnum"},{"type":"null"}]}}}},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/ontology/concepts":{"get":{"operationId":"get-api-v1-workspaces-{wsId}-ontology-concepts","summary":"List ontology concepts","description":"Lists ontology concepts for the workspace. Paginated (limit, cursor). Optional query param sourceId filters to concepts that have a field mapping for that source. Read from platform MongoDB (ontologyConcepts collection). Concepts are created by ontology extraction on sources or manually via POST.","tags":["Ontology"],"parameters":[{"in":"query","name":"limit","required":false,"schema":{"description":"Page size (1-1000, default 50).","type":"number","minimum":1,"maximum":1000},"description":"Page size (1-1000, default 50)."},{"in":"query","name":"cursor","required":false,"schema":{"type":"string","description":"Opaque cursor from a previous response's `pagination.cursor`."},"description":"Opaque cursor from a previous response's `pagination.cursor`."},{"in":"query","name":"sourceId","required":false,"schema":{"type":"string","description":"Restrict to concepts mapped to this source."},"description":"Restrict to concepts mapped to this source."},{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyConceptListEnvelope"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create ontology concept

> Creates a new ontology concept. Body: name, schemaFieldName, schemaType, optional metadata, description, conceptClassification, fieldMappings, anchorConceptLinks, derivedInfo, suggestedRole. Stored in platform MongoDB only; no data-service call. Used for manual curation or when auto-extraction is not used.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Ontology"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"CreateConceptInput":{"type":"object","properties":{"name":{"type":"string"},"schemaFieldName":{"type":"string"},"schemaType":{"$ref":"#/components/schemas/SchemaMainTypeEnum"},"schemaSubtype":{"anyOf":[{"$ref":"#/components/schemas/SchemaSubTypeEnum"},{"type":"null"}]},"metadata":{"$ref":"#/components/schemas/ConceptMetadataSchema"},"description":{"type":["string","null"]},"conceptClassification":{"anyOf":[{"$ref":"#/components/schemas/ConceptClassificationEnum"},{"type":"null"}]},"anchorConceptLinks":{"type":"array","items":{"type":"string"},"default":[]},"derivedInfo":{"anyOf":[{"$ref":"#/components/schemas/DerivedConceptInfoSchema"},{"type":"null"}]},"conceptKind":{"$ref":"#/components/schemas/ConceptKindEnum","default":"standard"},"metricSql":{"type":["string","null"]},"suggestedRole":{"anyOf":[{"$ref":"#/components/schemas/SuggestedRoleEnum"},{"type":"null"}]},"fieldMappings":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"status":{"$ref":"#/components/schemas/BindingStatusEnum","default":"confirmed"},"source":{"$ref":"#/components/schemas/BindingSourceEnum","default":"ingest"},"confidence":{"type":["number","null"]},"evidence":{"type":["string","null"]},"valueMap":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"string"}]}},{"allOf":[{},{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"string"}]}}]}]},{"type":"null"}]},"canonicalField":{"type":["string","null"]},"scopeFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"precedence":{"type":["number","null"]},"keyRole":{"anyOf":[{"$ref":"#/components/schemas/KeyRoleEnum"},{"type":"null"}]},"conformance":{"anyOf":[{"$ref":"#/components/schemas/ConformanceReportSchema"},{"type":"null"}]},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"sourceId":{"type":"string"}},"required":["field","sourceId"]},"default":[]}},"required":["name","schemaFieldName","schemaType","metadata"]},"SchemaMainTypeEnum":{"type":"string","enum":["None","String","Category","Number","Boolean","DateTime","Array","Unknown"]},"SchemaSubTypeEnum":{"type":"string","enum":["Integer","Float","UnsignedInteger","UnsignedFloat","String","Number","Category","Boolean","DateTime"]},"ConceptMetadataSchema":{"type":"object","properties":{"categories":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"minValue":{"type":["number","null"]},"maxValue":{"type":["number","null"]},"isMonotonicallyIncreasing":{"type":["boolean","null"]},"isMonotonicallyDecreasing":{"type":["boolean","null"]},"isUnique":{"type":["boolean","null"]},"isCyclic":{"type":["boolean","null"]},"isHeterogeneousIdentifier":{"type":["boolean","null"]},"compositeScopeConceptId":{"type":["string","null"]},"isUniformDistribution":{"type":["boolean","null"]},"locationType":{"anyOf":[{"$ref":"#/components/schemas/AnchorLocationTypeEnum"},{"type":"null"}]},"coordinateFormat":{"anyOf":[{"$ref":"#/components/schemas/CoordinateFormatEnum"},{"type":"null"}]},"coordinateDatum":{"anyOf":[{"$ref":"#/components/schemas/CoordinateDatumEnum"},{"type":"null"}]},"coordinatePairConceptId":{"type":["string","null"]},"locationDetectionSource":{"anyOf":[{"$ref":"#/components/schemas/LocationDetectionSourceEnum"},{"type":"null"}]},"latitudeInRangeFraction":{"type":["number","null"]},"longitudeInRangeFraction":{"type":["number","null"]},"fractionalPartFraction":{"type":["number","null"]},"coordinatePairFraction":{"type":["number","null"]},"dmsCoordinateFraction":{"type":["number","null"]},"postalCodeFraction":{"type":["number","null"]},"addressShapeFraction":{"type":["number","null"]},"enrichments":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EnrichmentRecordSchema"}},{"type":"null"}]},"geoEnrichmentStatus":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentStatusEnum"},{"type":"null"}]},"geoEnrichmentKind":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentKindEnum"},{"type":"null"}]},"geoEnrichedAt":{"type":["string","null"]},"geoEnrichmentVersion":{"type":["number","null"]},"geoSidecarKey":{"type":["string","null"]},"geoDistinctTotal":{"type":["number","null"]},"geoMatchedCount":{"type":["number","null"]},"geoUnmatchedCount":{"type":["number","null"]},"geoTruncated":{"type":["boolean","null"]},"geoEnrichmentError":{"type":["string","null"]},"nanFillStrategy":{"anyOf":[{"$ref":"#/components/schemas/NanFillStrategyEnum"},{"type":"null"}]},"changeRate":{"type":["number","null"]},"dateTimeFormat":{"type":["string","null"]},"displayFormat":{"type":["string","null"]},"averageInterval":{"type":["number","null"]},"isConsistentInterval":{"type":["boolean","null"]},"unit":{"type":["string","null"]},"unitModifier":{"type":["number","null"]},"higherIsBetter":{"type":["boolean","null"]},"isEqualInterval":{"type":["boolean","null"]},"intervalSize":{"type":["number","null"]},"valueClass":{"anyOf":[{"$ref":"#/components/schemas/ValueClassEnum"},{"type":"null"}]},"fracZero":{"type":["number","null"]},"zeroRunLengthP95":{"type":["number","null"]},"nonZeroRunLengthP95":{"type":["number","null"]},"trendSlopePerSecond":{"type":["number","null"]},"trendR2":{"type":["number","null"]},"emailFraction":{"type":["number","null"]},"medianLength":{"type":["number","null"]},"distinctLengthCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"tsGranularity":{"type":["string","null"]},"tsValidGranularities":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"tsTypicalDeltaSeconds":{"type":["number","null"]},"tsSelectedGrid":{"type":["string","null"]},"tsGapProfile":{"anyOf":[{"$ref":"#/components/schemas/GapProfileSchema"},{"type":"null"}]},"tsSeasonalPeriods":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SeasonalPeriodSchema"}},{"type":"null"}]},"tsCategoricalSeasonality":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CategoricalSeasonalPeriodSchema"}},{"type":"null"}]},"tsMissingPatterns":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"tsActiveWindows":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"tsPerEnvProfiles":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TimeSeriesEnvProfileSchema"}},{"type":"null"}]},"tsAnalyzerVersion":{"type":["string","null"]},"tsAnalyzedAt":{"type":["string","null"]},"elementSchemaType":{"anyOf":[{"$ref":"#/components/schemas/SchemaMainTypeEnum"},{"type":"null"}]},"elementCategories":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"sizeStatistics":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]}},"additionalProperties":true},"AnchorLocationTypeEnum":{"type":"string","enum":["latitude","longitude","coordinate","country","region","city","postal_code","address","continent","airport_code","unlocode"]},"CoordinateFormatEnum":{"type":"string","enum":["dd","dms","ddm"]},"CoordinateDatumEnum":{"type":"string","enum":["wgs84","gcj02","bd09"]},"LocationDetectionSourceEnum":{"type":"string","enum":["values","column_name","user"]},"EnrichmentRecordSchema":{"type":"object","properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentStatusEnum"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentKindEnum"},{"type":"null"}]},"enrichedAt":{"type":["string","null"]},"enricherVersion":{"type":["string","null"]},"dataVersion":{"type":["string","null"]},"version":{"type":["number","null"]},"sidecarKey":{"type":["string","null"]},"keyFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"hintFields":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"corroborationFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"latLonPrecision":{"type":["number","null"]},"distinctTotal":{"type":["number","null"]},"matchedCount":{"type":["number","null"]},"unmatchedCount":{"type":["number","null"]},"truncated":{"type":["boolean","null"]},"error":{"type":["string","null"]},"appliedDatum":{"type":["string","null"]}}},"GeoEnrichmentStatusEnum":{"type":"string","enum":["running","completed","partial","failed"]},"GeoEnrichmentKindEnum":{"type":"string","enum":["forward","reverse"]},"NanFillStrategyEnum":{"type":"string","enum":["forward","interpolate","zero","drop","undefined"]},"ValueClassEnum":{"type":"string","enum":["continuous","sparse_event","bursty","binary_indicator"]},"GapProfileSchema":{"type":"object","properties":{"expectedIntervalSeconds":{"type":["number","null"]},"p50GapSeconds":{"type":["number","null"]},"p95GapSeconds":{"type":["number","null"]},"p99GapSeconds":{"type":["number","null"]},"maxGapSeconds":{"type":["number","null"]},"gapCount":{"type":["number","null"]},"largestGapStart":{"type":["string","null"]}}},"SeasonalPeriodSchema":{"type":"object","properties":{"periodSeconds":{"type":"number"},"cycleLabel":{"type":["string","null"]},"strength":{"type":"number"},"confidence":{"type":"number"},"amplitude":{"type":["number","null"]},"phase":{"type":["number","null"]},"order":{"type":"number","default":1}},"required":["periodSeconds","strength","confidence"]},"CategoricalSeasonalPeriodSchema":{"type":"object","properties":{"periodSeconds":{"type":"number"},"cycleLabel":{"type":["string","null"]},"nPhaseBins":{"type":"number"},"cramersV":{"type":"number"},"chi2PerDof":{"type":["number","null"]},"phaseDistribution":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"number"}}},{"type":"null"}]},"levels":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["periodSeconds","nPhaseBins","cramersV"]},"CyclicPatternSchema":{"type":"object","properties":{"cycle":{"$ref":"#/components/schemas/CycleNameEnum"},"activeIndices":{"type":"array","items":{"type":"number"},"default":[]},"inactiveIndices":{"type":"array","items":{"type":"number"},"default":[]},"densityByIndex":{"type":"object","additionalProperties":{"type":"number"},"default":{}},"aggByIndex":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]}},"required":["cycle"]},"CycleNameEnum":{"type":"string","enum":["hour_of_day","day_of_week","day_of_month","month_of_year","week_of_year"]},"TimeSeriesEnvProfileSchema":{"type":"object","properties":{"envKey":{"type":"string"},"tsSeasonalPeriods":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SeasonalPeriodSchema"}},{"type":"null"}]},"tsCategoricalSeasonality":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CategoricalSeasonalPeriodSchema"}},{"type":"null"}]},"tsMissingPatterns":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"tsActiveWindows":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"trendSlopePerSecond":{"type":["number","null"]},"trendR2":{"type":["number","null"]},"tsTypicalDeltaSeconds":{"type":["number","null"]}},"required":["envKey"]},"ConceptClassificationEnum":{"type":"string","enum":["identifier","location","time"]},"DerivedConceptInfoSchema":{"type":"object","properties":{"formula":{"type":["string","null"]},"formulaBlocks":{"anyOf":[{"oneOf":[{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"template"},"blockType":{"type":"string","minLength":1},"values":{"type":"object","additionalProperties":{}}},"required":["nodeId","kind","blockType"]},{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"structural"},"blockType":{"type":"string","enum":["binary","ifElse"]},"values":{"type":"object","additionalProperties":{}},"children":{"type":"object","additionalProperties":{"anyOf":[{"oneOf":[{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"template"},"blockType":{"type":"string","minLength":1},"values":{"type":"object","additionalProperties":{}}},"required":["nodeId","kind","blockType"]},{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"structural"},"blockType":{"type":"string","enum":["binary","ifElse"]},"values":{"type":"object","additionalProperties":{}},"children":{"type":"object","additionalProperties":{"anyOf":[{},{"type":"null"}]}}},"required":["nodeId","kind","blockType","children"]}],"discriminator":{"propertyName":"kind"}},{"type":"null"}]}}},"required":["nodeId","kind","blockType","children"]}],"discriminator":{"propertyName":"kind"}},{"type":"null"}]},"derivedType":{"$ref":"#/components/schemas/DerivedTypeEnum","default":"manual"},"kind":{"anyOf":[{"$ref":"#/components/schemas/DerivedInfoKindEnum"},{"type":"null"}]},"source":{"anyOf":[{"$ref":"#/components/schemas/DerivedSourceEnum"},{"type":"null"}]},"sourceColumns":{"type":"array","items":{"type":"string"},"default":[]},"expression":{"type":["string","null"]},"r2":{"type":["number","null"]},"isDeterministic":{"type":["boolean","null"]},"lag":{"type":["number","null"]},"cumulativeDirection":{"type":["string","null"]},"sourceDataViewId":{"type":["string","null"]},"operationLineage":{"anyOf":[{"$ref":"#/components/schemas/OperationLineageSchema"},{"type":"null"}]},"viewSnapshot":{"anyOf":[{"$ref":"#/components/schemas/ViewSnapshotSchema"},{"type":"null"}]},"lineageHash":{"type":["string","null"]},"sourceJoinConfig":{"anyOf":[{"$ref":"#/components/schemas/SourceJoinConfigSchema"},{"type":"null"}]}}},"DerivedTypeEnum":{"type":"string","enum":["manual","datetime_component","lag","cumulative","step_change","algebraic_identity","complement","ratio","view_operation"]},"DerivedInfoKindEnum":{"type":"string","enum":["op","formula","detected","join"]},"DerivedSourceEnum":{"type":"string","enum":["user","detected","discovered"]},"OperationLineageSchema":{"type":"object","properties":{"opType":{"$ref":"#/components/schemas/OperationTypeEnum"},"opId":{"type":"string"},"parentColumns":{"type":"array","items":{"type":"string"},"default":[]},"parentConceptIds":{"type":"array","items":{"type":"string"},"default":[]}},"required":["opType","opId"]},"OperationTypeEnum":{"type":"string","enum":["SQL_QUERY","FILTER","AGGREGATE","JOIN","CONCATENATE","SORT","SPLIT_COLUMN","DROP_COLUMNS","REMOVE_DUPLICATES","IMPUTE_NULLS","DROP_NULLS","REPLACE_VALUES","REPLACE_TYPE","INTERPOLATE_TIME","CLIP_OUTLIERS","NORMALIZE_NUMERIC","MAP_CATEGORIES","TIME_SERIES_AGGREGATE","TIME_SERIES_JOIN","TRANSPOSE","FREQUENCY_ANALYSIS","CYCLIC_AGGREGATE","DIFF","DATE_DIFF","CUMULATIVE","ARRAY_DECOMPOSE","ARRAY_CONSOLIDATE","ARRAY_EXPLODE","ARRAY_AGGREGATE","JSON_FLATTEN"]},"ViewSnapshotSchema":{"type":"object","properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceSchema"}},"operations":{"type":"array","items":{"$ref":"#/components/schemas/OperationSchema"}},"outputColumn":{"type":"string"}},"required":["sources","operations","outputColumn"]},"SourceSchema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"DATASET"},"name":{"type":["string","null"]},"conceptIds":{"type":"array","items":{"type":"string"}},"conceptVersions":{"anyOf":[{"type":"object","additionalProperties":{"type":"integer","minimum":0}},{"type":"null"}]},"version":{"anyOf":[{"$ref":"#/components/schemas/SourcePinSchema"},{"type":"null"}]}},"required":["id","type","conceptIds"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"DATA_VIEW"},"name":{"type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"CONCEPT"},"name":{"type":["string","null"]},"prioritiseCalculation":{"type":"boolean","default":true},"showCalculationColumns":{"type":"boolean","default":false}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"GEO_SIDECAR"},"name":{"type":["string","null"]},"conceptId":{"type":"string"},"sidecarKey":{"type":"string"}},"required":["id","type","conceptId","sidecarKey"]}],"discriminator":{"propertyName":"type"}},"SourcePinSchema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"latest"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"pinned"},"versionId":{"type":"string"}},"required":["kind","versionId"]}],"discriminator":{"propertyName":"kind"}},"OperationSchema":{"type":"object","properties":{"id":{"type":"string"},"sourceId":{"type":"string"},"config":{"$ref":"#/components/schemas/OperationConfigSchema"}},"required":["id","sourceId","config"]},"OperationConfigSchema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"FILTER"},"filterGroup":{"anyOf":[{"$ref":"#/components/schemas/FilterSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]}},"required":["type","filterGroup"]},{"type":"object","properties":{"type":{"type":"string","const":"AGGREGATE"},"groupByColumns":{"type":"array","items":{"type":"string"}},"aggregations":{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}}},"required":["type","groupByColumns","aggregations"]},{"type":"object","properties":{"type":{"type":"string","const":"JOIN"},"joinType":{"$ref":"#/components/schemas/JoinTypeEnum"},"columnPairs":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/JoinColumnPairSchema"}},{"type":"null"}]},"leftField":{"type":["string","null"]},"rightField":{"type":["string","null"]},"conflictResolution":{"$ref":"#/components/schemas/JoinConflictResolutionEnum"},"leftPrefix":{"type":["string","null"]},"rightPrefix":{"type":["string","null"]}},"required":["type","joinType","conflictResolution"]},{"type":"object","properties":{"type":{"type":"string","const":"CONCATENATE"},"topSource":{"type":["string","null"]},"bottomSource":{"type":["string","null"]},"sources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"columnMapping":{"type":"object","additionalProperties":{"type":"string"}},"unmatchedRule":{"$ref":"#/components/schemas/UnmatchedRuleEnum"},"discriminatorColumn":{"type":["string","null"]},"discriminatorValues":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["type","columnMapping","unmatchedRule"]},{"type":"object","properties":{"type":{"type":"string","const":"SORT"},"sortColumns":{"type":"array","items":{"$ref":"#/components/schemas/SortColumnSchema"}}},"required":["type","sortColumns"]},{"type":"object","properties":{"type":{"type":"string","const":"SQL_QUERY"},"query":{"type":"string"},"columnSourceAliases":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["type","query"]},{"type":"object","properties":{"type":{"type":"string","const":"SPLIT_COLUMN"},"columnToSplit":{"type":"string"},"splitType":{"$ref":"#/components/schemas/SplitTypeEnum"},"delimiter":{"type":["string","null"]},"columns":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/NewColumnDefinitionSchema"}},{"type":"null"}]}},"required":["type","columnToSplit","splitType"]},{"type":"object","properties":{"type":{"type":"string","const":"DROP_COLUMNS"},"columns":{"type":"array","items":{"type":"string"}}},"required":["type","columns"]},{"type":"object","properties":{"type":{"type":"string","const":"REMOVE_DUPLICATES"},"column":{"type":["string","null"]},"keep":{"$ref":"#/components/schemas/KeepEnum","default":"first"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"IMPUTE_NULLS"},"method":{"$ref":"#/components/schemas/ImputeMethodEnum","default":"constant"},"column":{"type":["string","null"]},"fillValue":{"anyOf":[{"type":["string","number","boolean"]},{"type":"null"}]},"imputations":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"method":{"$ref":"#/components/schemas/ImputeMethodEnum","default":"constant"},"fillValue":{"anyOf":[{"type":["string","number","boolean"]},{"type":"null"}]}},"required":["column"]}},{"type":"null"}]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"DROP_NULLS"},"axis":{"type":"string","enum":["rows","empty_columns"],"default":"rows"},"column":{"type":["string","null"]},"columns":{"type":"array","items":{"type":"string"},"default":[]},"nullThresholdPercent":{"type":"number","default":100}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"REPLACE_VALUES"},"column":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":["string","null"]}}},"required":["type","column","mapping"]},{"type":"object","properties":{"type":{"type":"string","const":"REPLACE_TYPE"},"changes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"toType":{"$ref":"#/components/schemas/SchemaMainTypeEnum"},"toSubType":{"anyOf":[{"$ref":"#/components/schemas/SchemaSubTypeEnum"},{"type":"null"}]},"dateFormat":{"type":["string","null"]}},"required":["column","toType"]}},{"type":"null"}]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"INTERPOLATE_TIME"},"column":{"type":"string"},"frequency":{"type":"string"},"method":{"$ref":"#/components/schemas/InterpolateTimeMethodEnum"}},"required":["type","column","frequency","method"]},{"type":"object","properties":{"type":{"type":"string","const":"CLIP_OUTLIERS"},"column":{"type":"string"},"lowerQuantile":{"type":"number","default":0.05},"upperQuantile":{"type":"number","default":0.95}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"NORMALIZE_NUMERIC"},"column":{"type":"string"},"method":{"$ref":"#/components/schemas/NormalizeNumericMethodEnum","default":"z_score"}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"MAP_CATEGORIES"},"column":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}},"defaultValue":{"type":["string","null"]}},"required":["type","column","mapping"]},{"type":"object","properties":{"type":{"type":"string","const":"TIME_SERIES_AGGREGATE"},"timeColumn":{"type":"string"},"granularity":{"type":"string","enum":["nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"]},"aggregations":{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}},"dateFormat":{"anyOf":[{"$ref":"#/components/schemas/DatetimeFormatSchema"},{"type":"null"}]}},"required":["type","timeColumn","granularity","aggregations"]},{"type":"object","properties":{"type":{"type":"string","const":"TIME_SERIES_JOIN"},"joinType":{"$ref":"#/components/schemas/JoinTypeEnum"},"leftTimeColumn":{"type":"string"},"rightTimeColumn":{"type":"string"},"rightSource":{"type":"string"},"strategy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"exact"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"granularity"},"granularity":{"type":"string","enum":["nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"]}},"required":["type","granularity"]},{"type":"object","properties":{"type":{"type":"string","const":"asOf"},"direction":{"$ref":"#/components/schemas/AsOfDirectionEnum"},"tolerance":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"unit":{"$ref":"#/components/schemas/ToleranceUnitEnum"}},"required":["value","unit"]},{"type":"null"}]}},"required":["type","direction"]},{"type":"object","properties":{"type":{"type":"string","const":"interval"},"leftEndColumn":{"type":"string"}},"required":["type","leftEndColumn"]}],"discriminator":{"propertyName":"type"}},"exactMatchKeys":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"leftField":{"type":"string"},"rightField":{"type":"string"}},"required":["leftField","rightField"]}},{"type":"null"}]},"multiMatch":{"$ref":"#/components/schemas/MultiMatchStrategyEnum"},"multiMatchAggregations":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}},{"type":"null"}]}},"required":["type","joinType","leftTimeColumn","rightTimeColumn","rightSource","strategy","multiMatch"]},{"type":"object","properties":{"type":{"type":"string","const":"TRANSPOSE"},"timeColumn":{"type":"string"},"envColumns":{"type":"array","items":{"type":"string"}},"valueColumns":{"type":"array","items":{"type":"string"}},"columnTemplate":{"type":"string"},"joinStrategy":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"exact"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"granularity"},"granularity":{"type":"string","enum":["nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"]}},"required":["type","granularity"]},{"type":"object","properties":{"type":{"type":"string","const":"asOf"},"direction":{"$ref":"#/components/schemas/AsOfDirectionEnum"},"tolerance":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"unit":{"$ref":"#/components/schemas/ToleranceUnitEnum"}},"required":["value","unit"]},{"type":"null"}]}},"required":["type","direction"]}],"discriminator":{"propertyName":"type"}},{"type":"null"}]}},"required":["type","timeColumn","envColumns","valueColumns","columnTemplate"]},{"type":"object","properties":{"type":{"type":"string","const":"FREQUENCY_ANALYSIS"},"timeColumn":{"type":"string"},"valueColumns":{"type":"array","items":{"type":"string"}},"method":{"$ref":"#/components/schemas/FrequencyMethodEnum"},"windowFunction":{"$ref":"#/components/schemas/FrequencyWindowFunctionEnum","default":"hann"},"windowSize":{"type":["number","null"]},"overlap":{"type":"number","default":0.5},"samplingRateHz":{"type":["number","null"]},"outputFormat":{"$ref":"#/components/schemas/FrequencyOutputFormatEnum"},"frequencyRange":{"anyOf":[{"type":"object","properties":{"minHz":{"type":["number","null"]},"maxHz":{"type":["number","null"]}}},{"type":"null"}]},"frequencyUnit":{"$ref":"#/components/schemas/FrequencyUnitEnum","default":"hz"}},"required":["type","timeColumn","valueColumns","method","outputFormat"]},{"type":"object","properties":{"type":{"type":"string","const":"CYCLIC_AGGREGATE"},"timeColumn":{"type":"string"},"cycleComponent":{"$ref":"#/components/schemas/CyclicComponentEnum"},"aggregations":{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}}},"required":["type","timeColumn","cycleComponent","aggregations"]},{"type":"object","properties":{"type":{"type":"string","const":"DIFF"},"timeColumn":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"partitionColumns":{"type":"array","items":{"type":"string"},"default":[]},"outputSuffix":{"type":"string","default":"_diff"},"replaceColumns":{"type":"boolean","default":false}},"required":["type","timeColumn","columns"]},{"type":"object","properties":{"type":{"type":"string","const":"DATE_DIFF"},"startColumn":{"type":"string"},"endColumn":{"type":"string"},"unit":{"$ref":"#/components/schemas/DateDiffUnitEnum","default":"days"},"sign":{"$ref":"#/components/schemas/DateDiffSignEnum","default":"signed"},"outputColumn":{"type":["string","null"]}},"required":["type","startColumn","endColumn"]},{"type":"object","properties":{"type":{"type":"string","const":"CUMULATIVE"},"timeColumn":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"partitionColumns":{"type":"array","items":{"type":"string"},"default":[]},"outputSuffix":{"type":"string","default":"_cumsum"},"replaceColumns":{"type":"boolean","default":false}},"required":["type","timeColumn","columns"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_DECOMPOSE"},"column":{"type":"string"},"mode":{"$ref":"#/components/schemas/ArrayDecomposeModeEnum","default":"position"},"maxColumns":{"type":"integer","exclusiveMinimum":0,"default":500},"outputPrefix":{"type":"string","default":"_"}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_CONSOLIDATE"},"groups":{"type":"array","items":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string"},"minItems":1},"outputColumn":{"type":"string"},"dropSource":{"type":"boolean","default":true},"includeNulls":{"type":"boolean","default":false}},"required":["columns","outputColumn"]},"minItems":1}},"required":["type","groups"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_EXPLODE"},"column":{"type":"string"},"outputColumn":{"type":["string","null"]},"preserveIndex":{"type":"boolean","default":false}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_AGGREGATE"},"column":{"type":"string"},"aggregation":{"$ref":"#/components/schemas/ArrayAggregationKindEnum"},"outputColumn":{"type":["string","null"]}},"required":["type","column","aggregation"]},{"type":"object","properties":{"type":{"type":"string","const":"JSON_FLATTEN"},"column":{"type":"string"},"maxColumns":{"type":"integer","exclusiveMinimum":0,"default":500},"separator":{"type":"string","default":"."},"dropSource":{"type":"boolean","default":true}},"required":["type","column"]}],"discriminator":{"propertyName":"type"}},"FilterSchema":{"type":"object","properties":{"column":{"type":"string"},"comparisonOperator":{"$ref":"#/components/schemas/ComparisonOperatorEnum"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":["string","number","boolean"]}}]},"correctType":{"type":"boolean"}},"required":["column","comparisonOperator","value","correctType"]},"ComparisonOperatorEnum":{"type":"string","enum":["Equal to","Not Equal to","Contains","Does not contain","Starts with","Ends with","Is Empty","Is not Empty","Less than","Greater than","Less than or equal to","Greater than or equal to","Before","After","Array contains","Array contains any","Array contains all","Array does not contain","Array does not contain any","Array does not contain all","Array size equal to","Array size greater than","Array size less than"]},"FilterGroupSchema":{"type":"object","properties":{"booleanOperator":{"$ref":"#/components/schemas/LogicalOperatorEnum"},"filters":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/FilterSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]}}},"required":["booleanOperator","filters"]},"LogicalOperatorEnum":{"type":"string","enum":["AND","OR"]},"AggregationFunctionSchema":{"type":"object","properties":{"column":{"type":"string"},"function":{"$ref":"#/components/schemas/AggregateFunctionEnum"},"alias":{"type":["string","null"]},"filter":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/FilterSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]},{"type":"null"}]}},"required":["column","function"]},"AggregateFunctionEnum":{"type":"string","enum":["sum","avg","min","max","count","countDistinct","first","last","categoryShare"]},"JoinTypeEnum":{"type":"string","enum":["inner","left","right","full"]},"JoinColumnPairSchema":{"type":"object","properties":{"leftField":{"type":"string"},"rightField":{"type":"string"}},"required":["leftField","rightField"]},"JoinConflictResolutionEnum":{"type":"string","enum":["keep_left","keep_right","prefix"]},"UnmatchedRuleEnum":{"type":"string","enum":["error","drop","append"]},"SortColumnSchema":{"type":"object","properties":{"column":{"type":"string"},"direction":{"$ref":"#/components/schemas/SortDirectionEnum"}},"required":["column","direction"]},"SortDirectionEnum":{"type":"string","enum":["asc","desc"]},"SplitTypeEnum":{"type":"string","enum":["delimiter","pattern"]},"NewColumnDefinitionSchema":{"type":"object","properties":{"name":{"type":"string"},"pattern":{"type":["string","null"]}},"required":["name"]},"KeepEnum":{"type":"string","enum":["first","last"]},"ImputeMethodEnum":{"type":"string","enum":["mean","median","mode","constant"]},"InterpolateTimeMethodEnum":{"type":"string","enum":["linear","time","index"]},"NormalizeNumericMethodEnum":{"type":"string","enum":["min_max","z_score"]},"DatetimeFormatSchema":{"type":"string","minLength":1},"AsOfDirectionEnum":{"type":"string","enum":["backward","forward","nearest"]},"ToleranceUnitEnum":{"type":"string","enum":["us","ms","s","m","h","d"]},"MultiMatchStrategyEnum":{"type":"string","enum":["first","last","aggregate"]},"FrequencyMethodEnum":{"type":"string","enum":["fft","welch"]},"FrequencyWindowFunctionEnum":{"type":"string","enum":["hann","hamming","blackman","rectangular"]},"FrequencyOutputFormatEnum":{"type":"string","enum":["spectrogram","time_frequency_long"]},"FrequencyUnitEnum":{"type":"string","enum":["hz","per_minute","per_hour","per_day","per_week","per_month","per_year"]},"CyclicComponentEnum":{"type":"string","enum":["second_in_minute","minute_in_hour","hour_of_day","day_of_week","day_of_month","week_of_year","month_of_year","quarter_of_year"]},"DateDiffUnitEnum":{"type":"string","enum":["seconds","minutes","hours","days","weeks"]},"DateDiffSignEnum":{"type":"string","enum":["signed","absolute"]},"ArrayDecomposeModeEnum":{"type":"string","enum":["position","one_hot"]},"ArrayAggregationKindEnum":{"type":"string","enum":["mean","sum","min","max","median","count"]},"SourceJoinConfigSchema":{"type":"object","properties":{"joinType":{"type":"string","enum":["left","inner"],"default":"left"},"strategy":{"type":["string","null"]}}},"ConceptKindEnum":{"type":"string","enum":["standard","derived","metric"]},"SuggestedRoleEnum":{"type":"string","enum":["source","target"]},"BindingStatusEnum":{"type":"string","enum":["confirmed","suggested"]},"BindingSourceEnum":{"type":"string","enum":["ingest","statistical","llm","user","install"]},"KeyRoleEnum":{"type":"string","enum":["primary","foreign"]},"ConformanceReportSchema":{"type":"object","properties":{"rowsScanned":{"type":"number"},"nullRate":{"type":"number"},"allowedValueCoverage":{"type":["number","null"]},"unresolvedValues":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"number"}},"required":["value","count"]},"default":[]},"inferredGranularity":{"type":["string","null"]},"granularityMatch":{"type":["boolean","null"]},"duplicateAnchorKeys":{"type":["number","null"]},"unitNote":{"type":["string","null"]},"verdict":{"$ref":"#/components/schemas/ConformanceVerdictEnum","default":"pass"}},"required":["rowsScanned","nullRate"]},"ConformanceVerdictEnum":{"type":"string","enum":["pass","warn","fail"]},"OntologyConceptEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OntologyConcept"}},"required":["data"]},"OntologyConcept":{"type":"object","properties":{"id":{"type":"string"},"organisationId":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"conceptClassification":{"anyOf":[{"$ref":"#/components/schemas/ConceptClassificationEnum"},{"type":"null"}]},"anchorConceptLinks":{"type":"array","items":{"type":"string"},"default":[]},"schemaFieldName":{"type":"string"},"schemaType":{"$ref":"#/components/schemas/SchemaMainTypeEnum"},"schemaSubtype":{"anyOf":[{"$ref":"#/components/schemas/SchemaSubTypeEnum"},{"type":"null"}]},"metadata":{"$ref":"#/components/schemas/ConceptMetadataSchema"},"lockedMetadataFields":{"type":"array","items":{"type":"string"}},"detectedMetadata":{"anyOf":[{"$ref":"#/components/schemas/ConceptMetadataSchema"},{"type":"null"}]},"fieldMappings":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"field":{"type":"string"},"status":{"$ref":"#/components/schemas/BindingStatusEnum","default":"confirmed"},"source":{"$ref":"#/components/schemas/BindingSourceEnum","default":"ingest"},"confidence":{"type":["number","null"]},"evidence":{"type":["string","null"]},"valueMap":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"string"}]}},{"allOf":[{},{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"string"}]}}]}]},{"type":"null"}]},"canonicalField":{"type":["string","null"]},"scopeFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"precedence":{"type":["number","null"]},"keyRole":{"anyOf":[{"$ref":"#/components/schemas/KeyRoleEnum"},{"type":"null"}]},"conformance":{"anyOf":[{"$ref":"#/components/schemas/ConformanceReportSchema"},{"type":"null"}]},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]}},"required":["sourceId","field"]}},"derivedInfo":{"anyOf":[{"$ref":"#/components/schemas/DerivedConceptInfoSchema"},{"type":"null"}]},"conceptKind":{"$ref":"#/components/schemas/ConceptKindEnum","default":"standard"},"metricSql":{"type":["string","null"]},"relationshipRules":{"type":"array","items":{"$ref":"#/components/schemas/RelationshipRuleSchema"},"default":[]},"temporalPrerequisites":{"type":"array","items":{"type":"string"},"default":[]},"suggestedRole":{"anyOf":[{"$ref":"#/components/schemas/SuggestedRoleEnum"},{"type":"null"}]},"trustTier":{"anyOf":[{"type":"string","enum":["exploratory","curated_pending","curated"]},{"type":"null"}]},"ontologyRef":{"anyOf":[{"type":"object","properties":{"ontologyId":{"type":"string"},"ontologyVersion":{"type":"string"},"canonicalId":{"type":"string"},"installScope":{"anyOf":[{"type":"object","properties":{"conceptCanonicalIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"filters":{"type":"array","items":{"type":"object","properties":{"conceptRef":{"type":"string"},"values":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"start":{"type":["string","null"]},"end":{"type":["string","null"]}},"required":["conceptRef"]},"default":[]}}},{"type":"null"}]}},"required":["ontologyId","ontologyVersion","canonicalId"]},{"type":"null"}]},"layerIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"},"default":[]},"valueMappings":{"type":"array","items":{"$ref":"#/components/schemas/ConceptValueMappingSchema"},"default":[]},"lockedConceptFields":{"type":"array","items":{"type":"string"}},"detectedConceptStructure":{"anyOf":[{"$ref":"#/components/schemas/DetectedConceptStructureSchema"},{"type":"null"}]},"lastEditedBy":{"type":["string","null"]},"lastEditedAt":{"type":["string","null"]},"lineageDrift":{"type":["boolean","null"]},"editVersion":{"type":"integer","minimum":0,"default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organisationId","workspaceId","name","schemaFieldName","schemaType","metadata","fieldMappings"]},"RelationshipRuleSchema":{"type":"object","properties":{"ruleType":{"$ref":"#/components/schemas/RelationshipRuleTypeEnum"},"sourceVariable":{"type":"string"},"condition":{"anyOf":[{"$ref":"#/components/schemas/ConditionSchema"},{"type":"null"}]},"allowedValues":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean"]}},{"type":"null"}]},"minValue":{"type":["number","null"]},"maxValue":{"type":["number","null"]},"confidence":{"type":"number","default":1},"support":{"type":"number","default":0},"strength":{"anyOf":[{"$ref":"#/components/schemas/RuleStrengthEnum"},{"type":"null"}]},"violationRate":{"type":["number","null"]},"source":{"type":["string","null"]},"cycle":{"type":["string","null"]}},"required":["ruleType","sourceVariable"]},"RelationshipRuleTypeEnum":{"type":"string","enum":["conditional_values","range","set","cyclic_active_window","cyclic_missing"]},"ConditionSchema":{"type":"object","properties":{"variable":{"type":"string"},"operator":{"type":"string","enum":["eq","ne","gt","lt","ge","le","in","not_in"]},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":["number","string","boolean"]}}]}},"required":["variable","operator","value"]},"RuleStrengthEnum":{"type":"string","enum":["hard","soft"]},"ConceptValueMappingSchema":{"type":"object","properties":{"canonicalValue":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"default":[]}},"required":["canonicalValue"]},"DetectedConceptStructureSchema":{"type":"object","properties":{"temporalPrerequisites":{"type":"array","items":{"type":"string"},"default":[]},"suggestedRole":{"anyOf":[{"$ref":"#/components/schemas/SuggestedRoleEnum"},{"type":"null"}]}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/ontology/concepts":{"post":{"operationId":"post-api-v1-workspaces-{wsId}-ontology-concepts","summary":"Create ontology concept","description":"Creates a new ontology concept. Body: name, schemaFieldName, schemaType, optional metadata, description, conceptClassification, fieldMappings, anchorConceptLinks, derivedInfo, suggestedRole. Stored in platform MongoDB only; no data-service call. Used for manual curation or when auto-extraction is not used.","tags":["Ontology"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConceptInput"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyConceptEnvelope"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get full ontology graph

> Returns the full ontology as a graph: nodes are all workspace concepts (from platform MongoDB); edges are anchor (anchorConceptLinks) and temporal\_prerequisite (temporalPrerequisites). Built in-platform from ontologyConcepts; no proxy. Same structure as catalog/graph but from the ontology API.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Ontology"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"UnspecifiedEnvelope":{"type":"object","properties":{"data":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Payload not declared in this repo"}},"required":["data"]}},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/ontology/graph":{"get":{"operationId":"get-api-v1-workspaces-{wsId}-ontology-graph","summary":"Get full ontology graph","description":"Returns the full ontology as a graph: nodes are all workspace concepts (from platform MongoDB); edges are anchor (anchorConceptLinks) and temporal_prerequisite (temporalPrerequisites). Built in-platform from ontologyConcepts; no proxy. Same structure as catalog/graph but from the ontology API.","tags":["Ontology"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnspecifiedEnvelope"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Execute ontology query

> Runs an Anchor SQL statement over the workspace's ontology concepts. Concepts are referenced by name and the ontology plans the joins, time alignment and location matching; SHOW/DESCRIBE metadata commands are also accepted. Always responds 200 with the result union discriminated by \`ok\`: rows responses carry rows, columns, units, the compiled plan, warnings and \`nextStartKey\` (pass back as \`startKey\` to fetch the next page); error responses carry the structured compile error (code, span, candidates, suggestedQuery). The materialised result is not persisted; create a dataset via POST datasets to keep it.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Ontology"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"OntologyQueryInput":{"type":"object","properties":{"anchorSql":{"type":"string","minLength":1,"description":"Anchor SQL statement over ontology concepts. Reference concepts by name — the ontology plans the joins, time alignment and location matching; most queries need no FROM clause (scope explicitly with FROM source:\"name\", dataset:\"name\" or tag:\"name\" when needed). SHOW/DESCRIBE metadata commands are also accepted. Workspace and organisation ids are injected from the auth context."},"limit":{"type":"integer","minimum":1,"maximum":10000,"description":"Rows per page (default 1000). Page through the full result with startKey; an Anchor SQL LIMIT still caps the statement itself."},"startKey":{"type":"integer","minimum":0,"description":"Resume paging from a rows response's nextStartKey"},"validateOnly":{"type":"boolean","description":"Compile and plan without executing; the response is the validated arm carrying the plan and warnings"},"projectionMode":{"type":"string","enum":["related","minimal"],"description":"related adds ontology-linked context columns; minimal returns only the selected concepts and their anchors"}},"required":["anchorSql"]},"AnchorSqlResponseEnvelope":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/anchorSqlRowsResponseSchema"},{"$ref":"#/components/schemas/anchorSqlMetadataResponseSchema"},{"$ref":"#/components/schemas/anchorSqlValidatedResponseSchema"},{"$ref":"#/components/schemas/anchorSqlErrorResponseSchema"}],"description":"Anchor SQL result union, discriminated by `ok` and `kind`: rows (materialised result with nextStartKey paging), metadata (SHOW/DESCRIBE), validated (compile-only), or a structured compile error"}},"required":["data"]},"anchorSqlRowsResponseSchema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"kind":{"type":"string","const":"rows"},"sql":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","additionalProperties":{}}},"rowCount":{"type":["number","null"]},"totalRowCount":{"type":["number","null"]},"truncated":{"type":"boolean","default":false},"nextStartKey":{"type":["number","null"]},"schemaEntries":{"type":"array","items":{"type":"object","additionalProperties":{}},"default":[]},"units":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"plan":{"$ref":"#/components/schemas/anchorSqlPlanSchema","default":{}},"warnings":{"type":"array","items":{"type":"string"},"default":[]},"dataViewId":{"type":["string","null"]},"relatedColumns":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"involvedConcepts":{"type":"array","items":{"$ref":"#/components/schemas/anchorSqlInvolvedConceptSchema"},"default":[]}},"required":["ok","kind","sql","columns","rows"]},"anchorSqlPlanSchema":{"type":"object","properties":{"chips":{"type":"array","items":{"$ref":"#/components/schemas/anchorSqlPlanChipSchema"},"default":[]},"joinPlan":{"type":"array","items":{"$ref":"#/components/schemas/anchorSqlJoinPlanStepSchema"},"default":[]},"strategy":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}},"anchorSqlPlanChipSchema":{"type":"object","properties":{"kind":{"type":"string","minLength":1},"label":{"type":"string"},"detail":{"type":["string","null"]}},"required":["kind","label"]},"anchorSqlJoinPlanStepSchema":{"type":"object","properties":{"sourceDatasetId":{"type":"string"},"targetDatasetId":{"type":"string"},"conceptName":{"type":"string"},"strategy":{"type":"string","minLength":1},"fanout":{"type":["number","null"]}},"required":["sourceDatasetId","targetDatasetId","conceptName","strategy"]},"anchorSqlInvolvedConceptSchema":{"type":"object","properties":{"conceptId":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["referenced","related","anchor","geo"]}},"required":["conceptId","name","role"]},"anchorSqlMetadataResponseSchema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"kind":{"type":"string","const":"metadata"},"command":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"rows":{"type":"array","items":{"type":"object","additionalProperties":{}}},"rowCount":{"type":["number","null"]},"totalRowCount":{"type":["number","null"]},"truncated":{"type":"boolean","default":false},"nextStartKey":{"type":["number","null"]}},"required":["ok","kind","command","columns","rows"]},"anchorSqlValidatedResponseSchema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"kind":{"type":"string","const":"validated"},"sql":{"type":"string"},"plan":{"$ref":"#/components/schemas/anchorSqlPlanSchema","default":{}},"warnings":{"type":"array","items":{"type":"string"},"default":[]},"involvedConcepts":{"type":"array","items":{"$ref":"#/components/schemas/anchorSqlInvolvedConceptSchema"},"default":[]}},"required":["ok","kind","sql"]},"anchorSqlErrorResponseSchema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"$ref":"#/components/schemas/anchorSqlStructuredErrorSchema"}},"required":["ok","error"]},"anchorSqlStructuredErrorSchema":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/anchorSqlErrorCodeSchema"},"message":{"type":"string"},"span":{"anyOf":[{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"number"},{"type":"number"}]},{"type":"null"}]},"perSource":{"type":"array","items":{"$ref":"#/components/schemas/anchorSqlPerSourceDiagnosticSchema"},"default":[]},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/anchorSqlCandidateSchema"},"default":[]},"suggestedQuery":{"type":["string","null"]},"enrichmentProgress":{"type":"array","items":{"$ref":"#/components/schemas/anchorSqlEnrichmentProgressSchema"},"default":[]}},"required":["code","message"]},"anchorSqlErrorCodeSchema":{"type":"string","minLength":1},"anchorSqlPerSourceDiagnosticSchema":{"type":"object","properties":{"datasetId":{"type":"string"},"datasetName":{"type":"string"},"reason":{"type":"string"}},"required":["datasetId","datasetName","reason"]},"anchorSqlCandidateSchema":{"type":"object","properties":{"kind":{"type":"string","enum":["concept","metric","derived","source","dataset","tag","grain"]},"id":{"type":"string"},"name":{"type":"string"},"score":{"type":"number","default":0},"syntax":{"type":["string","null"]}},"required":["kind","id","name"]},"anchorSqlEnrichmentProgressSchema":{"type":"object","properties":{"datasetId":{"type":"string"},"datasetName":{"type":"string"},"conceptId":{"type":"string"},"conceptName":{"type":"string"},"status":{"type":"string"},"distinctTotal":{"type":["number","null"]},"matchedCount":{"type":["number","null"]},"unmatchedCount":{"type":["number","null"]}},"required":["datasetId","datasetName","conceptId","conceptName","status"]}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/ontology/query":{"post":{"operationId":"post-api-v1-workspaces-{wsId}-ontology-query","summary":"Execute ontology query","description":"Runs an Anchor SQL statement over the workspace's ontology concepts. Concepts are referenced by name and the ontology plans the joins, time alignment and location matching; SHOW/DESCRIBE metadata commands are also accepted. Always responds 200 with the result union discriminated by `ok`: rows responses carry rows, columns, units, the compiled plan, warnings and `nextStartKey` (pass back as `startKey` to fetch the next page); error responses carry the structured compile error (code, span, candidates, suggestedQuery). The materialised result is not persisted; create a dataset via POST datasets to keep it.","tags":["Ontology"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyQueryInput"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnchorSqlResponseEnvelope"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get ontology concept

> Returns the concept by id from platform MongoDB. Must belong to the workspace.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Ontology"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"OntologyConceptEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OntologyConcept"}},"required":["data"]},"OntologyConcept":{"type":"object","properties":{"id":{"type":"string"},"organisationId":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"conceptClassification":{"anyOf":[{"$ref":"#/components/schemas/ConceptClassificationEnum"},{"type":"null"}]},"anchorConceptLinks":{"type":"array","items":{"type":"string"},"default":[]},"schemaFieldName":{"type":"string"},"schemaType":{"$ref":"#/components/schemas/SchemaMainTypeEnum"},"schemaSubtype":{"anyOf":[{"$ref":"#/components/schemas/SchemaSubTypeEnum"},{"type":"null"}]},"metadata":{"$ref":"#/components/schemas/ConceptMetadataSchema"},"lockedMetadataFields":{"type":"array","items":{"type":"string"}},"detectedMetadata":{"anyOf":[{"$ref":"#/components/schemas/ConceptMetadataSchema"},{"type":"null"}]},"fieldMappings":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"field":{"type":"string"},"status":{"$ref":"#/components/schemas/BindingStatusEnum","default":"confirmed"},"source":{"$ref":"#/components/schemas/BindingSourceEnum","default":"ingest"},"confidence":{"type":["number","null"]},"evidence":{"type":["string","null"]},"valueMap":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"string"}]}},{"allOf":[{},{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"string"}]}}]}]},{"type":"null"}]},"canonicalField":{"type":["string","null"]},"scopeFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"precedence":{"type":["number","null"]},"keyRole":{"anyOf":[{"$ref":"#/components/schemas/KeyRoleEnum"},{"type":"null"}]},"conformance":{"anyOf":[{"$ref":"#/components/schemas/ConformanceReportSchema"},{"type":"null"}]},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]}},"required":["sourceId","field"]}},"derivedInfo":{"anyOf":[{"$ref":"#/components/schemas/DerivedConceptInfoSchema"},{"type":"null"}]},"conceptKind":{"$ref":"#/components/schemas/ConceptKindEnum","default":"standard"},"metricSql":{"type":["string","null"]},"relationshipRules":{"type":"array","items":{"$ref":"#/components/schemas/RelationshipRuleSchema"},"default":[]},"temporalPrerequisites":{"type":"array","items":{"type":"string"},"default":[]},"suggestedRole":{"anyOf":[{"$ref":"#/components/schemas/SuggestedRoleEnum"},{"type":"null"}]},"trustTier":{"anyOf":[{"type":"string","enum":["exploratory","curated_pending","curated"]},{"type":"null"}]},"ontologyRef":{"anyOf":[{"type":"object","properties":{"ontologyId":{"type":"string"},"ontologyVersion":{"type":"string"},"canonicalId":{"type":"string"},"installScope":{"anyOf":[{"type":"object","properties":{"conceptCanonicalIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"filters":{"type":"array","items":{"type":"object","properties":{"conceptRef":{"type":"string"},"values":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"start":{"type":["string","null"]},"end":{"type":["string","null"]}},"required":["conceptRef"]},"default":[]}}},{"type":"null"}]}},"required":["ontologyId","ontologyVersion","canonicalId"]},{"type":"null"}]},"layerIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"},"default":[]},"valueMappings":{"type":"array","items":{"$ref":"#/components/schemas/ConceptValueMappingSchema"},"default":[]},"lockedConceptFields":{"type":"array","items":{"type":"string"}},"detectedConceptStructure":{"anyOf":[{"$ref":"#/components/schemas/DetectedConceptStructureSchema"},{"type":"null"}]},"lastEditedBy":{"type":["string","null"]},"lastEditedAt":{"type":["string","null"]},"lineageDrift":{"type":["boolean","null"]},"editVersion":{"type":"integer","minimum":0,"default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organisationId","workspaceId","name","schemaFieldName","schemaType","metadata","fieldMappings"]},"ConceptClassificationEnum":{"type":"string","enum":["identifier","location","time"]},"SchemaMainTypeEnum":{"type":"string","enum":["None","String","Category","Number","Boolean","DateTime","Array","Unknown"]},"SchemaSubTypeEnum":{"type":"string","enum":["Integer","Float","UnsignedInteger","UnsignedFloat","String","Number","Category","Boolean","DateTime"]},"ConceptMetadataSchema":{"type":"object","properties":{"categories":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"minValue":{"type":["number","null"]},"maxValue":{"type":["number","null"]},"isMonotonicallyIncreasing":{"type":["boolean","null"]},"isMonotonicallyDecreasing":{"type":["boolean","null"]},"isUnique":{"type":["boolean","null"]},"isCyclic":{"type":["boolean","null"]},"isHeterogeneousIdentifier":{"type":["boolean","null"]},"compositeScopeConceptId":{"type":["string","null"]},"isUniformDistribution":{"type":["boolean","null"]},"locationType":{"anyOf":[{"$ref":"#/components/schemas/AnchorLocationTypeEnum"},{"type":"null"}]},"coordinateFormat":{"anyOf":[{"$ref":"#/components/schemas/CoordinateFormatEnum"},{"type":"null"}]},"coordinateDatum":{"anyOf":[{"$ref":"#/components/schemas/CoordinateDatumEnum"},{"type":"null"}]},"coordinatePairConceptId":{"type":["string","null"]},"locationDetectionSource":{"anyOf":[{"$ref":"#/components/schemas/LocationDetectionSourceEnum"},{"type":"null"}]},"latitudeInRangeFraction":{"type":["number","null"]},"longitudeInRangeFraction":{"type":["number","null"]},"fractionalPartFraction":{"type":["number","null"]},"coordinatePairFraction":{"type":["number","null"]},"dmsCoordinateFraction":{"type":["number","null"]},"postalCodeFraction":{"type":["number","null"]},"addressShapeFraction":{"type":["number","null"]},"enrichments":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EnrichmentRecordSchema"}},{"type":"null"}]},"geoEnrichmentStatus":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentStatusEnum"},{"type":"null"}]},"geoEnrichmentKind":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentKindEnum"},{"type":"null"}]},"geoEnrichedAt":{"type":["string","null"]},"geoEnrichmentVersion":{"type":["number","null"]},"geoSidecarKey":{"type":["string","null"]},"geoDistinctTotal":{"type":["number","null"]},"geoMatchedCount":{"type":["number","null"]},"geoUnmatchedCount":{"type":["number","null"]},"geoTruncated":{"type":["boolean","null"]},"geoEnrichmentError":{"type":["string","null"]},"nanFillStrategy":{"anyOf":[{"$ref":"#/components/schemas/NanFillStrategyEnum"},{"type":"null"}]},"changeRate":{"type":["number","null"]},"dateTimeFormat":{"type":["string","null"]},"displayFormat":{"type":["string","null"]},"averageInterval":{"type":["number","null"]},"isConsistentInterval":{"type":["boolean","null"]},"unit":{"type":["string","null"]},"unitModifier":{"type":["number","null"]},"higherIsBetter":{"type":["boolean","null"]},"isEqualInterval":{"type":["boolean","null"]},"intervalSize":{"type":["number","null"]},"valueClass":{"anyOf":[{"$ref":"#/components/schemas/ValueClassEnum"},{"type":"null"}]},"fracZero":{"type":["number","null"]},"zeroRunLengthP95":{"type":["number","null"]},"nonZeroRunLengthP95":{"type":["number","null"]},"trendSlopePerSecond":{"type":["number","null"]},"trendR2":{"type":["number","null"]},"emailFraction":{"type":["number","null"]},"medianLength":{"type":["number","null"]},"distinctLengthCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"tsGranularity":{"type":["string","null"]},"tsValidGranularities":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"tsTypicalDeltaSeconds":{"type":["number","null"]},"tsSelectedGrid":{"type":["string","null"]},"tsGapProfile":{"anyOf":[{"$ref":"#/components/schemas/GapProfileSchema"},{"type":"null"}]},"tsSeasonalPeriods":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SeasonalPeriodSchema"}},{"type":"null"}]},"tsCategoricalSeasonality":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CategoricalSeasonalPeriodSchema"}},{"type":"null"}]},"tsMissingPatterns":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"tsActiveWindows":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"tsPerEnvProfiles":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TimeSeriesEnvProfileSchema"}},{"type":"null"}]},"tsAnalyzerVersion":{"type":["string","null"]},"tsAnalyzedAt":{"type":["string","null"]},"elementSchemaType":{"anyOf":[{"$ref":"#/components/schemas/SchemaMainTypeEnum"},{"type":"null"}]},"elementCategories":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"sizeStatistics":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]}},"additionalProperties":true},"AnchorLocationTypeEnum":{"type":"string","enum":["latitude","longitude","coordinate","country","region","city","postal_code","address","continent","airport_code","unlocode"]},"CoordinateFormatEnum":{"type":"string","enum":["dd","dms","ddm"]},"CoordinateDatumEnum":{"type":"string","enum":["wgs84","gcj02","bd09"]},"LocationDetectionSourceEnum":{"type":"string","enum":["values","column_name","user"]},"EnrichmentRecordSchema":{"type":"object","properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentStatusEnum"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentKindEnum"},{"type":"null"}]},"enrichedAt":{"type":["string","null"]},"enricherVersion":{"type":["string","null"]},"dataVersion":{"type":["string","null"]},"version":{"type":["number","null"]},"sidecarKey":{"type":["string","null"]},"keyFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"hintFields":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"corroborationFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"latLonPrecision":{"type":["number","null"]},"distinctTotal":{"type":["number","null"]},"matchedCount":{"type":["number","null"]},"unmatchedCount":{"type":["number","null"]},"truncated":{"type":["boolean","null"]},"error":{"type":["string","null"]},"appliedDatum":{"type":["string","null"]}}},"GeoEnrichmentStatusEnum":{"type":"string","enum":["running","completed","partial","failed"]},"GeoEnrichmentKindEnum":{"type":"string","enum":["forward","reverse"]},"NanFillStrategyEnum":{"type":"string","enum":["forward","interpolate","zero","drop","undefined"]},"ValueClassEnum":{"type":"string","enum":["continuous","sparse_event","bursty","binary_indicator"]},"GapProfileSchema":{"type":"object","properties":{"expectedIntervalSeconds":{"type":["number","null"]},"p50GapSeconds":{"type":["number","null"]},"p95GapSeconds":{"type":["number","null"]},"p99GapSeconds":{"type":["number","null"]},"maxGapSeconds":{"type":["number","null"]},"gapCount":{"type":["number","null"]},"largestGapStart":{"type":["string","null"]}}},"SeasonalPeriodSchema":{"type":"object","properties":{"periodSeconds":{"type":"number"},"cycleLabel":{"type":["string","null"]},"strength":{"type":"number"},"confidence":{"type":"number"},"amplitude":{"type":["number","null"]},"phase":{"type":["number","null"]},"order":{"type":"number","default":1}},"required":["periodSeconds","strength","confidence"]},"CategoricalSeasonalPeriodSchema":{"type":"object","properties":{"periodSeconds":{"type":"number"},"cycleLabel":{"type":["string","null"]},"nPhaseBins":{"type":"number"},"cramersV":{"type":"number"},"chi2PerDof":{"type":["number","null"]},"phaseDistribution":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"number"}}},{"type":"null"}]},"levels":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["periodSeconds","nPhaseBins","cramersV"]},"CyclicPatternSchema":{"type":"object","properties":{"cycle":{"$ref":"#/components/schemas/CycleNameEnum"},"activeIndices":{"type":"array","items":{"type":"number"},"default":[]},"inactiveIndices":{"type":"array","items":{"type":"number"},"default":[]},"densityByIndex":{"type":"object","additionalProperties":{"type":"number"},"default":{}},"aggByIndex":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]}},"required":["cycle"]},"CycleNameEnum":{"type":"string","enum":["hour_of_day","day_of_week","day_of_month","month_of_year","week_of_year"]},"TimeSeriesEnvProfileSchema":{"type":"object","properties":{"envKey":{"type":"string"},"tsSeasonalPeriods":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SeasonalPeriodSchema"}},{"type":"null"}]},"tsCategoricalSeasonality":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CategoricalSeasonalPeriodSchema"}},{"type":"null"}]},"tsMissingPatterns":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"tsActiveWindows":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"trendSlopePerSecond":{"type":["number","null"]},"trendR2":{"type":["number","null"]},"tsTypicalDeltaSeconds":{"type":["number","null"]}},"required":["envKey"]},"BindingStatusEnum":{"type":"string","enum":["confirmed","suggested"]},"BindingSourceEnum":{"type":"string","enum":["ingest","statistical","llm","user","install"]},"KeyRoleEnum":{"type":"string","enum":["primary","foreign"]},"ConformanceReportSchema":{"type":"object","properties":{"rowsScanned":{"type":"number"},"nullRate":{"type":"number"},"allowedValueCoverage":{"type":["number","null"]},"unresolvedValues":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"number"}},"required":["value","count"]},"default":[]},"inferredGranularity":{"type":["string","null"]},"granularityMatch":{"type":["boolean","null"]},"duplicateAnchorKeys":{"type":["number","null"]},"unitNote":{"type":["string","null"]},"verdict":{"$ref":"#/components/schemas/ConformanceVerdictEnum","default":"pass"}},"required":["rowsScanned","nullRate"]},"ConformanceVerdictEnum":{"type":"string","enum":["pass","warn","fail"]},"DerivedConceptInfoSchema":{"type":"object","properties":{"formula":{"type":["string","null"]},"formulaBlocks":{"anyOf":[{"oneOf":[{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"template"},"blockType":{"type":"string","minLength":1},"values":{"type":"object","additionalProperties":{}}},"required":["nodeId","kind","blockType"]},{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"structural"},"blockType":{"type":"string","enum":["binary","ifElse"]},"values":{"type":"object","additionalProperties":{}},"children":{"type":"object","additionalProperties":{"anyOf":[{"oneOf":[{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"template"},"blockType":{"type":"string","minLength":1},"values":{"type":"object","additionalProperties":{}}},"required":["nodeId","kind","blockType"]},{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"structural"},"blockType":{"type":"string","enum":["binary","ifElse"]},"values":{"type":"object","additionalProperties":{}},"children":{"type":"object","additionalProperties":{"anyOf":[{},{"type":"null"}]}}},"required":["nodeId","kind","blockType","children"]}],"discriminator":{"propertyName":"kind"}},{"type":"null"}]}}},"required":["nodeId","kind","blockType","children"]}],"discriminator":{"propertyName":"kind"}},{"type":"null"}]},"derivedType":{"$ref":"#/components/schemas/DerivedTypeEnum","default":"manual"},"kind":{"anyOf":[{"$ref":"#/components/schemas/DerivedInfoKindEnum"},{"type":"null"}]},"source":{"anyOf":[{"$ref":"#/components/schemas/DerivedSourceEnum"},{"type":"null"}]},"sourceColumns":{"type":"array","items":{"type":"string"},"default":[]},"expression":{"type":["string","null"]},"r2":{"type":["number","null"]},"isDeterministic":{"type":["boolean","null"]},"lag":{"type":["number","null"]},"cumulativeDirection":{"type":["string","null"]},"sourceDataViewId":{"type":["string","null"]},"operationLineage":{"anyOf":[{"$ref":"#/components/schemas/OperationLineageSchema"},{"type":"null"}]},"viewSnapshot":{"anyOf":[{"$ref":"#/components/schemas/ViewSnapshotSchema"},{"type":"null"}]},"lineageHash":{"type":["string","null"]},"sourceJoinConfig":{"anyOf":[{"$ref":"#/components/schemas/SourceJoinConfigSchema"},{"type":"null"}]}}},"DerivedTypeEnum":{"type":"string","enum":["manual","datetime_component","lag","cumulative","step_change","algebraic_identity","complement","ratio","view_operation"]},"DerivedInfoKindEnum":{"type":"string","enum":["op","formula","detected","join"]},"DerivedSourceEnum":{"type":"string","enum":["user","detected","discovered"]},"OperationLineageSchema":{"type":"object","properties":{"opType":{"$ref":"#/components/schemas/OperationTypeEnum"},"opId":{"type":"string"},"parentColumns":{"type":"array","items":{"type":"string"},"default":[]},"parentConceptIds":{"type":"array","items":{"type":"string"},"default":[]}},"required":["opType","opId"]},"OperationTypeEnum":{"type":"string","enum":["SQL_QUERY","FILTER","AGGREGATE","JOIN","CONCATENATE","SORT","SPLIT_COLUMN","DROP_COLUMNS","REMOVE_DUPLICATES","IMPUTE_NULLS","DROP_NULLS","REPLACE_VALUES","REPLACE_TYPE","INTERPOLATE_TIME","CLIP_OUTLIERS","NORMALIZE_NUMERIC","MAP_CATEGORIES","TIME_SERIES_AGGREGATE","TIME_SERIES_JOIN","TRANSPOSE","FREQUENCY_ANALYSIS","CYCLIC_AGGREGATE","DIFF","DATE_DIFF","CUMULATIVE","ARRAY_DECOMPOSE","ARRAY_CONSOLIDATE","ARRAY_EXPLODE","ARRAY_AGGREGATE","JSON_FLATTEN"]},"ViewSnapshotSchema":{"type":"object","properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceSchema"}},"operations":{"type":"array","items":{"$ref":"#/components/schemas/OperationSchema"}},"outputColumn":{"type":"string"}},"required":["sources","operations","outputColumn"]},"SourceSchema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"DATASET"},"name":{"type":["string","null"]},"conceptIds":{"type":"array","items":{"type":"string"}},"conceptVersions":{"anyOf":[{"type":"object","additionalProperties":{"type":"integer","minimum":0}},{"type":"null"}]},"version":{"anyOf":[{"$ref":"#/components/schemas/SourcePinSchema"},{"type":"null"}]}},"required":["id","type","conceptIds"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"DATA_VIEW"},"name":{"type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"CONCEPT"},"name":{"type":["string","null"]},"prioritiseCalculation":{"type":"boolean","default":true},"showCalculationColumns":{"type":"boolean","default":false}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"GEO_SIDECAR"},"name":{"type":["string","null"]},"conceptId":{"type":"string"},"sidecarKey":{"type":"string"}},"required":["id","type","conceptId","sidecarKey"]}],"discriminator":{"propertyName":"type"}},"SourcePinSchema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"latest"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"pinned"},"versionId":{"type":"string"}},"required":["kind","versionId"]}],"discriminator":{"propertyName":"kind"}},"OperationSchema":{"type":"object","properties":{"id":{"type":"string"},"sourceId":{"type":"string"},"config":{"$ref":"#/components/schemas/OperationConfigSchema"}},"required":["id","sourceId","config"]},"OperationConfigSchema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"FILTER"},"filterGroup":{"anyOf":[{"$ref":"#/components/schemas/FilterSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]}},"required":["type","filterGroup"]},{"type":"object","properties":{"type":{"type":"string","const":"AGGREGATE"},"groupByColumns":{"type":"array","items":{"type":"string"}},"aggregations":{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}}},"required":["type","groupByColumns","aggregations"]},{"type":"object","properties":{"type":{"type":"string","const":"JOIN"},"joinType":{"$ref":"#/components/schemas/JoinTypeEnum"},"columnPairs":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/JoinColumnPairSchema"}},{"type":"null"}]},"leftField":{"type":["string","null"]},"rightField":{"type":["string","null"]},"conflictResolution":{"$ref":"#/components/schemas/JoinConflictResolutionEnum"},"leftPrefix":{"type":["string","null"]},"rightPrefix":{"type":["string","null"]}},"required":["type","joinType","conflictResolution"]},{"type":"object","properties":{"type":{"type":"string","const":"CONCATENATE"},"topSource":{"type":["string","null"]},"bottomSource":{"type":["string","null"]},"sources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"columnMapping":{"type":"object","additionalProperties":{"type":"string"}},"unmatchedRule":{"$ref":"#/components/schemas/UnmatchedRuleEnum"},"discriminatorColumn":{"type":["string","null"]},"discriminatorValues":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["type","columnMapping","unmatchedRule"]},{"type":"object","properties":{"type":{"type":"string","const":"SORT"},"sortColumns":{"type":"array","items":{"$ref":"#/components/schemas/SortColumnSchema"}}},"required":["type","sortColumns"]},{"type":"object","properties":{"type":{"type":"string","const":"SQL_QUERY"},"query":{"type":"string"},"columnSourceAliases":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["type","query"]},{"type":"object","properties":{"type":{"type":"string","const":"SPLIT_COLUMN"},"columnToSplit":{"type":"string"},"splitType":{"$ref":"#/components/schemas/SplitTypeEnum"},"delimiter":{"type":["string","null"]},"columns":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/NewColumnDefinitionSchema"}},{"type":"null"}]}},"required":["type","columnToSplit","splitType"]},{"type":"object","properties":{"type":{"type":"string","const":"DROP_COLUMNS"},"columns":{"type":"array","items":{"type":"string"}}},"required":["type","columns"]},{"type":"object","properties":{"type":{"type":"string","const":"REMOVE_DUPLICATES"},"column":{"type":["string","null"]},"keep":{"$ref":"#/components/schemas/KeepEnum","default":"first"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"IMPUTE_NULLS"},"method":{"$ref":"#/components/schemas/ImputeMethodEnum","default":"constant"},"column":{"type":["string","null"]},"fillValue":{"anyOf":[{"type":["string","number","boolean"]},{"type":"null"}]},"imputations":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"method":{"$ref":"#/components/schemas/ImputeMethodEnum","default":"constant"},"fillValue":{"anyOf":[{"type":["string","number","boolean"]},{"type":"null"}]}},"required":["column"]}},{"type":"null"}]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"DROP_NULLS"},"axis":{"type":"string","enum":["rows","empty_columns"],"default":"rows"},"column":{"type":["string","null"]},"columns":{"type":"array","items":{"type":"string"},"default":[]},"nullThresholdPercent":{"type":"number","default":100}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"REPLACE_VALUES"},"column":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":["string","null"]}}},"required":["type","column","mapping"]},{"type":"object","properties":{"type":{"type":"string","const":"REPLACE_TYPE"},"changes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"toType":{"$ref":"#/components/schemas/SchemaMainTypeEnum"},"toSubType":{"anyOf":[{"$ref":"#/components/schemas/SchemaSubTypeEnum"},{"type":"null"}]},"dateFormat":{"type":["string","null"]}},"required":["column","toType"]}},{"type":"null"}]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"INTERPOLATE_TIME"},"column":{"type":"string"},"frequency":{"type":"string"},"method":{"$ref":"#/components/schemas/InterpolateTimeMethodEnum"}},"required":["type","column","frequency","method"]},{"type":"object","properties":{"type":{"type":"string","const":"CLIP_OUTLIERS"},"column":{"type":"string"},"lowerQuantile":{"type":"number","default":0.05},"upperQuantile":{"type":"number","default":0.95}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"NORMALIZE_NUMERIC"},"column":{"type":"string"},"method":{"$ref":"#/components/schemas/NormalizeNumericMethodEnum","default":"z_score"}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"MAP_CATEGORIES"},"column":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}},"defaultValue":{"type":["string","null"]}},"required":["type","column","mapping"]},{"type":"object","properties":{"type":{"type":"string","const":"TIME_SERIES_AGGREGATE"},"timeColumn":{"type":"string"},"granularity":{"type":"string","enum":["nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"]},"aggregations":{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}},"dateFormat":{"anyOf":[{"$ref":"#/components/schemas/DatetimeFormatSchema"},{"type":"null"}]}},"required":["type","timeColumn","granularity","aggregations"]},{"type":"object","properties":{"type":{"type":"string","const":"TIME_SERIES_JOIN"},"joinType":{"$ref":"#/components/schemas/JoinTypeEnum"},"leftTimeColumn":{"type":"string"},"rightTimeColumn":{"type":"string"},"rightSource":{"type":"string"},"strategy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"exact"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"granularity"},"granularity":{"type":"string","enum":["nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"]}},"required":["type","granularity"]},{"type":"object","properties":{"type":{"type":"string","const":"asOf"},"direction":{"$ref":"#/components/schemas/AsOfDirectionEnum"},"tolerance":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"unit":{"$ref":"#/components/schemas/ToleranceUnitEnum"}},"required":["value","unit"]},{"type":"null"}]}},"required":["type","direction"]},{"type":"object","properties":{"type":{"type":"string","const":"interval"},"leftEndColumn":{"type":"string"}},"required":["type","leftEndColumn"]}],"discriminator":{"propertyName":"type"}},"exactMatchKeys":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"leftField":{"type":"string"},"rightField":{"type":"string"}},"required":["leftField","rightField"]}},{"type":"null"}]},"multiMatch":{"$ref":"#/components/schemas/MultiMatchStrategyEnum"},"multiMatchAggregations":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}},{"type":"null"}]}},"required":["type","joinType","leftTimeColumn","rightTimeColumn","rightSource","strategy","multiMatch"]},{"type":"object","properties":{"type":{"type":"string","const":"TRANSPOSE"},"timeColumn":{"type":"string"},"envColumns":{"type":"array","items":{"type":"string"}},"valueColumns":{"type":"array","items":{"type":"string"}},"columnTemplate":{"type":"string"},"joinStrategy":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"exact"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"granularity"},"granularity":{"type":"string","enum":["nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"]}},"required":["type","granularity"]},{"type":"object","properties":{"type":{"type":"string","const":"asOf"},"direction":{"$ref":"#/components/schemas/AsOfDirectionEnum"},"tolerance":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"unit":{"$ref":"#/components/schemas/ToleranceUnitEnum"}},"required":["value","unit"]},{"type":"null"}]}},"required":["type","direction"]}],"discriminator":{"propertyName":"type"}},{"type":"null"}]}},"required":["type","timeColumn","envColumns","valueColumns","columnTemplate"]},{"type":"object","properties":{"type":{"type":"string","const":"FREQUENCY_ANALYSIS"},"timeColumn":{"type":"string"},"valueColumns":{"type":"array","items":{"type":"string"}},"method":{"$ref":"#/components/schemas/FrequencyMethodEnum"},"windowFunction":{"$ref":"#/components/schemas/FrequencyWindowFunctionEnum","default":"hann"},"windowSize":{"type":["number","null"]},"overlap":{"type":"number","default":0.5},"samplingRateHz":{"type":["number","null"]},"outputFormat":{"$ref":"#/components/schemas/FrequencyOutputFormatEnum"},"frequencyRange":{"anyOf":[{"type":"object","properties":{"minHz":{"type":["number","null"]},"maxHz":{"type":["number","null"]}}},{"type":"null"}]},"frequencyUnit":{"$ref":"#/components/schemas/FrequencyUnitEnum","default":"hz"}},"required":["type","timeColumn","valueColumns","method","outputFormat"]},{"type":"object","properties":{"type":{"type":"string","const":"CYCLIC_AGGREGATE"},"timeColumn":{"type":"string"},"cycleComponent":{"$ref":"#/components/schemas/CyclicComponentEnum"},"aggregations":{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}}},"required":["type","timeColumn","cycleComponent","aggregations"]},{"type":"object","properties":{"type":{"type":"string","const":"DIFF"},"timeColumn":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"partitionColumns":{"type":"array","items":{"type":"string"},"default":[]},"outputSuffix":{"type":"string","default":"_diff"},"replaceColumns":{"type":"boolean","default":false}},"required":["type","timeColumn","columns"]},{"type":"object","properties":{"type":{"type":"string","const":"DATE_DIFF"},"startColumn":{"type":"string"},"endColumn":{"type":"string"},"unit":{"$ref":"#/components/schemas/DateDiffUnitEnum","default":"days"},"sign":{"$ref":"#/components/schemas/DateDiffSignEnum","default":"signed"},"outputColumn":{"type":["string","null"]}},"required":["type","startColumn","endColumn"]},{"type":"object","properties":{"type":{"type":"string","const":"CUMULATIVE"},"timeColumn":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"partitionColumns":{"type":"array","items":{"type":"string"},"default":[]},"outputSuffix":{"type":"string","default":"_cumsum"},"replaceColumns":{"type":"boolean","default":false}},"required":["type","timeColumn","columns"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_DECOMPOSE"},"column":{"type":"string"},"mode":{"$ref":"#/components/schemas/ArrayDecomposeModeEnum","default":"position"},"maxColumns":{"type":"integer","exclusiveMinimum":0,"default":500},"outputPrefix":{"type":"string","default":"_"}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_CONSOLIDATE"},"groups":{"type":"array","items":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string"},"minItems":1},"outputColumn":{"type":"string"},"dropSource":{"type":"boolean","default":true},"includeNulls":{"type":"boolean","default":false}},"required":["columns","outputColumn"]},"minItems":1}},"required":["type","groups"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_EXPLODE"},"column":{"type":"string"},"outputColumn":{"type":["string","null"]},"preserveIndex":{"type":"boolean","default":false}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_AGGREGATE"},"column":{"type":"string"},"aggregation":{"$ref":"#/components/schemas/ArrayAggregationKindEnum"},"outputColumn":{"type":["string","null"]}},"required":["type","column","aggregation"]},{"type":"object","properties":{"type":{"type":"string","const":"JSON_FLATTEN"},"column":{"type":"string"},"maxColumns":{"type":"integer","exclusiveMinimum":0,"default":500},"separator":{"type":"string","default":"."},"dropSource":{"type":"boolean","default":true}},"required":["type","column"]}],"discriminator":{"propertyName":"type"}},"FilterSchema":{"type":"object","properties":{"column":{"type":"string"},"comparisonOperator":{"$ref":"#/components/schemas/ComparisonOperatorEnum"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":["string","number","boolean"]}}]},"correctType":{"type":"boolean"}},"required":["column","comparisonOperator","value","correctType"]},"ComparisonOperatorEnum":{"type":"string","enum":["Equal to","Not Equal to","Contains","Does not contain","Starts with","Ends with","Is Empty","Is not Empty","Less than","Greater than","Less than or equal to","Greater than or equal to","Before","After","Array contains","Array contains any","Array contains all","Array does not contain","Array does not contain any","Array does not contain all","Array size equal to","Array size greater than","Array size less than"]},"FilterGroupSchema":{"type":"object","properties":{"booleanOperator":{"$ref":"#/components/schemas/LogicalOperatorEnum"},"filters":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/FilterSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]}}},"required":["booleanOperator","filters"]},"LogicalOperatorEnum":{"type":"string","enum":["AND","OR"]},"AggregationFunctionSchema":{"type":"object","properties":{"column":{"type":"string"},"function":{"$ref":"#/components/schemas/AggregateFunctionEnum"},"alias":{"type":["string","null"]},"filter":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/FilterSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]},{"type":"null"}]}},"required":["column","function"]},"AggregateFunctionEnum":{"type":"string","enum":["sum","avg","min","max","count","countDistinct","first","last","categoryShare"]},"JoinTypeEnum":{"type":"string","enum":["inner","left","right","full"]},"JoinColumnPairSchema":{"type":"object","properties":{"leftField":{"type":"string"},"rightField":{"type":"string"}},"required":["leftField","rightField"]},"JoinConflictResolutionEnum":{"type":"string","enum":["keep_left","keep_right","prefix"]},"UnmatchedRuleEnum":{"type":"string","enum":["error","drop","append"]},"SortColumnSchema":{"type":"object","properties":{"column":{"type":"string"},"direction":{"$ref":"#/components/schemas/SortDirectionEnum"}},"required":["column","direction"]},"SortDirectionEnum":{"type":"string","enum":["asc","desc"]},"SplitTypeEnum":{"type":"string","enum":["delimiter","pattern"]},"NewColumnDefinitionSchema":{"type":"object","properties":{"name":{"type":"string"},"pattern":{"type":["string","null"]}},"required":["name"]},"KeepEnum":{"type":"string","enum":["first","last"]},"ImputeMethodEnum":{"type":"string","enum":["mean","median","mode","constant"]},"InterpolateTimeMethodEnum":{"type":"string","enum":["linear","time","index"]},"NormalizeNumericMethodEnum":{"type":"string","enum":["min_max","z_score"]},"DatetimeFormatSchema":{"type":"string","minLength":1},"AsOfDirectionEnum":{"type":"string","enum":["backward","forward","nearest"]},"ToleranceUnitEnum":{"type":"string","enum":["us","ms","s","m","h","d"]},"MultiMatchStrategyEnum":{"type":"string","enum":["first","last","aggregate"]},"FrequencyMethodEnum":{"type":"string","enum":["fft","welch"]},"FrequencyWindowFunctionEnum":{"type":"string","enum":["hann","hamming","blackman","rectangular"]},"FrequencyOutputFormatEnum":{"type":"string","enum":["spectrogram","time_frequency_long"]},"FrequencyUnitEnum":{"type":"string","enum":["hz","per_minute","per_hour","per_day","per_week","per_month","per_year"]},"CyclicComponentEnum":{"type":"string","enum":["second_in_minute","minute_in_hour","hour_of_day","day_of_week","day_of_month","week_of_year","month_of_year","quarter_of_year"]},"DateDiffUnitEnum":{"type":"string","enum":["seconds","minutes","hours","days","weeks"]},"DateDiffSignEnum":{"type":"string","enum":["signed","absolute"]},"ArrayDecomposeModeEnum":{"type":"string","enum":["position","one_hot"]},"ArrayAggregationKindEnum":{"type":"string","enum":["mean","sum","min","max","median","count"]},"SourceJoinConfigSchema":{"type":"object","properties":{"joinType":{"type":"string","enum":["left","inner"],"default":"left"},"strategy":{"type":["string","null"]}}},"ConceptKindEnum":{"type":"string","enum":["standard","derived","metric"]},"RelationshipRuleSchema":{"type":"object","properties":{"ruleType":{"$ref":"#/components/schemas/RelationshipRuleTypeEnum"},"sourceVariable":{"type":"string"},"condition":{"anyOf":[{"$ref":"#/components/schemas/ConditionSchema"},{"type":"null"}]},"allowedValues":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean"]}},{"type":"null"}]},"minValue":{"type":["number","null"]},"maxValue":{"type":["number","null"]},"confidence":{"type":"number","default":1},"support":{"type":"number","default":0},"strength":{"anyOf":[{"$ref":"#/components/schemas/RuleStrengthEnum"},{"type":"null"}]},"violationRate":{"type":["number","null"]},"source":{"type":["string","null"]},"cycle":{"type":["string","null"]}},"required":["ruleType","sourceVariable"]},"RelationshipRuleTypeEnum":{"type":"string","enum":["conditional_values","range","set","cyclic_active_window","cyclic_missing"]},"ConditionSchema":{"type":"object","properties":{"variable":{"type":"string"},"operator":{"type":"string","enum":["eq","ne","gt","lt","ge","le","in","not_in"]},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":["number","string","boolean"]}}]}},"required":["variable","operator","value"]},"RuleStrengthEnum":{"type":"string","enum":["hard","soft"]},"SuggestedRoleEnum":{"type":"string","enum":["source","target"]},"ConceptValueMappingSchema":{"type":"object","properties":{"canonicalValue":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"default":[]}},"required":["canonicalValue"]},"DetectedConceptStructureSchema":{"type":"object","properties":{"temporalPrerequisites":{"type":"array","items":{"type":"string"},"default":[]},"suggestedRole":{"anyOf":[{"$ref":"#/components/schemas/SuggestedRoleEnum"},{"type":"null"}]}}}},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/ontology/concepts/{id}":{"get":{"operationId":"get-api-v1-workspaces-{wsId}-ontology-concepts-{id}","summary":"Get ontology concept","description":"Returns the concept by id from platform MongoDB. Must belong to the workspace.","tags":["Ontology"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: id"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyConceptEnvelope"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Replace ontology concept

> Replaces the concept with the provided fields. Platform loads the existing concept, merges the body, preserves the persisted editVersion when omitted, then proxies to data-service POST /api/ontology/update-concept so downstream consumers (e.g. catalog, data-service) stay in sync. Body should include \_id and any fields to update.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Ontology"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"PublicConceptUpdateInput":{"type":"object","properties":{"_id":{"type":"string"},"ownerId":{"type":"string","default":"system"},"organisationId":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"conceptClassification":{"anyOf":[{"$ref":"#/components/schemas/ConceptClassificationEnum"},{"type":"null"}]},"anchorConceptLinks":{"type":"array","items":{"type":"string"},"default":[]},"schemaFieldName":{"type":"string"},"schemaType":{"$ref":"#/components/schemas/SchemaMainTypeEnum"},"schemaSubtype":{"anyOf":[{"$ref":"#/components/schemas/SchemaSubTypeEnum"},{"type":"null"}]},"metadata":{"$ref":"#/components/schemas/ConceptMetadataSchema"},"lockedMetadataFields":{"type":"array","items":{"type":"string"}},"detectedMetadata":{"anyOf":[{"$ref":"#/components/schemas/ConceptMetadataSchema"},{"type":"null"}]},"derivedInfo":{"anyOf":[{"$ref":"#/components/schemas/DerivedConceptInfoSchema"},{"type":"null"}]},"conceptKind":{"$ref":"#/components/schemas/ConceptKindEnum","default":"standard"},"metricSql":{"type":["string","null"]},"relationshipRules":{"type":"array","items":{"$ref":"#/components/schemas/RelationshipRuleSchema"},"default":[]},"temporalPrerequisites":{"type":"array","items":{"type":"string"},"default":[]},"suggestedRole":{"anyOf":[{"$ref":"#/components/schemas/SuggestedRoleEnum"},{"type":"null"}]},"trustTier":{"anyOf":[{"type":"string","enum":["exploratory","curated_pending","curated"]},{"type":"null"}]},"ontologyRef":{"anyOf":[{"type":"object","properties":{"ontologyId":{"type":"string"},"ontologyVersion":{"type":"string"},"canonicalId":{"type":"string"},"installScope":{"anyOf":[{"type":"object","properties":{"conceptCanonicalIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"filters":{"type":"array","items":{"type":"object","properties":{"conceptRef":{"type":"string"},"values":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"start":{"type":["string","null"]},"end":{"type":["string","null"]}},"required":["conceptRef"]},"default":[]}}},{"type":"null"}]}},"required":["ontologyId","ontologyVersion","canonicalId"]},{"type":"null"}]},"layerIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"},"default":[]},"valueMappings":{"type":"array","items":{"$ref":"#/components/schemas/ConceptValueMappingSchema"},"default":[]},"lockedConceptFields":{"type":"array","items":{"type":"string"}},"detectedConceptStructure":{"anyOf":[{"$ref":"#/components/schemas/DetectedConceptStructureSchema"},{"type":"null"}]},"lastEditedBy":{"type":["string","null"]},"lastEditedAt":{"type":["string","null"]},"lineageDrift":{"type":["boolean","null"]},"editVersion":{"type":"integer","minimum":0,"default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"fieldMappings":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"status":{"$ref":"#/components/schemas/BindingStatusEnum","default":"confirmed"},"source":{"$ref":"#/components/schemas/BindingSourceEnum","default":"ingest"},"confidence":{"type":["number","null"]},"evidence":{"type":["string","null"]},"valueMap":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"string"}]}},{"allOf":[{},{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"string"}]}}]}]},{"type":"null"}]},"canonicalField":{"type":["string","null"]},"scopeFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"precedence":{"type":["number","null"]},"keyRole":{"anyOf":[{"$ref":"#/components/schemas/KeyRoleEnum"},{"type":"null"}]},"conformance":{"anyOf":[{"$ref":"#/components/schemas/ConformanceReportSchema"},{"type":"null"}]},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"sourceId":{"type":"string"}},"required":["field","sourceId"]}}},"required":["_id"]},"ConceptClassificationEnum":{"type":"string","enum":["identifier","location","time"]},"SchemaMainTypeEnum":{"type":"string","enum":["None","String","Category","Number","Boolean","DateTime","Array","Unknown"]},"SchemaSubTypeEnum":{"type":"string","enum":["Integer","Float","UnsignedInteger","UnsignedFloat","String","Number","Category","Boolean","DateTime"]},"ConceptMetadataSchema":{"type":"object","properties":{"categories":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"minValue":{"type":["number","null"]},"maxValue":{"type":["number","null"]},"isMonotonicallyIncreasing":{"type":["boolean","null"]},"isMonotonicallyDecreasing":{"type":["boolean","null"]},"isUnique":{"type":["boolean","null"]},"isCyclic":{"type":["boolean","null"]},"isHeterogeneousIdentifier":{"type":["boolean","null"]},"compositeScopeConceptId":{"type":["string","null"]},"isUniformDistribution":{"type":["boolean","null"]},"locationType":{"anyOf":[{"$ref":"#/components/schemas/AnchorLocationTypeEnum"},{"type":"null"}]},"coordinateFormat":{"anyOf":[{"$ref":"#/components/schemas/CoordinateFormatEnum"},{"type":"null"}]},"coordinateDatum":{"anyOf":[{"$ref":"#/components/schemas/CoordinateDatumEnum"},{"type":"null"}]},"coordinatePairConceptId":{"type":["string","null"]},"locationDetectionSource":{"anyOf":[{"$ref":"#/components/schemas/LocationDetectionSourceEnum"},{"type":"null"}]},"latitudeInRangeFraction":{"type":["number","null"]},"longitudeInRangeFraction":{"type":["number","null"]},"fractionalPartFraction":{"type":["number","null"]},"coordinatePairFraction":{"type":["number","null"]},"dmsCoordinateFraction":{"type":["number","null"]},"postalCodeFraction":{"type":["number","null"]},"addressShapeFraction":{"type":["number","null"]},"enrichments":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EnrichmentRecordSchema"}},{"type":"null"}]},"geoEnrichmentStatus":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentStatusEnum"},{"type":"null"}]},"geoEnrichmentKind":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentKindEnum"},{"type":"null"}]},"geoEnrichedAt":{"type":["string","null"]},"geoEnrichmentVersion":{"type":["number","null"]},"geoSidecarKey":{"type":["string","null"]},"geoDistinctTotal":{"type":["number","null"]},"geoMatchedCount":{"type":["number","null"]},"geoUnmatchedCount":{"type":["number","null"]},"geoTruncated":{"type":["boolean","null"]},"geoEnrichmentError":{"type":["string","null"]},"nanFillStrategy":{"anyOf":[{"$ref":"#/components/schemas/NanFillStrategyEnum"},{"type":"null"}]},"changeRate":{"type":["number","null"]},"dateTimeFormat":{"type":["string","null"]},"displayFormat":{"type":["string","null"]},"averageInterval":{"type":["number","null"]},"isConsistentInterval":{"type":["boolean","null"]},"unit":{"type":["string","null"]},"unitModifier":{"type":["number","null"]},"higherIsBetter":{"type":["boolean","null"]},"isEqualInterval":{"type":["boolean","null"]},"intervalSize":{"type":["number","null"]},"valueClass":{"anyOf":[{"$ref":"#/components/schemas/ValueClassEnum"},{"type":"null"}]},"fracZero":{"type":["number","null"]},"zeroRunLengthP95":{"type":["number","null"]},"nonZeroRunLengthP95":{"type":["number","null"]},"trendSlopePerSecond":{"type":["number","null"]},"trendR2":{"type":["number","null"]},"emailFraction":{"type":["number","null"]},"medianLength":{"type":["number","null"]},"distinctLengthCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"tsGranularity":{"type":["string","null"]},"tsValidGranularities":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"tsTypicalDeltaSeconds":{"type":["number","null"]},"tsSelectedGrid":{"type":["string","null"]},"tsGapProfile":{"anyOf":[{"$ref":"#/components/schemas/GapProfileSchema"},{"type":"null"}]},"tsSeasonalPeriods":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SeasonalPeriodSchema"}},{"type":"null"}]},"tsCategoricalSeasonality":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CategoricalSeasonalPeriodSchema"}},{"type":"null"}]},"tsMissingPatterns":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"tsActiveWindows":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"tsPerEnvProfiles":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TimeSeriesEnvProfileSchema"}},{"type":"null"}]},"tsAnalyzerVersion":{"type":["string","null"]},"tsAnalyzedAt":{"type":["string","null"]},"elementSchemaType":{"anyOf":[{"$ref":"#/components/schemas/SchemaMainTypeEnum"},{"type":"null"}]},"elementCategories":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"sizeStatistics":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]}},"additionalProperties":true},"AnchorLocationTypeEnum":{"type":"string","enum":["latitude","longitude","coordinate","country","region","city","postal_code","address","continent","airport_code","unlocode"]},"CoordinateFormatEnum":{"type":"string","enum":["dd","dms","ddm"]},"CoordinateDatumEnum":{"type":"string","enum":["wgs84","gcj02","bd09"]},"LocationDetectionSourceEnum":{"type":"string","enum":["values","column_name","user"]},"EnrichmentRecordSchema":{"type":"object","properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentStatusEnum"},{"type":"null"}]},"kind":{"anyOf":[{"$ref":"#/components/schemas/GeoEnrichmentKindEnum"},{"type":"null"}]},"enrichedAt":{"type":["string","null"]},"enricherVersion":{"type":["string","null"]},"dataVersion":{"type":["string","null"]},"version":{"type":["number","null"]},"sidecarKey":{"type":["string","null"]},"keyFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"hintFields":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"corroborationFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"latLonPrecision":{"type":["number","null"]},"distinctTotal":{"type":["number","null"]},"matchedCount":{"type":["number","null"]},"unmatchedCount":{"type":["number","null"]},"truncated":{"type":["boolean","null"]},"error":{"type":["string","null"]},"appliedDatum":{"type":["string","null"]}}},"GeoEnrichmentStatusEnum":{"type":"string","enum":["running","completed","partial","failed"]},"GeoEnrichmentKindEnum":{"type":"string","enum":["forward","reverse"]},"NanFillStrategyEnum":{"type":"string","enum":["forward","interpolate","zero","drop","undefined"]},"ValueClassEnum":{"type":"string","enum":["continuous","sparse_event","bursty","binary_indicator"]},"GapProfileSchema":{"type":"object","properties":{"expectedIntervalSeconds":{"type":["number","null"]},"p50GapSeconds":{"type":["number","null"]},"p95GapSeconds":{"type":["number","null"]},"p99GapSeconds":{"type":["number","null"]},"maxGapSeconds":{"type":["number","null"]},"gapCount":{"type":["number","null"]},"largestGapStart":{"type":["string","null"]}}},"SeasonalPeriodSchema":{"type":"object","properties":{"periodSeconds":{"type":"number"},"cycleLabel":{"type":["string","null"]},"strength":{"type":"number"},"confidence":{"type":"number"},"amplitude":{"type":["number","null"]},"phase":{"type":["number","null"]},"order":{"type":"number","default":1}},"required":["periodSeconds","strength","confidence"]},"CategoricalSeasonalPeriodSchema":{"type":"object","properties":{"periodSeconds":{"type":"number"},"cycleLabel":{"type":["string","null"]},"nPhaseBins":{"type":"number"},"cramersV":{"type":"number"},"chi2PerDof":{"type":["number","null"]},"phaseDistribution":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"number"}}},{"type":"null"}]},"levels":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["periodSeconds","nPhaseBins","cramersV"]},"CyclicPatternSchema":{"type":"object","properties":{"cycle":{"$ref":"#/components/schemas/CycleNameEnum"},"activeIndices":{"type":"array","items":{"type":"number"},"default":[]},"inactiveIndices":{"type":"array","items":{"type":"number"},"default":[]},"densityByIndex":{"type":"object","additionalProperties":{"type":"number"},"default":{}},"aggByIndex":{"anyOf":[{"type":"object","additionalProperties":{"type":"number"}},{"type":"null"}]}},"required":["cycle"]},"CycleNameEnum":{"type":"string","enum":["hour_of_day","day_of_week","day_of_month","month_of_year","week_of_year"]},"TimeSeriesEnvProfileSchema":{"type":"object","properties":{"envKey":{"type":"string"},"tsSeasonalPeriods":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SeasonalPeriodSchema"}},{"type":"null"}]},"tsCategoricalSeasonality":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CategoricalSeasonalPeriodSchema"}},{"type":"null"}]},"tsMissingPatterns":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"tsActiveWindows":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CyclicPatternSchema"}},{"type":"null"}]},"trendSlopePerSecond":{"type":["number","null"]},"trendR2":{"type":["number","null"]},"tsTypicalDeltaSeconds":{"type":["number","null"]}},"required":["envKey"]},"DerivedConceptInfoSchema":{"type":"object","properties":{"formula":{"type":["string","null"]},"formulaBlocks":{"anyOf":[{"oneOf":[{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"template"},"blockType":{"type":"string","minLength":1},"values":{"type":"object","additionalProperties":{}}},"required":["nodeId","kind","blockType"]},{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"structural"},"blockType":{"type":"string","enum":["binary","ifElse"]},"values":{"type":"object","additionalProperties":{}},"children":{"type":"object","additionalProperties":{"anyOf":[{"oneOf":[{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"template"},"blockType":{"type":"string","minLength":1},"values":{"type":"object","additionalProperties":{}}},"required":["nodeId","kind","blockType"]},{"type":"object","properties":{"nodeId":{"type":"string"},"kind":{"type":"string","const":"structural"},"blockType":{"type":"string","enum":["binary","ifElse"]},"values":{"type":"object","additionalProperties":{}},"children":{"type":"object","additionalProperties":{"anyOf":[{},{"type":"null"}]}}},"required":["nodeId","kind","blockType","children"]}],"discriminator":{"propertyName":"kind"}},{"type":"null"}]}}},"required":["nodeId","kind","blockType","children"]}],"discriminator":{"propertyName":"kind"}},{"type":"null"}]},"derivedType":{"$ref":"#/components/schemas/DerivedTypeEnum","default":"manual"},"kind":{"anyOf":[{"$ref":"#/components/schemas/DerivedInfoKindEnum"},{"type":"null"}]},"source":{"anyOf":[{"$ref":"#/components/schemas/DerivedSourceEnum"},{"type":"null"}]},"sourceColumns":{"type":"array","items":{"type":"string"},"default":[]},"expression":{"type":["string","null"]},"r2":{"type":["number","null"]},"isDeterministic":{"type":["boolean","null"]},"lag":{"type":["number","null"]},"cumulativeDirection":{"type":["string","null"]},"sourceDataViewId":{"type":["string","null"]},"operationLineage":{"anyOf":[{"$ref":"#/components/schemas/OperationLineageSchema"},{"type":"null"}]},"viewSnapshot":{"anyOf":[{"$ref":"#/components/schemas/ViewSnapshotSchema"},{"type":"null"}]},"lineageHash":{"type":["string","null"]},"sourceJoinConfig":{"anyOf":[{"$ref":"#/components/schemas/SourceJoinConfigSchema"},{"type":"null"}]}}},"DerivedTypeEnum":{"type":"string","enum":["manual","datetime_component","lag","cumulative","step_change","algebraic_identity","complement","ratio","view_operation"]},"DerivedInfoKindEnum":{"type":"string","enum":["op","formula","detected","join"]},"DerivedSourceEnum":{"type":"string","enum":["user","detected","discovered"]},"OperationLineageSchema":{"type":"object","properties":{"opType":{"$ref":"#/components/schemas/OperationTypeEnum"},"opId":{"type":"string"},"parentColumns":{"type":"array","items":{"type":"string"},"default":[]},"parentConceptIds":{"type":"array","items":{"type":"string"},"default":[]}},"required":["opType","opId"]},"OperationTypeEnum":{"type":"string","enum":["SQL_QUERY","FILTER","AGGREGATE","JOIN","CONCATENATE","SORT","SPLIT_COLUMN","DROP_COLUMNS","REMOVE_DUPLICATES","IMPUTE_NULLS","DROP_NULLS","REPLACE_VALUES","REPLACE_TYPE","INTERPOLATE_TIME","CLIP_OUTLIERS","NORMALIZE_NUMERIC","MAP_CATEGORIES","TIME_SERIES_AGGREGATE","TIME_SERIES_JOIN","TRANSPOSE","FREQUENCY_ANALYSIS","CYCLIC_AGGREGATE","DIFF","DATE_DIFF","CUMULATIVE","ARRAY_DECOMPOSE","ARRAY_CONSOLIDATE","ARRAY_EXPLODE","ARRAY_AGGREGATE","JSON_FLATTEN"]},"ViewSnapshotSchema":{"type":"object","properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceSchema"}},"operations":{"type":"array","items":{"$ref":"#/components/schemas/OperationSchema"}},"outputColumn":{"type":"string"}},"required":["sources","operations","outputColumn"]},"SourceSchema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"DATASET"},"name":{"type":["string","null"]},"conceptIds":{"type":"array","items":{"type":"string"}},"conceptVersions":{"anyOf":[{"type":"object","additionalProperties":{"type":"integer","minimum":0}},{"type":"null"}]},"version":{"anyOf":[{"$ref":"#/components/schemas/SourcePinSchema"},{"type":"null"}]}},"required":["id","type","conceptIds"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"DATA_VIEW"},"name":{"type":["string","null"]}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"CONCEPT"},"name":{"type":["string","null"]},"prioritiseCalculation":{"type":"boolean","default":true},"showCalculationColumns":{"type":"boolean","default":false}},"required":["id","type"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"GEO_SIDECAR"},"name":{"type":["string","null"]},"conceptId":{"type":"string"},"sidecarKey":{"type":"string"}},"required":["id","type","conceptId","sidecarKey"]}],"discriminator":{"propertyName":"type"}},"SourcePinSchema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"latest"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"pinned"},"versionId":{"type":"string"}},"required":["kind","versionId"]}],"discriminator":{"propertyName":"kind"}},"OperationSchema":{"type":"object","properties":{"id":{"type":"string"},"sourceId":{"type":"string"},"config":{"$ref":"#/components/schemas/OperationConfigSchema"}},"required":["id","sourceId","config"]},"OperationConfigSchema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"FILTER"},"filterGroup":{"anyOf":[{"$ref":"#/components/schemas/FilterSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]}},"required":["type","filterGroup"]},{"type":"object","properties":{"type":{"type":"string","const":"AGGREGATE"},"groupByColumns":{"type":"array","items":{"type":"string"}},"aggregations":{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}}},"required":["type","groupByColumns","aggregations"]},{"type":"object","properties":{"type":{"type":"string","const":"JOIN"},"joinType":{"$ref":"#/components/schemas/JoinTypeEnum"},"columnPairs":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/JoinColumnPairSchema"}},{"type":"null"}]},"leftField":{"type":["string","null"]},"rightField":{"type":["string","null"]},"conflictResolution":{"$ref":"#/components/schemas/JoinConflictResolutionEnum"},"leftPrefix":{"type":["string","null"]},"rightPrefix":{"type":["string","null"]}},"required":["type","joinType","conflictResolution"]},{"type":"object","properties":{"type":{"type":"string","const":"CONCATENATE"},"topSource":{"type":["string","null"]},"bottomSource":{"type":["string","null"]},"sources":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"columnMapping":{"type":"object","additionalProperties":{"type":"string"}},"unmatchedRule":{"$ref":"#/components/schemas/UnmatchedRuleEnum"},"discriminatorColumn":{"type":["string","null"]},"discriminatorValues":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["type","columnMapping","unmatchedRule"]},{"type":"object","properties":{"type":{"type":"string","const":"SORT"},"sortColumns":{"type":"array","items":{"$ref":"#/components/schemas/SortColumnSchema"}}},"required":["type","sortColumns"]},{"type":"object","properties":{"type":{"type":"string","const":"SQL_QUERY"},"query":{"type":"string"},"columnSourceAliases":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]}},"required":["type","query"]},{"type":"object","properties":{"type":{"type":"string","const":"SPLIT_COLUMN"},"columnToSplit":{"type":"string"},"splitType":{"$ref":"#/components/schemas/SplitTypeEnum"},"delimiter":{"type":["string","null"]},"columns":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/NewColumnDefinitionSchema"}},{"type":"null"}]}},"required":["type","columnToSplit","splitType"]},{"type":"object","properties":{"type":{"type":"string","const":"DROP_COLUMNS"},"columns":{"type":"array","items":{"type":"string"}}},"required":["type","columns"]},{"type":"object","properties":{"type":{"type":"string","const":"REMOVE_DUPLICATES"},"column":{"type":["string","null"]},"keep":{"$ref":"#/components/schemas/KeepEnum","default":"first"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"IMPUTE_NULLS"},"method":{"$ref":"#/components/schemas/ImputeMethodEnum","default":"constant"},"column":{"type":["string","null"]},"fillValue":{"anyOf":[{"type":["string","number","boolean"]},{"type":"null"}]},"imputations":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"method":{"$ref":"#/components/schemas/ImputeMethodEnum","default":"constant"},"fillValue":{"anyOf":[{"type":["string","number","boolean"]},{"type":"null"}]}},"required":["column"]}},{"type":"null"}]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"DROP_NULLS"},"axis":{"type":"string","enum":["rows","empty_columns"],"default":"rows"},"column":{"type":["string","null"]},"columns":{"type":"array","items":{"type":"string"},"default":[]},"nullThresholdPercent":{"type":"number","default":100}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"REPLACE_VALUES"},"column":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":["string","null"]}}},"required":["type","column","mapping"]},{"type":"object","properties":{"type":{"type":"string","const":"REPLACE_TYPE"},"changes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"toType":{"$ref":"#/components/schemas/SchemaMainTypeEnum"},"toSubType":{"anyOf":[{"$ref":"#/components/schemas/SchemaSubTypeEnum"},{"type":"null"}]},"dateFormat":{"type":["string","null"]}},"required":["column","toType"]}},{"type":"null"}]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"INTERPOLATE_TIME"},"column":{"type":"string"},"frequency":{"type":"string"},"method":{"$ref":"#/components/schemas/InterpolateTimeMethodEnum"}},"required":["type","column","frequency","method"]},{"type":"object","properties":{"type":{"type":"string","const":"CLIP_OUTLIERS"},"column":{"type":"string"},"lowerQuantile":{"type":"number","default":0.05},"upperQuantile":{"type":"number","default":0.95}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"NORMALIZE_NUMERIC"},"column":{"type":"string"},"method":{"$ref":"#/components/schemas/NormalizeNumericMethodEnum","default":"z_score"}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"MAP_CATEGORIES"},"column":{"type":"string"},"mapping":{"type":"object","additionalProperties":{"type":"string"}},"defaultValue":{"type":["string","null"]}},"required":["type","column","mapping"]},{"type":"object","properties":{"type":{"type":"string","const":"TIME_SERIES_AGGREGATE"},"timeColumn":{"type":"string"},"granularity":{"type":"string","enum":["nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"]},"aggregations":{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}},"dateFormat":{"anyOf":[{"$ref":"#/components/schemas/DatetimeFormatSchema"},{"type":"null"}]}},"required":["type","timeColumn","granularity","aggregations"]},{"type":"object","properties":{"type":{"type":"string","const":"TIME_SERIES_JOIN"},"joinType":{"$ref":"#/components/schemas/JoinTypeEnum"},"leftTimeColumn":{"type":"string"},"rightTimeColumn":{"type":"string"},"rightSource":{"type":"string"},"strategy":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"exact"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"granularity"},"granularity":{"type":"string","enum":["nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"]}},"required":["type","granularity"]},{"type":"object","properties":{"type":{"type":"string","const":"asOf"},"direction":{"$ref":"#/components/schemas/AsOfDirectionEnum"},"tolerance":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"unit":{"$ref":"#/components/schemas/ToleranceUnitEnum"}},"required":["value","unit"]},{"type":"null"}]}},"required":["type","direction"]},{"type":"object","properties":{"type":{"type":"string","const":"interval"},"leftEndColumn":{"type":"string"}},"required":["type","leftEndColumn"]}],"discriminator":{"propertyName":"type"}},"exactMatchKeys":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"leftField":{"type":"string"},"rightField":{"type":"string"}},"required":["leftField","rightField"]}},{"type":"null"}]},"multiMatch":{"$ref":"#/components/schemas/MultiMatchStrategyEnum"},"multiMatchAggregations":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}},{"type":"null"}]}},"required":["type","joinType","leftTimeColumn","rightTimeColumn","rightSource","strategy","multiMatch"]},{"type":"object","properties":{"type":{"type":"string","const":"TRANSPOSE"},"timeColumn":{"type":"string"},"envColumns":{"type":"array","items":{"type":"string"}},"valueColumns":{"type":"array","items":{"type":"string"}},"columnTemplate":{"type":"string"},"joinStrategy":{"anyOf":[{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"exact"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","const":"granularity"},"granularity":{"type":"string","enum":["nanosecond","microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"]}},"required":["type","granularity"]},{"type":"object","properties":{"type":{"type":"string","const":"asOf"},"direction":{"$ref":"#/components/schemas/AsOfDirectionEnum"},"tolerance":{"anyOf":[{"type":"object","properties":{"value":{"type":"number"},"unit":{"$ref":"#/components/schemas/ToleranceUnitEnum"}},"required":["value","unit"]},{"type":"null"}]}},"required":["type","direction"]}],"discriminator":{"propertyName":"type"}},{"type":"null"}]}},"required":["type","timeColumn","envColumns","valueColumns","columnTemplate"]},{"type":"object","properties":{"type":{"type":"string","const":"FREQUENCY_ANALYSIS"},"timeColumn":{"type":"string"},"valueColumns":{"type":"array","items":{"type":"string"}},"method":{"$ref":"#/components/schemas/FrequencyMethodEnum"},"windowFunction":{"$ref":"#/components/schemas/FrequencyWindowFunctionEnum","default":"hann"},"windowSize":{"type":["number","null"]},"overlap":{"type":"number","default":0.5},"samplingRateHz":{"type":["number","null"]},"outputFormat":{"$ref":"#/components/schemas/FrequencyOutputFormatEnum"},"frequencyRange":{"anyOf":[{"type":"object","properties":{"minHz":{"type":["number","null"]},"maxHz":{"type":["number","null"]}}},{"type":"null"}]},"frequencyUnit":{"$ref":"#/components/schemas/FrequencyUnitEnum","default":"hz"}},"required":["type","timeColumn","valueColumns","method","outputFormat"]},{"type":"object","properties":{"type":{"type":"string","const":"CYCLIC_AGGREGATE"},"timeColumn":{"type":"string"},"cycleComponent":{"$ref":"#/components/schemas/CyclicComponentEnum"},"aggregations":{"type":"array","items":{"$ref":"#/components/schemas/AggregationFunctionSchema"}}},"required":["type","timeColumn","cycleComponent","aggregations"]},{"type":"object","properties":{"type":{"type":"string","const":"DIFF"},"timeColumn":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"partitionColumns":{"type":"array","items":{"type":"string"},"default":[]},"outputSuffix":{"type":"string","default":"_diff"},"replaceColumns":{"type":"boolean","default":false}},"required":["type","timeColumn","columns"]},{"type":"object","properties":{"type":{"type":"string","const":"DATE_DIFF"},"startColumn":{"type":"string"},"endColumn":{"type":"string"},"unit":{"$ref":"#/components/schemas/DateDiffUnitEnum","default":"days"},"sign":{"$ref":"#/components/schemas/DateDiffSignEnum","default":"signed"},"outputColumn":{"type":["string","null"]}},"required":["type","startColumn","endColumn"]},{"type":"object","properties":{"type":{"type":"string","const":"CUMULATIVE"},"timeColumn":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"partitionColumns":{"type":"array","items":{"type":"string"},"default":[]},"outputSuffix":{"type":"string","default":"_cumsum"},"replaceColumns":{"type":"boolean","default":false}},"required":["type","timeColumn","columns"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_DECOMPOSE"},"column":{"type":"string"},"mode":{"$ref":"#/components/schemas/ArrayDecomposeModeEnum","default":"position"},"maxColumns":{"type":"integer","exclusiveMinimum":0,"default":500},"outputPrefix":{"type":"string","default":"_"}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_CONSOLIDATE"},"groups":{"type":"array","items":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"string"},"minItems":1},"outputColumn":{"type":"string"},"dropSource":{"type":"boolean","default":true},"includeNulls":{"type":"boolean","default":false}},"required":["columns","outputColumn"]},"minItems":1}},"required":["type","groups"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_EXPLODE"},"column":{"type":"string"},"outputColumn":{"type":["string","null"]},"preserveIndex":{"type":"boolean","default":false}},"required":["type","column"]},{"type":"object","properties":{"type":{"type":"string","const":"ARRAY_AGGREGATE"},"column":{"type":"string"},"aggregation":{"$ref":"#/components/schemas/ArrayAggregationKindEnum"},"outputColumn":{"type":["string","null"]}},"required":["type","column","aggregation"]},{"type":"object","properties":{"type":{"type":"string","const":"JSON_FLATTEN"},"column":{"type":"string"},"maxColumns":{"type":"integer","exclusiveMinimum":0,"default":500},"separator":{"type":"string","default":"."},"dropSource":{"type":"boolean","default":true}},"required":["type","column"]}],"discriminator":{"propertyName":"type"}},"FilterSchema":{"type":"object","properties":{"column":{"type":"string"},"comparisonOperator":{"$ref":"#/components/schemas/ComparisonOperatorEnum"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":["string","number","boolean"]}}]},"correctType":{"type":"boolean"}},"required":["column","comparisonOperator","value","correctType"]},"ComparisonOperatorEnum":{"type":"string","enum":["Equal to","Not Equal to","Contains","Does not contain","Starts with","Ends with","Is Empty","Is not Empty","Less than","Greater than","Less than or equal to","Greater than or equal to","Before","After","Array contains","Array contains any","Array contains all","Array does not contain","Array does not contain any","Array does not contain all","Array size equal to","Array size greater than","Array size less than"]},"FilterGroupSchema":{"type":"object","properties":{"booleanOperator":{"$ref":"#/components/schemas/LogicalOperatorEnum"},"filters":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/FilterSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]}}},"required":["booleanOperator","filters"]},"LogicalOperatorEnum":{"type":"string","enum":["AND","OR"]},"AggregationFunctionSchema":{"type":"object","properties":{"column":{"type":"string"},"function":{"$ref":"#/components/schemas/AggregateFunctionEnum"},"alias":{"type":["string","null"]},"filter":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/FilterSchema"},{"$ref":"#/components/schemas/FilterGroupSchema"}]},{"type":"null"}]}},"required":["column","function"]},"AggregateFunctionEnum":{"type":"string","enum":["sum","avg","min","max","count","countDistinct","first","last","categoryShare"]},"JoinTypeEnum":{"type":"string","enum":["inner","left","right","full"]},"JoinColumnPairSchema":{"type":"object","properties":{"leftField":{"type":"string"},"rightField":{"type":"string"}},"required":["leftField","rightField"]},"JoinConflictResolutionEnum":{"type":"string","enum":["keep_left","keep_right","prefix"]},"UnmatchedRuleEnum":{"type":"string","enum":["error","drop","append"]},"SortColumnSchema":{"type":"object","properties":{"column":{"type":"string"},"direction":{"$ref":"#/components/schemas/SortDirectionEnum"}},"required":["column","direction"]},"SortDirectionEnum":{"type":"string","enum":["asc","desc"]},"SplitTypeEnum":{"type":"string","enum":["delimiter","pattern"]},"NewColumnDefinitionSchema":{"type":"object","properties":{"name":{"type":"string"},"pattern":{"type":["string","null"]}},"required":["name"]},"KeepEnum":{"type":"string","enum":["first","last"]},"ImputeMethodEnum":{"type":"string","enum":["mean","median","mode","constant"]},"InterpolateTimeMethodEnum":{"type":"string","enum":["linear","time","index"]},"NormalizeNumericMethodEnum":{"type":"string","enum":["min_max","z_score"]},"DatetimeFormatSchema":{"type":"string","minLength":1},"AsOfDirectionEnum":{"type":"string","enum":["backward","forward","nearest"]},"ToleranceUnitEnum":{"type":"string","enum":["us","ms","s","m","h","d"]},"MultiMatchStrategyEnum":{"type":"string","enum":["first","last","aggregate"]},"FrequencyMethodEnum":{"type":"string","enum":["fft","welch"]},"FrequencyWindowFunctionEnum":{"type":"string","enum":["hann","hamming","blackman","rectangular"]},"FrequencyOutputFormatEnum":{"type":"string","enum":["spectrogram","time_frequency_long"]},"FrequencyUnitEnum":{"type":"string","enum":["hz","per_minute","per_hour","per_day","per_week","per_month","per_year"]},"CyclicComponentEnum":{"type":"string","enum":["second_in_minute","minute_in_hour","hour_of_day","day_of_week","day_of_month","week_of_year","month_of_year","quarter_of_year"]},"DateDiffUnitEnum":{"type":"string","enum":["seconds","minutes","hours","days","weeks"]},"DateDiffSignEnum":{"type":"string","enum":["signed","absolute"]},"ArrayDecomposeModeEnum":{"type":"string","enum":["position","one_hot"]},"ArrayAggregationKindEnum":{"type":"string","enum":["mean","sum","min","max","median","count"]},"SourceJoinConfigSchema":{"type":"object","properties":{"joinType":{"type":"string","enum":["left","inner"],"default":"left"},"strategy":{"type":["string","null"]}}},"ConceptKindEnum":{"type":"string","enum":["standard","derived","metric"]},"RelationshipRuleSchema":{"type":"object","properties":{"ruleType":{"$ref":"#/components/schemas/RelationshipRuleTypeEnum"},"sourceVariable":{"type":"string"},"condition":{"anyOf":[{"$ref":"#/components/schemas/ConditionSchema"},{"type":"null"}]},"allowedValues":{"anyOf":[{"type":"array","items":{"type":["string","number","boolean"]}},{"type":"null"}]},"minValue":{"type":["number","null"]},"maxValue":{"type":["number","null"]},"confidence":{"type":"number","default":1},"support":{"type":"number","default":0},"strength":{"anyOf":[{"$ref":"#/components/schemas/RuleStrengthEnum"},{"type":"null"}]},"violationRate":{"type":["number","null"]},"source":{"type":["string","null"]},"cycle":{"type":["string","null"]}},"required":["ruleType","sourceVariable"]},"RelationshipRuleTypeEnum":{"type":"string","enum":["conditional_values","range","set","cyclic_active_window","cyclic_missing"]},"ConditionSchema":{"type":"object","properties":{"variable":{"type":"string"},"operator":{"type":"string","enum":["eq","ne","gt","lt","ge","le","in","not_in"]},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":["number","string","boolean"]}}]}},"required":["variable","operator","value"]},"RuleStrengthEnum":{"type":"string","enum":["hard","soft"]},"SuggestedRoleEnum":{"type":"string","enum":["source","target"]},"ConceptValueMappingSchema":{"type":"object","properties":{"canonicalValue":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"default":[]}},"required":["canonicalValue"]},"DetectedConceptStructureSchema":{"type":"object","properties":{"temporalPrerequisites":{"type":"array","items":{"type":"string"},"default":[]},"suggestedRole":{"anyOf":[{"$ref":"#/components/schemas/SuggestedRoleEnum"},{"type":"null"}]}}},"BindingStatusEnum":{"type":"string","enum":["confirmed","suggested"]},"BindingSourceEnum":{"type":"string","enum":["ingest","statistical","llm","user","install"]},"KeyRoleEnum":{"type":"string","enum":["primary","foreign"]},"ConformanceReportSchema":{"type":"object","properties":{"rowsScanned":{"type":"number"},"nullRate":{"type":"number"},"allowedValueCoverage":{"type":["number","null"]},"unresolvedValues":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"number"}},"required":["value","count"]},"default":[]},"inferredGranularity":{"type":["string","null"]},"granularityMatch":{"type":["boolean","null"]},"duplicateAnchorKeys":{"type":["number","null"]},"unitNote":{"type":["string","null"]},"verdict":{"$ref":"#/components/schemas/ConformanceVerdictEnum","default":"pass"}},"required":["rowsScanned","nullRate"]},"ConformanceVerdictEnum":{"type":"string","enum":["pass","warn","fail"]},"OntologyConceptEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OntologyConcept"}},"required":["data"]},"OntologyConcept":{"type":"object","properties":{"id":{"type":"string"},"organisationId":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"conceptClassification":{"anyOf":[{"$ref":"#/components/schemas/ConceptClassificationEnum"},{"type":"null"}]},"anchorConceptLinks":{"type":"array","items":{"type":"string"},"default":[]},"schemaFieldName":{"type":"string"},"schemaType":{"$ref":"#/components/schemas/SchemaMainTypeEnum"},"schemaSubtype":{"anyOf":[{"$ref":"#/components/schemas/SchemaSubTypeEnum"},{"type":"null"}]},"metadata":{"$ref":"#/components/schemas/ConceptMetadataSchema"},"lockedMetadataFields":{"type":"array","items":{"type":"string"}},"detectedMetadata":{"anyOf":[{"$ref":"#/components/schemas/ConceptMetadataSchema"},{"type":"null"}]},"fieldMappings":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"field":{"type":"string"},"status":{"$ref":"#/components/schemas/BindingStatusEnum","default":"confirmed"},"source":{"$ref":"#/components/schemas/BindingSourceEnum","default":"ingest"},"confidence":{"type":["number","null"]},"evidence":{"type":["string","null"]},"valueMap":{"anyOf":[{"anyOf":[{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"string"}]}},{"allOf":[{},{"type":"array","items":{"type":"array","minItems":2,"maxItems":2,"items":[{"type":"string"},{"type":"string"}]}}]}]},{"type":"null"}]},"canonicalField":{"type":["string","null"]},"scopeFields":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"precedence":{"type":["number","null"]},"keyRole":{"anyOf":[{"$ref":"#/components/schemas/KeyRoleEnum"},{"type":"null"}]},"conformance":{"anyOf":[{"$ref":"#/components/schemas/ConformanceReportSchema"},{"type":"null"}]},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]}},"required":["sourceId","field"]}},"derivedInfo":{"anyOf":[{"$ref":"#/components/schemas/DerivedConceptInfoSchema"},{"type":"null"}]},"conceptKind":{"$ref":"#/components/schemas/ConceptKindEnum","default":"standard"},"metricSql":{"type":["string","null"]},"relationshipRules":{"type":"array","items":{"$ref":"#/components/schemas/RelationshipRuleSchema"},"default":[]},"temporalPrerequisites":{"type":"array","items":{"type":"string"},"default":[]},"suggestedRole":{"anyOf":[{"$ref":"#/components/schemas/SuggestedRoleEnum"},{"type":"null"}]},"trustTier":{"anyOf":[{"type":"string","enum":["exploratory","curated_pending","curated"]},{"type":"null"}]},"ontologyRef":{"anyOf":[{"type":"object","properties":{"ontologyId":{"type":"string"},"ontologyVersion":{"type":"string"},"canonicalId":{"type":"string"},"installScope":{"anyOf":[{"type":"object","properties":{"conceptCanonicalIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"filters":{"type":"array","items":{"type":"object","properties":{"conceptRef":{"type":"string"},"values":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"start":{"type":["string","null"]},"end":{"type":["string","null"]}},"required":["conceptRef"]},"default":[]}}},{"type":"null"}]}},"required":["ontologyId","ontologyVersion","canonicalId"]},{"type":"null"}]},"layerIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"},"default":[]},"valueMappings":{"type":"array","items":{"$ref":"#/components/schemas/ConceptValueMappingSchema"},"default":[]},"lockedConceptFields":{"type":"array","items":{"type":"string"}},"detectedConceptStructure":{"anyOf":[{"$ref":"#/components/schemas/DetectedConceptStructureSchema"},{"type":"null"}]},"lastEditedBy":{"type":["string","null"]},"lastEditedAt":{"type":["string","null"]},"lineageDrift":{"type":["boolean","null"]},"editVersion":{"type":"integer","minimum":0,"default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organisationId","workspaceId","name","schemaFieldName","schemaType","metadata","fieldMappings"]}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/ontology/concepts/{id}":{"put":{"operationId":"put-api-v1-workspaces-{wsId}-ontology-concepts-{id}","summary":"Replace ontology concept","description":"Replaces the concept with the provided fields. Platform loads the existing concept, merges the body, preserves the persisted editVersion when omitted, then proxies to data-service POST /api/ontology/update-concept so downstream consumers (e.g. catalog, data-service) stay in sync. Body should include _id and any fields to update.","tags":["Ontology"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicConceptUpdateInput"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyConceptEnvelope"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Delete ontology concept

> Deletes the concept from platform MongoDB only (deleteManyOntologyConcepts). Does not call data-service; any data-service copy or derived indices are not updated by this route.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Ontology"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/ontology/concepts/{id}":{"delete":{"operationId":"delete-api-v1-workspaces-{wsId}-ontology-concepts-{id}","summary":"Delete ontology concept","description":"Deletes the concept from platform MongoDB only (deleteManyOntologyConcepts). Does not call data-service; any data-service copy or derived indices are not updated by this route.","tags":["Ontology"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: id"}],"responses":{"204":{"description":"No Content"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Merge ontology concepts

> Merges one or more source concepts into a single target concept in one atomic request. Body: targetConceptId, sourceConceptIds (string array); sourceConceptId (string) is a deprecated legacy single-merge field coalesced into sourceConceptIds. Proxies to data-service POST /api/ontology/merge-concepts. Field mappings and relationships from every source are consolidated into the target; the sources are deleted. The whole batch is rejected atomically if any source is missing or fails merge validation. Returns the merged concept.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Ontology"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"MergeInput":{"type":"object","properties":{"sourceConceptId":{"type":"string"},"sourceConceptIds":{"type":"array","items":{"type":"string"}},"targetConceptId":{"type":"string"}},"required":["sourceConceptIds","targetConceptId"]},"UnspecifiedEnvelope":{"type":"object","properties":{"data":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Payload not declared in this repo"}},"required":["data"]}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/ontology/concepts/merge":{"post":{"operationId":"post-api-v1-workspaces-{wsId}-ontology-concepts-merge","summary":"Merge ontology concepts","description":"Merges one or more source concepts into a single target concept in one atomic request. Body: targetConceptId, sourceConceptIds (string array); sourceConceptId (string) is a deprecated legacy single-merge field coalesced into sourceConceptIds. Proxies to data-service POST /api/ontology/merge-concepts. Field mappings and relationships from every source are consolidated into the target; the sources are deleted. The whole batch is rejected atomically if any source is missing or fails merge validation. Returns the merged concept.","tags":["Ontology"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeInput"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnspecifiedEnvelope"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Search ontology concepts

> Searches concepts by text and filters. Query params: query (text), schemaType, classification, sourceId, limit (default 50). Proxies to data-service GET /api/ontology/search/{workspaceId}. Use for typeahead or filtered concept pickers.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Ontology"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"UnspecifiedEnvelope":{"type":"object","properties":{"data":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Payload not declared in this repo"}},"required":["data"]}},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/ontology/concepts/search":{"get":{"operationId":"get-api-v1-workspaces-{wsId}-ontology-concepts-search","summary":"Search ontology concepts","description":"Searches concepts by text and filters. Query params: query (text), schemaType, classification, sourceId, limit (default 50). Proxies to data-service GET /api/ontology/search/{workspaceId}. Use for typeahead or filtered concept pickers.","tags":["Ontology"],"parameters":[{"in":"query","name":"query","required":true,"schema":{"type":"string","description":"Search text matched against concept names."},"description":"Search text matched against concept names."},{"in":"query","name":"limit","required":false,"schema":{"description":"Maximum number of concepts to return.","type":"number"},"description":"Maximum number of concepts to return."},{"in":"query","name":"sourceId","required":false,"schema":{"type":"string","description":"Restrict to concepts mapped to this source."},"description":"Restrict to concepts mapped to this source."},{"in":"query","name":"classification","required":false,"schema":{"type":"string","description":"Filter by concept classification."},"description":"Filter by concept classification."},{"in":"query","name":"schemaType","required":false,"schema":{"type":"string","description":"Filter by concept schema type."},"description":"Filter by concept schema type."},{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnspecifiedEnvelope"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get concept field mappings

> Returns the concept's id, name, and fieldMappings (source/table and field links). Read from platform MongoDB; no proxy. fieldMappings link this concept to columns in workspace sources.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Ontology"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"UnspecifiedEnvelope":{"type":"object","properties":{"data":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Payload not declared in this repo"}},"required":["data"]}},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/ontology/concepts/{id}/mappings":{"get":{"operationId":"get-api-v1-workspaces-{wsId}-ontology-concepts-{id}-mappings","summary":"Get concept field mappings","description":"Returns the concept's id, name, and fieldMappings (source/table and field links). Read from platform MongoDB; no proxy. fieldMappings link this concept to columns in workspace sources.","tags":["Ontology"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: id"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnspecifiedEnvelope"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get concept relationships

> Returns the concept's id, name, anchorConceptLinks, and temporalPrerequisites. Read from platform MongoDB. anchorConceptLinks are concept ids this concept is anchored to; temporalPrerequisites are concept ids that must precede this one in time.

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Ontology"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"UnspecifiedEnvelope":{"type":"object","properties":{"data":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Payload not declared in this repo"}},"required":["data"]}},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/ontology/concepts/{id}/relationships":{"get":{"operationId":"get-api-v1-workspaces-{wsId}-ontology-concepts-{id}-relationships","summary":"Get concept relationships","description":"Returns the concept's id, name, anchorConceptLinks, and temporalPrerequisites. Read from platform MongoDB. anchorConceptLinks are concept ids this concept is anchored to; temporalPrerequisites are concept ids that must precede this one in time.","tags":["Ontology"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: id"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnspecifiedEnvelope"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Split ontology concept

> Splits one concept by moving a single field mapping to a new concept. Body: fieldMapping (the mapping to split out). Proxies to data-service POST /api/ontology/split-concept with conceptId and fieldMapping. Returns the result from data-service (e.g. new concept and updated original).

```json
{"openapi":"3.1.0","info":{"title":"RootCause Public API","version":"1.0.0"},"tags":[{"name":"Ontology"}],"servers":[{"url":"https://sandbox.rootcause.ai","description":"Sandbox"},{"url":"https://platform.rootcause.ai","description":"Production"},{"url":"http://localhost:3000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"An API key (pk_...) created on the Organisation API page, or an OAuth access token. Every operation requires one."}},"schemas":{"SplitInput":{"type":"object","properties":{"fieldMapping":{"$ref":"#/components/schemas/PublicFieldMappingSchema"}},"required":["fieldMapping"]},"PublicFieldMappingSchema":{"type":"object","properties":{"datasetId":{"type":"string"},"field":{"type":"string"},"status":{"$ref":"#/components/schemas/BindingStatusEnum","default":"confirmed"},"source":{"$ref":"#/components/schemas/BindingSourceEnum","default":"ingest"},"confidence":{"type":["number","null"]},"evidence":{"type":["string","null"]},"valueMap":{"anyOf":[{"$ref":"#/components/schemas/OntologyValueMapSchema"},{"type":"null"}]},"canonicalField":{"type":["string","null"]},"scopeFields":{"type":["array","null"],"items":{"type":"string"}},"precedence":{"type":["number","null"]},"keyRole":{"anyOf":[{"$ref":"#/components/schemas/KeyRoleEnum"},{"type":"null"}]},"conformance":{"anyOf":[{"$ref":"#/components/schemas/ConformanceReportSchema"},{"type":"null"}]},"decidedBy":{"type":["string","null"]},"decidedAt":{"type":["string","null"]},"sourceId":{"type":"string"}},"required":["datasetId","field","status","source","sourceId"]},"BindingStatusEnum":{"type":"string","enum":["confirmed","suggested"]},"BindingSourceEnum":{"type":"string","enum":["ingest","statistical","llm","user","install"]},"OntologyValueMapSchema":{"anyOf":[{"$ref":"#/components/schemas/OntologyValueMapEntriesSchema"},{"$ref":"#/components/schemas/OntologyValueMapEntriesSchema"}]},"OntologyValueMapEntriesSchema":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}],"items":false,"minItems":2,"maxItems":2}},"KeyRoleEnum":{"type":"string","enum":["primary","foreign"]},"ConformanceReportSchema":{"type":"object","properties":{"rowsScanned":{"type":"number"},"nullRate":{"type":"number"},"allowedValueCoverage":{"type":["number","null"]},"unresolvedValues":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"number"}},"required":["value","count"]},"default":[]},"inferredGranularity":{"type":["string","null"]},"granularityMatch":{"type":["boolean","null"]},"duplicateAnchorKeys":{"type":["number","null"]},"unitNote":{"type":["string","null"]},"verdict":{"$ref":"#/components/schemas/ConformanceVerdictEnum","default":"pass"}},"required":["rowsScanned","nullRate"]},"ConformanceVerdictEnum":{"type":"string","enum":["pass","warn","fail"]},"UnspecifiedEnvelope":{"type":"object","properties":{"data":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}],"description":"Payload not declared in this repo"}},"required":["data"]}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"429":{"description":"Too Many Requests; the response carries Retry-After","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"required":["type","title","status","detail"]}}}}}},"paths":{"/api/v1/workspaces/{wsId}/ontology/concepts/{id}/split":{"post":{"operationId":"post-api-v1-workspaces-{wsId}-ontology-concepts-{id}-split","summary":"Split ontology concept","description":"Splits one concept by moving a single field mapping to a new concept. Body: fieldMapping (the mapping to split out). Proxies to data-service POST /api/ontology/split-concept with conceptId and fieldMapping. Returns the result from data-service (e.g. new concept and updated original).","tags":["Ontology"],"parameters":[{"name":"wsId","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: wsId"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitInput"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnspecifiedEnvelope"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}}}}
```
