본문으로 건너뛰기

SP4 Phase D.3 — promote a succeeded cohort.match run's matched output into a first-class cohort_definition so downstream SP3 analyses can consume it.

POST 

/api/v1/finngen/workbench/promote-match

The R worker (darkstar/api/finngen/cohort_ops.R) writes matched subjects under a phantom cohort_definition_id = 9,000,000 + primary_id. This endpoint mints a real row in app.cohort_definitions, then UPDATEs the phantom rows in {cohort_schema}.cohort to point at the new id.

Idempotent: if the run was already promoted (any cohort_definition row owned by the user with expression_json->finngen_match_promotion.run_id matching), returns the existing record without creating a duplicate.

Request

Responses